Agent Skills
Presents a slide deck explaining the Agent Skills concept, its relationship to Tool Use and MCP, and how major platforms implement it.
What this file does
Presents a slide deck explaining the Agent Skills concept, its relationship to Tool Use and MCP, and how major platforms implement it.
When to use it
- Preparing a team presentation on AI agent capabilities
- Comparing Skills support across Claude Code, Codex CLI, OpenCode, Cursor, and VS Code
- Understanding the difference between Tool Use, Skills, and MCP
- Learning the SKILL.md file structure and injection mechanisms
theme: default background: https://source.unsplash.com/collection/94734566/1920x1080 class: text-center highlighter: shiki lineNumbers: false info: |
Agent Skills Presentation
Shared by FE Team drawings: persist: false transition: slide-left title: Agent Skills
Agent Skills
<div class="pt-12 opacity-60 text-sm"> 2025-12-24 • Frontend Team Sharing </div>目录
<div class="grid grid-cols-2 gap-4 mt-8"> <div>1. 什么是 Skills?
核心概念与 Anthropic 愿景
2. 行业现状
主流平台支持情况对比
3. 实现解析
Codex 与 OpenCode 源码分析
</div> <div>4. Skills 实战
仓库内复现与演示
5. 项目 Demo
内部项目应用展示
</div> </div>1. 什么是 Skills?
<div class="text-xl mt-4 opacity-80"> 从 "Chat" 到 "Agent" 的关键跃迁 </div> <div class="grid grid-cols-2 gap-8 mt-12"> <div class="border-l-4 border-blue-500 pl-4">Tool Use / Function Calling [1]
赋予 LLM "手" 的能力。 不再只是生成文本,而是生成结构化的执行指令。
</div> <div class="border-l-4 border-green-500 pl-4">Anthropic 的愿景 [3]
Computer Use: 让 AI 像人一样操作电脑。
Agentic Loop:
- Reasoning (思考)
- Planning (规划)
- Tool Use (调用工具)
- Observation (观察结果)
Skills vs Tool Use vs MCP
<div class="mt-8">| 概念 | 定义 | 侧重点 |
|---|---|---|
| Tool Use | 基础能力 | 底层 API,模型调用函数的能力 |
| Skills | 能力封装 | 面向用户/开发者的上下文注入包 (Prompt + Tools) [4] |
| MCP | 通信协议 | 标准化连接,解决"如何连接万物"的问题 [5] |
<div class="absolute bottom-4 left-8 text-xs opacity-40"> [4] Agent Skills Specification: https://agentskills.io <br> [5] Model Context Protocol: https://modelcontextprotocol.io </div>Skills 本质:一种标准化的上下文注入机制,包含 "Prompt (怎么做)" + "Tools (用什么做)"。
2. 行业现状:主流平台支持 [2]
<div class="text-sm">| 平台 | 配置方式 | 特点 |
|---|---|---|
| Claude Code | .claude/skills/SKILL.md | 最早提出 Skills 概念,标准化的 SKILL.md 格式 [2] |
| Codex CLI | .codex/skills/SKILL.md | 最完善,支持 Scripts, Assets, 自动发现 [7] |
| OpenCode | .opencode/skills/SKILL.md | 兼容 Anthropic 规范,开源实现 [8] |
| Cursor | .cursor/skills/ + .cursorrules | 支持 Skills + MCP,.cursorrules 用于项目规则 [6] |
| VS Code | .github/skills/SKILL.md | Copilot Workspace 的标准,跨工具可移植 [10] |
| Gemini CLI | 不支持 Skills | 使用 Extensions 机制 + MCP 作为替代方案 |
3. 具体实现深度解析
<div class="grid grid-cols-2 gap-8 mt-8"> <div>Codex: "Index + Injection" 三层架构 [7]
- Manifest Phase: 启动时扫描多级目录, 在 System Prompt 中生成
## Skills索引章节 (名称 + 描述). - Injection Phase: 识别到
$SkillName或语义匹配后, 异步读取SKILL.md全文并注入对话上下文. - Extension Phase: 按需执行
scripts/中的确定性工具或读取references/大文件.
OpenCode: "Two-Phase" Tool Loading [8]
- Manifest Phase: 将所有可用 Skill 的名称和描述注入到
skill工具的description中 (节省 Token). - Execution Phase:
- 模型判断需要技能时调用
skill({name: "..."}). - 完整
SKILL.md内容作为 Tool Output 返回并注入 Context.
- 模型判断需要技能时调用
- AGENTS.md: 作为 Global Rules, 在会话初始化时直接拼接到 System Prompt 顶部.
4. SKILL.md 结构解析
<div class="grid grid-cols-2 gap-8 mt-8"> <div> 以 Codex/OpenCode 标准为例,一个 Skill 通常包含:- Frontmatter: 元数据 (名称, 描述) [4]
- Instructions: 给 LLM 的系统提示词
- Examples: 少样本学习 (Few-shot)
# Instructions
You are an expert React developer.
When asked to create a component:
1. Use functional components
2. Use TypeScript interfaces for props
3. Use Tailwind CSS for styling
# Examples
User: Create a Button
Assistant:
\`\`\`tsx
interface ButtonProps { ... }
export const Button = ...
\`\`\`
</div>
<div class="absolute bottom-4 left-8 text-xs opacity-40">
[4] Agent Skills Specification: https://agentskills.io/specification
</div>
Skills 实战案例
我们将创建一套标准的 Skills 并集成到当前仓库中。
<div class="grid grid-cols-2 gap-4 mt-8"> <div class="bg-gray-100 p-4 rounded dark:bg-gray-800 border-l-4 border-purple-500"> <div class="text-xl font-bold mb-2">🌍 i18n Workflow</div> <div class="text-sm opacity-80 mb-2">全流程国际化重构</div> <div class="text-xs text-gray-500">Scan -> Keys -> Code -> JSON</div> </div> <div class="bg-gray-100 p-4 rounded dark:bg-gray-800 border-l-4 border-orange-500"> <div class="text-xl font-bold mb-2">📊 Enterprise Table</div> <div class="text-sm opacity-80 mb-2">B端复杂表格生成</div> <div class="text-xs text-gray-500">AntD Pro + URL Sync + Types</div> </div> </div>References
- [1] OpenAI Function Calling: https://platform.openai.com/docs/guides/function-calling
- [2] Claude Skills Explained: https://claude.com/blog/skills-explained
- [3] Anthropic Computer Use: https://www.anthropic.com/news/computer-use
- [4] Agent Skills Specification: https://agentskills.io
- [5] Model Context Protocol (MCP): https://modelcontextprotocol.io
- [6] Cursor Skills: https://cursor.sh/docs/context/skills
- [7] OpenAI Codex CLI: https://github.com/openai/codex
- [8] OpenCode: https://github.com/sst/opencode
- [9] Claude Skills Explained (YouTube): https://www.youtube.com/watch?v=fOxC44g8vig
- [10] VS Code Agent Skills: https://code.visualstudio.com/docs/copilot/customization/agent-skills
What's inside
10 slides covering definition, industry comparison, implementation analysis, SKILL.md anatomy, and two case studies
Change this for your project
- Replace
2025-12-24with your presentation date - Replace
Frontend Team Sharingwith your team name - Replace the two case study titles and descriptions in the 'Skills 实战案例' slide with your own examples
Where it goes
Use as the system prompt for your model call, or as the base instructions in your agent framework.
Worth borrowing
- Comparison table of Skills support across platforms helps teams choose their tooling
- Three-layer architecture diagram (Manifest, Injection, Extension) clarifies how Skills are loaded at runtime
Related Documents
Character Persona
Defines a Fallout 2 roleplay persona for an LLM agent: charming rogue with social-first combat and moral code.
Claude Tool Use (Function Calling) Documentation
Teaches how to define and use Claude tool use (function calling) with Python, including schema rules, execution patterns, and best practices.
Gemini by Example
Collects 20+ Gemini API code examples covering text, images, audio, video, PDFs, agents, and token counting.
DiffusionDB
Documents a 14-million-image prompt dataset scraped from the Stable Diffusion Discord server, with metadata and download instructions.