vscode-ext-commands
它能做什么
这个工具可以帮你在 VS Code 扩展中添加或更新命令,并确保命令符合 VS Code 的规范和最佳实践。
适用场景
- ✓为你的 VS Code 扩展添加新命令时。
- ✓更新扩展中已有的命令时。
- ✓确保命令遵循 VS Code 的约定时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/vscode-ext-commands/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何按照最佳实践,为我的 VS Code 扩展添加一个新命令?”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会检查命令是否有标题、是否遵循命名规范,以及是否能正确显示。它还能帮你整理命令,使其在命令面板或 VS Code 侧边栏中呈现得更合理。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
VS Code extension command contribution
This skill helps you to contribute commands in VS Code extensions
When to use this skill
Use this skill when you need to:
- Add or update commands to your VS Code extension
Instructions
VS Code commands must always define a title, independent of its category, visibility or location. We use a few patterns for each "kind" of command, with some characteristics, described below:
Regular commands: By default, all commands should be accessible in the Command Palette, must define a
category, and don't need anicon, unless the command will be used in the Side Bar.Side Bar commands: Its name follows a special pattern, starting with underscore (
_) and suffixed with#sideBar, like_extensionId.someCommand#sideBarfor instance. Must define anicon, and may or may not have some rule forenablement. Side Bar exclusive commands should not be visible in the Command Palette. Contributing it to theview/titleorview/item/context, we must inform order/position that it will be displayed, and we can use terms "relative to other command/button" in order to you identify the correctgroupto be used. Also, it's a good practice to define the condition (when) for the new command is visible.
常见问题
VS Code 中的“命令”是什么?
命令是你可以在 VS Code 中执行的操作,例如打开文件、格式化代码,或运行扩展中的某个特定函数。
什么是“命令面板”(Command Palette)?
它是 VS Code 中的一个搜索框,你可以在里面输入内容,快速找到并执行命令。
“侧边栏命令”是什么?
这些命令会出现在 VS Code 侧边栏的特定位置,例如按钮或菜单,而不会出现在通用的命令面板中。
详情
作者的原始描述
Guidelines for contributing commands in VS Code extensions. Indicates naming convention, visibility, localization and other relevant attributes, following VS Code extension development guidelines, libraries and good practices
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7472
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。