每个 ADK 开发者都应该知道的 5 种 Agent Skill 设计模式
When it comes to 𝚂𝙺𝙸𝙻𝙻.𝚖𝚍, developers tend to fixate on the format—getting the YAML right, structuring directories, and following the spec. But with more than 30 agent tools (like Claude Code, Gemini CLI, and Cursor) standardizing on the same layout, the formatting problem is practically obsolete.
说到 𝚂𝙺𝙸𝙻𝙻.𝚖𝚍,开发者往往专注于格式——正确编写 YAML、构建目录结构并遵循规范。但是,随着超过 30 个代理工具(如 Claude Code、Gemini CLI 和 Cursor)标准化采用相同的布局,格式问题几乎已经过时。
The challenge now is content design. The specification explains how to package a skill, but offers zero guidance on how to structure the logic inside it. For example, a skill that wraps FastAPI conventions operates completely differently from a four-step documentation pipeline, even though their 𝚂𝙺𝙸𝙻𝙻.𝚖𝚍 files look identical on the outside.
现在的挑战是内容设计。该规范解释了如何打包一个技能,但对如何结构化其内部逻辑没有任何指导。例如,一个包装 FastAPI 约定的技能与一个四步文档管道的操作完全不同,尽管它们的 \ud835\ude82\ud835\ude7a\ud835\ude78\ud835\ude7b\ud835\ude7b.\ud835\ude96\ud835\ude8d 文件从外部看起来相同。
By studying how skills are built across the ecosystem—from Anthropic’s repositories to Vercel and Google's internal guidelines— there are five recurring design patterns that can help developers build agents.
通过研究生态系统中技能构建的方式——从 Anthropic 的仓库到 Vercel 和 Google 的内部指南——有五个反复出现的设计模式,可以帮助开发者构建代理。
By @Saboo_Shubham_ and @lavinigam
作者 @Saboo_Shubham_ 和 @lavinigam
This article covers each one with working ADK code:
本文使用可运行的 ADK 代码涵盖了每一个:
- Tool Wrapper: Make your agent an instant expert on any library
- Tool Wrapper:让你的代理成为任何库的即时专家
- Generator: Produce structured documents from a reusable template
- Generator:从可重用模板生成结构化文档
- Reviewer: Score code against a checklist by severity
- Reviewer:按严重性对照检查清单评分代码
- Inversion: The agent interviews you before acting
- Inversion:代理在行动前对您进行访谈
- Pipeline: Enforce a strict multi-step workflow with checkpoints
- 管道:强制执行严格的多步骤工作流程,带有检查点

Pattern 1: The Tool Wrapper
模式 1:Tool Wrapper
A Tool Wrapper gives your agent on-demand context for a specific library. Instead of hardcoding API conventions into your system prompt, you package them into a skill. Your agent only loads this context whe...