VSCode 2026 年第一个版本支持了 Agent Skills

更新日期: 2026-01-10 阅读次数: 44 字数: 1211 分类: Vim

VSCode 2026 年的第一个版本新增了 Agent Skills 功能,这也是最近最火的一个概念。 之前是看 Claude Code 的团队经常提到 Agent Skills,说的神乎其神的,这次 GitHub Copilot 也支持了这个功能,那说明这个功能确实有它的价值所在,我就必须了解一下了。要不真得跟不上时代。

什么是 Agent Skills

VS Code now supports Agent Skills, allowing you to teach the coding agent new capabilities and provide domain-specific knowledge. Agent Skills are folders of instructions, scripts, and resources that GitHub Copilot can load when relevant to perform specialized tasks.

Agent Skills, 翻译中文就是“代理技能”。它允许你教会编码代理(GitHub Copilot)一些新的能力,并提供特定领域的知识。

Agent Skills 在电脑上是一个文件夹,里面包含了一些指令、脚本和资源,当 GitHub Copilot 需要执行一些特定任务时,可以加载这些内容,从而扩展它的功能。

这样描述,还是有点抽象。对我来说,平时经常要开发一些网页,或者小程序界面。 其实风格是固定的,比如使用具体哪个 css 框架,以及界面风格。 每次开发,都要重复告诉 Copilot 这些要求,挺麻烦的。 虽然都是通过复制、黏贴之前保存的 prompt 提示词模板,稍加修改来实现的,但这样效率还是不高。

如果能把这些要求,直接做成一个 Agent Skill,那么每次需要用到的时候,Copilot 就能自动加载这些内容,省去了重复输入的麻烦。我觉得,这就是 Agent Skills 的最大价值所在。特别是对于团队开发来说,大家可以共享一些常用的 Agent Skills,提高整体的开发效率,也能保证界面风格和代码风格的一致性。

Agent Skills 存储在哪里

分两种级别,一种是项目级的,一种是全局级的。

项目级的,放在当前 workspace 的 .github/skills 目录下。 或者 .claude/skills/ 目录下。这个 claude 的用法是为了兼容 Claude Code 的 Agent Skills。 我还是使用 .github/skills 就行,毕竟 claude 也不欢迎我使用。

全局级的,放在用户目录下的 ~/.github/skills 目录下; 或者 ~/.claude/skills 目录下。也是为了兼容 Claude Code 的用法。

启用设置

chat.useAgentSkills

这个版本默认是没有启用的,需要手动开启。

我可以用到的使用场景

  • 设置统一的界面风格
  • 让 AI 提交 git commit 信息时,使用中文
  • 设置后端及前端的代码技术栈,和代码风格
  • 让 AI 自动调用我的自动化工具,创建样板代码

如何创建一个 Skill

以网页风格为例:

在项目级 skills 的 .github/skills/ 目录下,创建一个新的文件夹,比如 web-style。 或者在全局级 skills 的 ~/.github/skills/ 目录下,创建一个新的文件夹,比如 web-style。

在 web-style 文件夹下,创建一个名为 SKILL.md 的文件,内容如下:

---
name: skill-name
description: Description of what the skill does and when to use it
---

# Skill Instructions

Your detailed instructions, guidelines, and examples go here...

格式规范:

  • name,必填,看起来只能用英文。A unique identifier for the skill. Must be lowercase, using hyphens for spaces (for example, webapp-testing). Maximum 64 characters.
  • description,必填,A description of what the skill does and when to use it. Be specific about both capabilities and use cases to help Copilot decide when to load the skill. Maximum 1024 characters.

body 部分需包含:

  • What the skill helps accomplish
  • When to use the skill
  • Step-by-step procedures to follow
  • Examples of the expected input and output
  • References to any included scripts or resources

这可有点复杂了,我还是找个开源的 Skill 再此基础上改造吧。

开源的 skills

  • https://github.com/github/awesome-copilot 里面不但有 skills, 还有 prompt 提示词之类的。
  • https://github.com/anthropics/skills Claude Code 官方的 skills 仓库。

不过,找了几个 SKILL.md 文件看了一下,都异常的复杂,远远超出了我目前的需求。 而且,我有种感觉,这不应该是我个人需要维护的玩意。。。更像是代码大模型内置的一部分东西。

还是去 YouTube 上找几个视频看看别人是怎么使用 Agent Skills 的吧。

参考

  • https://code.visualstudio.com/docs/copilot/customization/agent-skills

关于作者 🌱

我是来自山东烟台的一名开发者,有感兴趣的话题,或者软件开发需求,欢迎加微信 zhongwei 聊聊,或者关注我的个人公众号“大象工具”, 查看更多联系方式