/knowledge-base:vscode-extension-devfrom knowledge-base
Scaffolds VSCode extensions from project init to dual-platform release (VSCE/OVSX). Generates templates, configs, and CI workflows.
Ships in knowledge-base. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
gsd:workflow gsd:meta vscode-extension-dev scaffold-to-release </gsd:meta> gsd:goal产出可编译、可调试、可打包并可发布的 VSCode 插件项目。</gsd:goal> <gsd:phase id="1" name="detect-and-init">检测现有项目状态并建立标准目录结构与基础元数据。</gsd:phase> <gsd:phase id="2" name="configure-and-generate">生成核心配置文件与功能模板代码,确保本地编译通过。</gsd:phase> <gsd:phase id="3" name="package-and-publish">执行打包、版本发布与自动化工作流配置,完成交付验证。</gsd:phase> </gsd:workflow>
完整的 VSCode 插件开发体系搭建工具,支持从零创建到双平台自动发布。
| 模式 | 说明 | 使用场景 |
|---|---|---|
yolo | 自动执行,仅关键步骤确认 | 熟悉流程、快速迭代 |
interactive | 每步确认,详细引导 | 首次使用、学习流程 |
默认: interactive
gh) - 用于配置 Secrets目标: 确定项目状态,创建或更新项目结构
步骤:
# 检测是否已有 VSCode 插件项目
if [ -f package.json ] && grep -q '"engines".*"vscode"' package.json; then
echo "✅ 检测到现有 VSCode 插件项目"
jq '{name, displayName, version, publisher}' package.json
else
echo "📦 需要初始化新项目"
fi
| 类型 | 说明 | 包含内容 |
|---|---|---|
| 基础插件 | 最小化模板 | 命令、激活事件 |
| 状态栏插件 | Quick AI 风格 | 状态栏图标、配置项、命令 |
| WebView 插件 | 带 UI 界面 | WebView、消息通信 |
| 语言支持 | 语法高亮、补全 | Grammar、Language Configuration |
| 自定义 | 选择需要的模块 | 按需组合 |
<project-name>/
├── .vscode/
│ ├── launch.json # 调试配置
│ ├── tasks.json # 任务配置
│ └── extensions.json # 推荐扩展
├── .github/workflows/
│ └── release.yml # 自动发布
├── src/
│ ├── extension.ts # 入口文件
│ ├── commands/ # 命令模块
│ └── utils/ # 工具函数
├── package.json
├── tsconfig.json
├── webpack.config.js
├── .eslintrc.json
├── .vscodeignore
├── README.md
├── README.zh-CN.md
└── CHANGELOG.md
Checkpoint: 项目目录结构创建完成,package.json 包含 engines.vscode 字段
初始化项目或新增功能模块时,读取 references/project-templates.md,按需选用:
package.json、tsconfig.json、webpack.config.js.vscode/launch.json、.vscodeignoreextension.tspackage.json contributes 配置只复制当前项目需要的模板,并保持项目已有配置与命名。
目标: 配置双平台自动发布
步骤:
echo "🔍 VSCode 插件发布配置检查"
echo -e "\n📋 GitHub Secrets:"
gh secret list 2>/dev/null | grep -E "VSCE_PAT|OVSX_PAT" || echo " ❌ 未配置"
echo -e "\n📋 GitHub Workflow:"
ls .github/workflows/release.yml 2>/dev/null && echo " ✅ 已创建" || echo " ❌ 未创建"
echo -e "\n📋 package.json:"
grep -q '"publisher"' package.json && echo " ✅ publisher 已配置" || echo " ❌ 缺少 publisher"
VSCode Marketplace Token (VSCE_PAT):
vsce-publish, Expiration=90天, Scopes=Marketplace → ManageOpen VSX Token (OVSX_PAT):
# 方式 1: gh CLI(推荐)
gh secret set VSCE_PAT # 粘贴 VSCE Token
gh secret set OVSX_PAT # 粘贴 OVSX Token
# 方式 2: 网页配置
# https://github.com/<username>/<repo>/settings/secrets/actions
.github/workflows/release.yml:
name: Release Extension
on:
push:
tags: ['v*.*.*']
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run publish:vsce
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- run: npm run publish:ovsx
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
- uses: softprops/action-gh-release@v2
with:
files: '*.vsix'
generate_release_notes: true
Checkpoint: gh secret list 显示 VSCE_PAT 和 OVSX_PAT
目标: 生成标准文档模板
# <Extension Name>
[中文文档](./README.zh-CN.md)
## Features
- Feature 1
- Feature 2
## Requirements
- VS Code 1.85.0+
- Node.js 18.x+
## Extension Settings
- `<extension-name>.command`: Command to execute
## Keyboard Shortcuts
| Command | Mac | Windows |
|---------|-----|---------|
| Quick Action | `Cmd+Shift+A` | `Ctrl+Shift+A` |
## License
MIT
# Change Log
## [0.0.1] - 2024-01-01
### Added
- Initial release
Checkpoint: README.md 和 CHANGELOG.md 存在且内容完整
# 1. 编译检查
pnpm run build
# 2. 本地打包测试
pnpm run package:vsix
# VSCode: Cmd+Shift+P → "Install from VSIX"
# 3. 发布配置检查
gh secret list | grep -E "VSCE_PAT|OVSX_PAT"
# 开发
pnpm install
pnpm run watch
# F5 启动调试
# 发布
npm version patch # 0.0.1 → 0.0.2
git push --follow-tags # 触发自动发布
当前阶段完成后:
pnpm run build && pnpm run package:vsixnpm version patch && git push --follow-tags恢复命令: /vscode-extension-dev --resume
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub wangjs-jacky/jacky-skills --plugin knowledge-base9 skills in this plugin
/chrome-ext-ai-script📖 参考方案 | AI 驱动的 Chrome Extension 架构方案:Plasmo + Vercel AI SDK,侧边栏对话生成并执行页面脚本。此为蒸馏产物,供开发时参考查阅。触发词:Chrome 扩展参考、AI 脚本方案、Plasmo 参考、侧边栏脚本方案/codex-env-configCodex 环境配置兼容入口:安装升级、环境迁移、运行配置、认证、代理、Responses WebSocket 与技能同步统一读取 codex-ops 对应能力及 operation。/gh-workflow-generator快速生成带 GitHub Actions Workflow 的自动化采集项目。当用户想要创建定时采集、数据处理、自动化发布的 GitHub 仓库时触发。/github-profile-coolify一键优化 GitHub Profile README(酷炫风格、Snake 动画、图卡健康检查与自动回退),适用于主页升级和图片失效排查场景。/llm-wikiLLM 驱动的 Obsidian 个人知识库管理。当需要评估、优化、索引 Obsidian vault,或讨论知识管理、wiki 构建、LLM 辅助笔记、索引优先检索时触发。/npm-publishnpm 发布兼容入口:发布包、配置 CI/Trusted Publishing、排查认证或版本冲突时,先读取 release-ops 的 npm 平台与 operation,按项目实际发布方式执行并自动维护经验。Other plugins' skills for the same job