VS

VS Code Extension Development

Toolkit for building and packaging VS Code extensions including React-based webview UIs.

Install

mkdir -p .claude/skills/vs-code-extension-development && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14256" && unzip -o skill.zip -d .claude/skills/vs-code-extension-development && rm skill.zip

Installs to .claude/skills/vs-code-extension-development

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Skill for developing, building, and packaging VS Code extensions with TypeScript + React webview
96 charsno explicit “when” trigger
Advanced

Key capabilities

  • Develop VS Code extensions with TypeScript
  • Build React-based webviews for extensions
  • Set up communication between extension backend and webview frontend
  • Configure extension settings in `package.json`
  • Build and package `.vsix` files
  • Publish extensions to the marketplace

How it works

The skill outlines the architecture and workflow for VS Code extension development using TypeScript and React webviews. It details communication mechanisms, CDP connection flows, and build commands.

Inputs & outputs

You give it
TypeScript code for extension backend, React code for webview, configuration settings
You get back
VS Code extension (`.vsix` file), functional webview, inter-process communication

When to use VS Code Extension Development

  • Build VS Code extension webviews
  • Set up message bridges between extension and UI
  • Package VS Code extensions

About this skill

VS Code Extension Development Skill

Project Architecture

mtips5s_mcp_codex/
├── src/                          ← Extension backend (TypeScript)
│   ├── extension.ts              ← Entry point, activate/deactivate
│   ├── services/
│   │   ├── AutoRetryService.ts   ← Core auto-retry logic, orchestrator
│   │   ├── CDPHandler.ts         ← CDP WebSocket connections, DOM manipulation
│   │   └── Relauncher.ts         ← Reconnection & restart logic
│   └── ui/
│       └── SidePanelProvider.ts  ← Webview provider, message bridge
├── webview/                      ← Frontend (React + Vite + shadcn/ui)
│   ├── src/
│   │   ├── App.tsx               ← Main webview component
│   │   ├── components/ui/        ← shadcn/ui components
│   │   └── index.css             ← Styles
│   └── vite.config.ts
├── dist/                         ← Build output (DO NOT EDIT)
├── scripts/cdp-tools/            ← CDP debug scripts
├── docs/                         ← Documentation
└── package.json                  ← Extension manifest

Key Concepts

1. Extension ↔ Webview Communication

Webview (React)  ←→  SidePanelProvider  ←→  AutoRetryService  ←→  CDPHandler
     postMessage()      onDidReceiveMessage()                         WebSocket
  • Webview → Extension: vscode.postMessage({ type, data })
  • Extension → Webview: this._view.webview.postMessage({ type, data })
  • Message types defined in SidePanelProvider.ts switch cases

2. CDP Connection Flow

1. Scan ports 31902-31908 → find active port (31905)
2. GET /json/list → list page targets
3. Connect WebSocket to each target
4. Inject JS via Runtime.evaluate
5. Monitor DOM for retry buttons → auto-click

3. Configuration (package.json contributes.configuration)

SettingDefaultDescription
smartAutoRetry.enabledtrueEnable extension
smartAutoRetry.autoStartfalseAuto-start on launch
smartAutoRetry.cdpPort31905CDP port
smartAutoRetry.cdpPortRange3Port scan range
smartAutoRetry.pollInterval1000Retry check interval (ms)
smartAutoRetry.cooldown5000Cooldown after click (ms)

Build Commands

# Build everything (extension + webview)
npm run build

# Build extension only (fast, ~1s)
npm run build:extension

# Build webview only
npm run build:webview

# Watch mode (extension)
npm run dev

# Watch mode (webview)
npm run dev:webview

# Package .vsix
npm run package

# Publish to marketplace
npm run publish

Dev Workflow

  1. Sửa code trong src/ hoặc webview/src/
  2. npm run build
  3. Reload Window trong Antigravity (Cmd+Shift+P → Reload)
  4. Test từ sidebar panel

Thêm command mới

  1. Thêm entry trong package.jsoncontributes.commands
  2. Register handler trong extension.tsvscode.commands.registerCommand
  3. Build & reload

Thêm setting mới

  1. Thêm property trong package.jsoncontributes.configuration.properties
  2. Đọc trong service: vscode.workspace.getConfiguration('smartAutoRetry').get('key')

Thêm message type mới (Webview ↔ Extension)

  1. Webview React: vscode.postMessage({ type: 'newAction', data: {...} })
  2. SidePanelProvider: thêm case trong switch (message.type)
  3. Xử lý logic và gửi response: postMessage({ type: 'newActionResult', data: {...} })

When not to use it

  • When needing to edit files in the `dist/` directory directly
  • When developing extensions without a React webview
  • When using `npm run build` for only extension or webview specific builds

Limitations

  • The `dist/` directory should not be edited manually
  • Requires specific `npm run` commands for building extension or webview separately
  • Message types are defined in `SidePanelProvider.ts` switch cases

How it compares

This skill provides a specific architectural pattern and workflow for VS Code extensions with React webviews, offering a structured approach to inter-process communication and build processes, unlike generic extension development guides.

Compared to similar skills

VS Code Extension Development side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
VS Code Extension Development (this skill)05moReviewAdvanced
zustand1132moNo flagsIntermediate
web-artifacts-builder493moReviewIntermediate
landing-page-guide-v2489moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

zustand

lobehub

Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.

113434

web-artifacts-builder

anthropics

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

49162

landing-page-guide-v2

bear2u

Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.

48105

react

lobehub

React component development guide. Use when working with React components (.tsx files), creating UI, using @lobehub/ui components, implementing routing, or building frontend features. Triggers on React component creation, modification, layout implementation, or navigation tasks.

3480

frontend-prompt-generator

gharam1234

Generate structured prompts for frontend development tasks following established patterns. Use when the user requests prompts for wireframes, UI implementation, data binding, or routing functionality in React/Next.js projects with specific formatting requirements (Cursor rules, file paths, test-driven development).

679

react-dev

davila7

This skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components are mentioned. Covers type-safe patterns for React 18-19 including generic components, proper event typing, and routing integration (TanStack Router, React Router).

732

Search skills

Search the agent skills registry