Token导航 LogoToken导航TokenDH.com
开发external-servicegithub未标认证来源可访问许可证需确认审计通过

vscode-extension-builderVS Code extension 构建器

Agent Skill

vscode-extension-builder 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

343

周安装

14

GitHub Stars

公开资料未说明

下载量

110
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vscode-extension-builder(VS Code extension 构建器)
来源仓库:https://github.com/prulloac/agent-skills
仓库路径:skills/vscode-extension-builder
安装命令:
npx skills add https://github.com/prulloac/agent-skills --skill vscode-extension-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/prulloac/agent-skills --skill vscode-extension-builder

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理和分析。
  • 可在 Codex、Claude 等平台中协助跟踪项目进展和代码审查流程。
  • 安装方式:通过 npx 从 prulloac/agent-skills 仓库添加技能。
  • 注意:使用前请确认权限范围、维护状态及是否触发联网或文件读写操作。

SKILL.md

VS Code Extension Builder

Overview

This skill guides the development of Visual Studio Code extensions by helping navigate the extensive VS Code Extension API documentation and providing structured guidance for common extension development tasks.

Documentation Base

All VS Code extension development guidance is based on the official documentation at: https://code.visualstudio.com/api

When assisting users, fetch relevant documentation pages to provide accurate, up-to-date information.

Official Documentation References

- Step-by-step guide for scaffolding and running your first extension - Yeoman generator setup and project creation - Quick iteration with Extension Development Host - Essential debugging and testing techniques

- File structure and configuration explanation - package.json manifest details - Extension entry point (activate and deactivate functions) - Implicit activation events (VS Code 1.74.0+)

- Next steps after creating your first extension - Navigation to specialized guides and samples - Testing, publishing, and CI/CD resources

Core Workflow

1. Understand User Intent

First, determine what the user wants to accomplish with their extension:

Common extension types:

  • Commands & UI extensions - Add commands, menus, keybindings, status bar items
  • Language support - Syntax highlighting, IntelliSense, diagnostics, formatting
  • Themes - Color themes, file icon themes, product icon themes
  • Webviews - Custom UI panels with HTML/CSS/JavaScript
  • Debuggers - Debug adapter integrations
  • Source control - SCM provider integrations
  • Tree views - Custom sidebar explorers
  • AI/Chat extensions - Chat participants, language model tools
  • Testing - Test provider integrations
  • Notebook support - Custom notebook renderers

2. Fetch Relevant Documentation

Based on the user's intent, fetch the appropriate documentation:

For getting started (Getting Started Track):

For capability planning:

For specific features, use the extension guides:

- Language Model Tool: https://code.visualstudio.com/api/extension-guides/ai/tools - Chat Participant: https://code.visualstudio.com/api/extension-guides/ai/chat - MCP Dev Guide: https://code.visualstudio.com/api/extension-guides/ai/mcp

For UX best practices:

For API reference:

For testing and publishing:

For advanced topics:

3. Guide Implementation

After fetching documentation, provide step-by-step guidance:

  1. Project setup - Use Yeoman generator or guide manual setup
  2. Package.json configuration - Help define contribution points
  3. Core implementation - Provide code guidance based on documentation
  4. Testing - Help set up extension testing
  5. Debugging - Guide F5 debugging setup
  6. Publishing - Assist with vsce packaging

Quick Start Pattern

For new extensions, always start with:

# Install dependencies (if needed)
npm install -g yo generator-code

# Or use npx without global install
npx --package yo --package generator-code -- yo code

Guide users through the prompts based on their extension type.

Key Concepts to Explain

Activation Events

