vscode-extension-builder-lawvable
Build VS Code extensions from scratch or convert existing JS/React/Vue apps. Supports commands, webviews (React/Vue), custom editors, tree views, and AI agent integration via file-bridge IPC. Use when user wants to create a VS Code extension, convert a web app to an extension, add webviews or custom UIs to VS Code, implement tree views, build custom file editors, integrate with AI agents, or package/publish extensions (.vsix).
Best use case
vscode-extension-builder-lawvable is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Build VS Code extensions from scratch or convert existing JS/React/Vue apps. Supports commands, webviews (React/Vue), custom editors, tree views, and AI agent integration via file-bridge IPC. Use when user wants to create a VS Code extension, convert a web app to an extension, add webviews or custom UIs to VS Code, implement tree views, build custom file editors, integrate with AI agents, or package/publish extensions (.vsix).
Teams using vscode-extension-builder-lawvable should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/vscode-extension-builder-lawvable/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How vscode-extension-builder-lawvable Compares
| Feature / Agent | vscode-extension-builder-lawvable | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Build VS Code extensions from scratch or convert existing JS/React/Vue apps. Supports commands, webviews (React/Vue), custom editors, tree views, and AI agent integration via file-bridge IPC. Use when user wants to create a VS Code extension, convert a web app to an extension, add webviews or custom UIs to VS Code, implement tree views, build custom file editors, integrate with AI agents, or package/publish extensions (.vsix).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# VS Code Extension
Build VS Code extensions from scratch or convert existing web apps into portable, shareable extensions.
## Architecture
VS Code extensions run in two contexts:
1. **Extension Host (Node.js)** — Backend logic, file access, VS Code APIs
2. **Webviews (browser sandbox)** — Custom UIs with HTML/CSS/JS (React, Vue, vanilla)
Build stack: **TypeScript + esbuild** (extension) + **Vite** (webviews)
## Quick Start
1. Choose a template from `assets/` based on your needs (see decision tree below)
2. Copy the template to your project directory
3. Update `package.json`: name, displayName, publisher, description
4. Run `npm install` then `npm run build`
5. Press F5 in VS Code to launch Extension Development Host
## Template Decision Tree
| Need | Template |
|------|----------|
| Simple command/action | `assets/basic-command/` |
| Custom UI panel (React) | `assets/webview-react/` |
| Sidebar file tree | `assets/tree-view/` |
| Custom file editor | `assets/custom-editor/` |
| AI agent integration | `assets/file-bridge/` |
## Extension Types
### Commands
Register actions triggered via Command Palette, keyboard shortcuts, or menus.
```typescript
vscode.commands.registerCommand('myExt.doSomething', () => {
vscode.window.showInformationMessage('Done!');
});
```
See [references/api-reference.md](references/api-reference.md) for common APIs.
### Webviews
Full HTML/CSS/JS UIs in panels or sidebar. Use React for complex interfaces.
```typescript
const panel = vscode.window.createWebviewPanel(
'myView', 'My Panel', vscode.ViewColumn.One,
{ enableScripts: true }
);
panel.webview.html = getWebviewContent();
```
See [references/webview-patterns.md](references/webview-patterns.md) for React setup, messaging, and CSP.
### Tree Views
Hierarchical data in the sidebar (file explorers, outlines, lists).
```typescript
vscode.window.registerTreeDataProvider('myTreeView', new MyTreeProvider());
```
See [references/tree-view-patterns.md](references/tree-view-patterns.md) for TreeDataProvider patterns.
### Custom Editors
Replace the default editor for specific file types.
```typescript
vscode.window.registerCustomEditorProvider('myExt.myEditor', new MyEditorProvider());
```
See [references/custom-editor-patterns.md](references/custom-editor-patterns.md) for document sync and undo/redo.
## Converting Existing Apps
To convert a JS/React/Vue app into an extension:
1. **Assess** — What does the app do? What VS Code features does it need?
2. **Map APIs** — Replace web APIs with VS Code equivalents
3. **Restructure** — Move UI into webview, logic into extension host
4. **Connect** — Wire up postMessage communication
| Web API | VS Code Equivalent |
|---------|-------------------|
| `localStorage` | `context.globalState` / `context.workspaceState` |
| `fetch()` | `vscode.workspace.fs` or keep `fetch` for external APIs |
| Router | Multiple webview panels or sidebar views |
| `alert()` | `vscode.window.showInformationMessage()` |
| `prompt()` | `vscode.window.showInputBox()` |
| `confirm()` | `vscode.window.showWarningMessage()` with options |
See [references/conversion-guide.md](references/conversion-guide.md) for detailed step-by-step process.
## Build System
**Extension code** — Use esbuild (fast, simple):
```javascript
// esbuild.js
esbuild.build({
entryPoints: ['src/extension.ts'],
bundle: true,
outfile: 'dist/extension.js',
external: ['vscode'],
format: 'cjs',
platform: 'node',
});
```
**Webview code** — Use Vite (HMR, React support):
```javascript
// vite.config.ts
export default defineConfig({
build: {
outDir: '../dist/webview',
rollupOptions: { output: { entryFileNames: '[name].js' } }
}
});
```
See [references/build-config.md](references/build-config.md) for complete configurations.
## package.json Manifest
Essential fields:
```json
{
"name": "my-extension",
"displayName": "My Extension",
"publisher": "your-publisher-id",
"version": "0.0.1",
"engines": { "vscode": "^1.85.0" },
"main": "./dist/extension.js",
"activationEvents": [],
"contributes": {
"commands": [{ "command": "myExt.hello", "title": "Hello" }]
}
}
```
The `contributes` section defines commands, menus, views, settings, keybindings, and more.
See [references/contribution-points.md](references/contribution-points.md) for all contribution types.
## IPC Patterns
### Extension ↔ Webview
Use `postMessage` for bidirectional communication:
```typescript
// Extension → Webview
panel.webview.postMessage({ type: 'update', data: {...} });
// Webview → Extension
panel.webview.onDidReceiveMessage(msg => {
if (msg.type === 'save') { /* handle */ }
});
```
### Extension ↔ External Tools (AI Agents)
Use file-based IPC for communication with Claude Code or other agents:
```typescript
// Watch for command files
fs.watch(commandDir, (event, filename) => {
if (filename.endsWith('.json')) {
const command = JSON.parse(fs.readFileSync(path.join(commandDir, filename)));
processCommand(command);
}
});
```
See [references/ai-integration.md](references/ai-integration.md) for the file-bridge pattern.
## Packaging & Distribution
### Package as .vsix
```bash
npm install -g @vscode/vsce
vsce package
```
This creates `my-extension-0.0.1.vsix`.
### .vscodeignore
Exclude unnecessary files:
```
.vscode/**
node_modules/**
src/**
*.ts
tsconfig.json
esbuild.js
vite.config.ts
```
### Distribution Options
1. **Direct sharing** — Send .vsix file, install via `code --install-extension file.vsix`
2. **VS Marketplace** — Publish with `vsce publish` (requires Microsoft account)
3. **Open VSX** — Alternative registry for open-source extensions
### Platform-Specific Builds
For extensions with native dependencies:
```bash
vsce package --target win32-x64
vsce package --target darwin-arm64
vsce package --target linux-x64
```
## Reference Files
| File | When to Read |
|------|--------------|
| [api-reference.md](references/api-reference.md) | Implementing extension features |
| [contribution-points.md](references/contribution-points.md) | Configuring package.json contributes |
| [webview-patterns.md](references/webview-patterns.md) | Building React webviews |
| [tree-view-patterns.md](references/tree-view-patterns.md) | Implementing tree views |
| [custom-editor-patterns.md](references/custom-editor-patterns.md) | Building custom file editors |
| [build-config.md](references/build-config.md) | Configuring esbuild/Vite |
| [conversion-guide.md](references/conversion-guide.md) | Converting web apps |
| [ai-integration.md](references/ai-integration.md) | Integrating with AI agents |
## Asset Templates
| Template | Description |
|----------|-------------|
| [basic-command/](assets/basic-command/) | Minimal extension with one command |
| [webview-react/](assets/webview-react/) | React webview panel with messaging |
| [tree-view/](assets/tree-view/) | Sidebar tree view with provider |
| [custom-editor/](assets/custom-editor/) | Custom editor for specific file types |
| [file-bridge/](assets/file-bridge/) | File-based IPC for AI agents |Related Skills
tabular-review-lawvable
Guide to analyze multiple documents (PDF, DOCX) against user-defined columns and produce a structured Excel output with citations. Use when the user wants to: (1) Extract specific information from multiple documents into a table, (2) Compare clauses or provisions across contracts, (3) Create a document review matrix with source citations. Triggers on: 'tabular review', 'document matrix', 'extract from documents', 'compare across documents', 'review multiple contracts'.
skill-optimizer-lawvable
Guide to analyze a current work session and propose improvements to skills. Use (1) automatically after working with a skill to capture learnings, (2) when the user suggests improvements, corrections, or additions during a skill-related session, or (3) when the user manually invokes `self-improve`.
outlook-emails-lawvable
Read, search, and download emails and attachments from Microsoft Outlook via OAuth2. Use when the user asks to (1) check, read, or fetch emails or messages from Outlook, (2) search emails by keyword, sender, or subject, (3) download email attachments such as contracts, NDAs, or documents, (4) chain email content into other skills (e.g. "read the latest email from X and review the attached NDA"), or (5) any task involving Microsoft Outlook, Office 365, or Exchange email access.
docx-processing-lawvable
Programmatically edit Word documents (.docx) with live preview and track changes via SuperDoc VS Code extension. Use when editing DOCX files, making tracked changes, redlining, marking up contracts, or when the user wants to modify Word documents with insertions/deletions visible. Triggers on docx, Word, track changes, redline, markup.
xlsx-processing-openai
Toolkit for comprehensive Spreadsheet reading, creation, editing, and analysis with visual quality control. Use to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing tabular data, (3) Modifying existing spreadsheets while preserving formulas, (4) Building financial models with proper formatting, (5) Data visualization with in-sheet charts, or any other spreadsheet tasks.
xlsx-processing-manus
Professional Excel spreadsheet creation with a focus on aesthetics and data analysis. Use when creating spreadsheets for organizing, analyzing, and presenting structured data in a clear and professional format.
xlsx-processing-anthropic
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
vendor-due-diligence-patrick-munro
Framework for assessing IT service providers, technology vendors, and third-party partners. Creates structured risk assessments across financial, operational, compliance, security, and reputational dimensions with regulatory checklists (GDPR, DORA, NIS2, SOX). Use when: (1) Evaluating new vendors or technology providers, (2) Conducting third-party risk assessments for procurement, (3) Performing critical vendor due diligence for regulatory compliance, (4) Creating vendor onboarding documentation, (5) Establishing ongoing vendor monitoring processes, (6) Assessing vendor concentration risk, or (7) Generating executive-level vendor risk reports.
tech-contract-negotiation-patrick-munro
Guide to negotiating technology services agreements, professional services contracts, and commercial B2B transactions. Provides three-position frameworks (provider-favorable, balanced, client-favorable), deal-size tactics, objection handling templates, and concession roadmaps. Use when: (1) Developing negotiation strategies for SaaS, cloud, or managed services agreements, (2) Preparing position papers and fallback positions, (3) Responding to counterparty objections and demands, (4) Creating concession roadmaps that protect critical interests, (5) Assessing tactics based on deal value and leverage, or (6) Structuring balanced outcomes for liability, IP, payment, SLA, or warranty provisions.
statute-analysis-rafal-fryc
Guide for reading, interpreting, and applying statutes, regulations, and rules in legal and compliance contexts. Use when the user asks about (1) how to read and interpret statutes, regulations, or rules, (2) statutory interpretation methods and canons of construction, (3) understanding legislative intent, (4) applying statutes to specific legal situations, (5) extracting requirements from legal text, (6) distinguishing between different types of legal requirements, or (7) cross-jurisdictional compliance analysis.
skill-creator-openai
Guide for creating effective skills. Use when users want to create a new skill (or update an existing skill) that extends the model's capabilities with specialized knowledge, workflows, or tool integrations.
skill-creator-anthropic
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.