claude
https://claude.ai/settings/connectors
Browse connectors --> install 即可
Codex
左下角 settings,MCP servers, add server, 填写名称,如果有 http://blabla/mcp 可以选择Stremable HTTP然后添加选项
vscode
可以 follow 官方教程:https://code.visualstudio.com/docs/copilot/customization/mcp-servers
举一个 playwright 的例子,打开 extension,搜索@mcp playwright, install,然后打开chat
Go to code.visualstudio.com, decline the cookie banner, and give me a screenshot of the homepage.
它就会照做了,记得中途给 approve。
查看 config,在 vscode 最上面的搜索框中,输入>MCP: List Servers, 然后输入一个 mcp 的名字,比如 playwright,然后就可以查看 config 了。
vscode copilot doc: https://code.visualstudio.com/docs/copilot/overview
1️⃣ Instructions(最基础)
作用:让 Copilot 永远按某种方式回答。
比如:
.github/copilot-instructions.md
示例:
Always use Python 3.11 syntax.
Prefer pandas over raw loops.
Write docstrings in NumPy style.
效果:
Copilot以后写代码都会遵守。
特点
- 自动生效
- 不用手动调用
- 通常是 repo 级规则
📌 官方解释: Custom instructions 为 Copilot 提供 持续的行为指导,帮助理解项目和开发规范。
2️⃣ Prompt Files
作用:把一个 prompt 做成 reusable command。
例如:
.github/prompts/refactor.prompt.md
内容:
Refactor this file:
- follow PEP8
- add type hints
- improve readability
然后你在 Copilot chat 里:
/refactor
就会执行这个 prompt。
📌 官方说法: Prompt files 是 可复用的 prompt 模板,用于常见任务。
3️⃣ Custom Agents
这是 更高级的东西。
你可以定义一个 AI 角色。
例如:
.github/agents/devops.agent.md
内容:
name: DevOps Agent
description: Help with CI/CD pipelines
Instructions:
- focus on GitHub Actions
- validate YAML
- suggest deployment improvements
然后你可以在 Copilot 里选:
@devops
它就变成 DevOps AI。
📌 官方解释: Custom agents 允许你创建 专门执行某类任务的 AI 角色。
4️⃣ Agent Skills(最强)
这是 Agent 的技能插件。
结构:
.github/skills/deploy/
SKILL.md
script.sh
Skill 里面可以:
- instructions
- scripts
- resources
AI 遇到相关任务会自动调用。
例如:
skill: create-release
steps:
1 generate changelog
2 bump version
3 create git tag
📌 官方定义: Agent Skills 是 包含 instructions、scripts、resources 的 workflow,用于增强 AI 的专门能力。
⭐ 最简单的理解方式
想象你在训练一个 AI 同事:
| 类型 | 相当于 |
|---|---|
| Instructions | 公司 handbook |
| Prompt Files | 快捷指令 |
| Custom Agents | 不同岗位员工 |
| Skills | 员工的专业技能 |