When extensions are loaded (see https://code.visualstudio.com/api/references/activation-events):

  • onCommand: - When a command is invoked
  • onLanguage: - When a file of specific language is opened
  • onView: - When a view is expanded
  • workspaceContains: - When workspace matches a pattern
  • onDebug - When debug session starts
  • * - On startup (use sparingly, impacts performance)

Important: Starting with VS Code 1.74.0, commands declared in contributes.commands automatically activate extensions without explicit onCommand entries.

Contribution Points

Static declarations in package.json that extend VS Code (see https://code.visualstudio.com/api/references/contribution-points):

  • commands - Define commands available in Command Palette
  • menus - Add commands to UI menus
  • keybindings - Define keyboard shortcuts
  • views - Create custom sidebar views
  • viewsContainers - Define view containers (sidebars, panels)
  • configuration - Define configuration settings
  • languages - Register new language support
  • grammars - Define syntax highlighting rules
  • themes - Register color themes
  • debuggers - Register debug adapters
  • snippets - Define code snippets
  • taskDefinitions - Define custom task types
  • semanticTokenTypes/Modifiers - Extend semantic highlighting
  • walkthroughs - Create interactive extension walkthroughs
  • notebookProvider - Register notebook renderers
  • customEditors - Register custom editor providers

Manifest Best Practices

For optimal marketplace presentation:

  • Use displayName and description clearly and concisely
  • Set categories from allowed values for better discoverability
  • Provide icon (PNG, 128x128 minimum) and galleryBanner for visual appeal
  • Include repository, bugs, and homepage in resources section
  • Use keywords array (up to 30) for search optimization
  • Set appropriate engines.vscode version (don't use *)
  • Configure extensionPack for bundling related extensions
  • Declare extensionDependencies if your extension relies on others
  • Mark capabilities for untrustedWorkspaces and virtualWorkspaces support

For pricing and availability:

  • Use pricing field (Free/Trial)
  • Set preview: true for beta extensions
  • Use preview for extensions not ready for production

Extension Anatomy

Understanding the core components of VS Code extensions:

File Structure:

.
├── .vscode
│   ├── launch.json     # Debug configuration for F5 debugging
│   └── tasks.json      # Build task configuration (TypeScript compilation)
├── .gitignore
├── README.md
├── src
│   └── extension.ts    # Main extension code (entry point)
├── package.json        # Extension manifest
└── tsconfig.json       # TypeScript configuration

package.json - Critical Fields:

  • name - Extension identifier (lowercase, no spaces)
  • displayName - Human-readable name for Marketplace
  • version - SemVer version number
  • publisher - Publisher identifier
  • description - Short description of functionality
  • engines.vscode - Minimum VS Code version (e.g., "^1.80.0")
  • main - Entry point to extension (compiled JavaScript)
  • browser - Entry point for Web extensions
  • activationEvents - When the extension is activated
  • contributes - Static declarations of extension capabilities
  • categories - Marketplace categories for discoverability
  • icon - Extension icon (128x128 pixels minimum)
  • license - License information
  • repository - Repository URL

Extension Entry File (extension.ts/js):

  • activate(context) - Called when extension activates; setup your extension here
  • deactivate() - Called when extension deactivates; clean up resources here
  • Disposables must be added to context.subscriptions for proper cleanup

Key Modern Features (VS Code 1.74.0+):

  • Implicit activation events: Commands declared in contributes.commands automatically activate extensions
  • No need for explicit onCommand activation events
  • Reduces startup impact by lazy-loading extensions only when needed

Common Patterns

Testing Your Extension

Modern testing approach using the VS Code Test CLI:

# Install test dependencies
npm install --save-dev @vscode/test-cli @vscode/test-electron

Configuration (.vscode-test.js):

const { defineConfig } = require('@vscode/test-cli');
module.exports = defineConfig({ files: 'out/test/**/*.test.js' });

Run tests:

npm test

Key testing features:

  • Extensions run in Extension Development Host with full API access
  • Mocha test framework by default
  • Can debug tests with VS Code's debugger
  • Support for multiple test configurations
  • Workspace folder support during testing
  • CI/CD integration ready

See https://code.visualstudio.com/api/working-with-extensions/testing-extension for detailed setup.

Debugging Your Extension

Quick Debug with F5:

  1. Open extension project in VS Code
  2. Press F5 or run Debug: Start Debugging from Command Palette
  3. Extension Development Host window opens with your extension loaded
  4. Set breakpoints by clicking line numbers
  5. Use Debug Console to evaluate expressions
  6. Use Run and Debug panel to inspect variables

Key debugging features:

  • Full Node.js debugging capabilities
  • Hover over variables to see values
  • Watch expressions and call stacks
  • VS Code's built-in debugger works with extensions

Modern VS Code Features (1.74.0+)

Implicit Command Activation

  • Commands in contributes.commands auto-activate the extension
  • Reduces explicit configuration needed
  • Improves extension startup time

Web Extensions

Workspace Trust

AI and Language Model Integration

Extension Marketplace Features

  • extensionPack for bundling extensions
  • extensionDependencies for runtime dependencies
  • extensionKind for remote/local execution preference
  • Pricing models (Free/Trial)
  • Preview flag for beta releases

Common Patterns and Examples

Registering a Command

import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
    // Register a command - no explicit onCommand needed (VS Code 1.74.0+)
    let disposable = vscode.commands.registerCommand('extension.commandName', () => {
        vscode.window.showInformationMessage('Hello World!');
    });

    context.subscriptions.push(disposable);
}

export function deactivate() {}

In package.json:

{
  "contributes": {
    "commands": [
      {
        "command": "extension.commandName",
        "title": "My Command"
      }
    ]
  }
}

Creating a Tree View

Provide hierarchical data in sidebar:

Building a Webview

Custom HTML UI for complex interfaces:

Language Server Protocol

For rich language support:

Storing Data

  • Global: context.globalState.update(key, value)
  • Workspace: context.workspaceState.update(key, value)
  • Configuration: vscode.workspace.getConfiguration()

Showing UI Elements

// Information message
vscode.window.showInformationMessage('Message');

// Quick pick for selection
const pick = await vscode.window.showQuickPick(['Option 1', 'Option 2']);

// Input box for text
const input = await vscode.window.showInputBox({ prompt: 'Enter text' });

// Progress indication
await vscode.window.withProgress({
    location: vscode.ProgressLocation.Notification,
    title: 'Processing...'
}, async (progress) => {
    // Long-running operation
});

Documentation Navigation Strategy

  1. Start broad - Fetch overview pages to understand scope
  2. Go specific - Fetch detailed guides for the exact feature needed
  3. Check references - Fetch API references for specific types/methods
  4. Review examples - Point users to sample extensions at https://github.com/microsoft/vscode-extension-samples

Extension Capabilities and Restrictions

What Extensions Can Do

  • Extend VS Code UI (sidebars, panels, status bar, decorations, etc.)
  • Add commands and keybindings
  • Create custom views with TreeView API
  • Build custom UI with Webview API
  • Provide language features (IntelliSense, diagnostics, formatting, etc.)
  • Integrate debuggers and test frameworks
  • Add themes and icons
  • Register configuration settings
  • Contribute walkthroughs and tutorials
  • Integrate with Source Control providers
  • Build custom editors and notebooks

Important Restrictions

  • No DOM access - Cannot access VS Code's internal DOM directly
  • No custom CSS - Cannot inject custom stylesheets into VS Code UI
  • Runs in Extension Host - Extensions run in a separate process
  • Must use VS Code API - Cannot use undocumented internal APIs
  • Performance constraints - Heavy operations impact all extensions

Rationale: These restrictions ensure stability, performance, and security while allowing VS Code to evolve freely without breaking extensions.

Best Practices

  1. Minimal Startup Impact

- Use activation events wisely; avoid * unless necessary - Lazy-load dependencies and APIs - Rely on implicit activation for declared commands (VS Code 1.74.0+)

  1. Resource Management

- Always dispose of resources in deactivate() or add to context.subscriptions - Clean up event listeners, file watchers, and language clients - Prevent memory leaks by removing references

  1. Type Safety

- Use TypeScript for better developer experience - Install correct @types/vscode version matching engines.vscode - Enable strict TypeScript compilation

  1. Error Handling

- Catch and handle errors in command implementations - Provide meaningful error messages to users - Log errors to extension output channel for debugging

  1. Performance

- Bundle extensions for production (webpack/esbuild) - Use Tree Data Provider for large datasets with pagination - Minimize async operations in activation

  1. UX Guidelines

- Follow https://code.visualstudio.com/api/ux-guidelines/overview - Use standard notification types: information, warning, error - Implement quick picks for user selections - Respect workspace trust settings

  1. Testing

- Write integration tests using VS Code's test runner - Use https://code.visualstudio.com/api/working-with-extensions/testing-extension - Run tests with npm run test (Mocha-based) - Use @vscode/test-cli for modern test setup

  1. Publishing

- Follow marketplace guidelines at https://code.visualstudio.com/api/working-with-extensions/publishing-extension - Include comprehensive README with examples - Use vsce (Visual Studio Code Extension Manager) for packaging - Implement CI/CD with GitHub Actions or Azure DevOps

Progressive Assistance Levels

For Absolute Beginners

Goal: Get them building and debugging quickly

  1. Guide through "Your First Extension" walkthrough
  2. Explain the three core concepts:

- Activation Events: When extension loads - Contribution Points: What the extension contributes to VS Code - VS Code API: How to interact with VS Code

  1. Walk through Yeoman scaffolding step-by-step
  2. Show how to modify the extension and test with F5
  3. Explain package.json basics (name, version, main, engines)
  4. Show how to register and run a command

Resources:

For Intermediate Users

Goal: Build feature-rich extensions independently

  1. Fetch specific extension guide documentation
  2. Explain API patterns and best practices
  3. Guide through VS Code API exploration
  4. Help with:

- Configuration settings - File system operations - Tree views and sidebars - Webview implementation - Language features

  1. Assist with debugging techniques and issue diagnosis
  2. Help set up and run extension tests

Resources:

For Advanced Users

Goal: Build complex, production-grade extensions

  1. Point to proposed APIs for experimental features
  2. Help with Language Server Protocol integration
  3. Guide multi-extension architecture
  4. Assist with:

- Remote and web extension support - Custom editors and notebooks - Advanced tree view providers - Semantic highlighting - Debug adapter integration

  1. Help prepare for Marketplace publishing
  2. Advise on CI/CD setup

Resources:

Reference Documentation

For comprehensive guides on specific extension types and advanced patterns, see:

Read these references when users need deeper guidance on specific topics or navigation help through the official documentation.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.32%
按下载量换算37

Claude

30.25%
按下载量换算33

Cursor

17.76%
按下载量换算20

Gemini CLI

9.11%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills