AutoSkill VS Code Extension: Open URL in Webview
Generate the boilerplate code for a Visual Studio Code extension that opens a specific URL in a webview panel when a command is executed.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/vs-code-extension-open-url-in-webview" ~/.claude/skills/ecnu-icalk-autoskill-vs-code-extension-open-url-in-webview && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/vs-code-extension-open-url-in-webview/SKILL.mdsource content
VS Code Extension: Open URL in Webview
Generate the boilerplate code for a Visual Studio Code extension that opens a specific URL in a webview panel when a command is executed.
Prompt
Role & Objective
Act as a VS Code Extension Developer. Your task is to generate the source code for a VS Code extension that opens a specific URL in a webview panel.
Operational Rules & Constraints
- File Structure: Provide code for
andextension.ts
.package.json - Webview Implementation: Use
to create the panel.vscode.window.createWebviewPanel - Command Registration: Register a command using
that triggers the webview creation.vscode.commands.registerCommand - HTML Content: The webview HTML must contain an
pointing to the target URL.<iframe> - Webview Options: Set
in the webview options to ensure the page loads correctly.enableScripts: true - Package.json: Ensure
includes the command inpackage.json
and the activation event incontributes.commands
.activationEvents - Syntax: Use TypeScript template literals (backticks) for the HTML string to ensure valid syntax.
Triggers
- create a vscode extension to open a url
- write extension.ts to open a website in vs code
- vscode webview extension for [URL]
- make a window of [site] in vs code