Python ADK Recipe 脚手架
scaffold-python-recipe
当用户想要『创建新的 Python ADK recipe』『搭建新的 Python recipe 脚手架』『在 contrib 中生成新的 Python recipe』『向 adk-recipes 仓库添加新的 Python recipe』或『创建 Python adk recipe』时,应使用本技能。它利用自动化脚本复制模板文件并解析基础占位符。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.1w
- Forks
- 3.0k
01 前言 Front Matter
- name
- scaffold-python-recipe
- metadata
- { "author": "Google", "license": "Apache-2.0", "version": "1.0.0" }
- description
- This skill should be used when the user wants to "create a new Python ADK recipe", "scaffold a new Python recipe", "generate a new Python recipe in contrib", "add a new Python recipe to the adk-recipes repository", or "create a Python adk recipe". It utilizes an automated script to copy template files and resolve basic placeholders.
02 资源文件 20
- 其他resources/templates/.env.example778 B
- 脚本resources/templates/app/__init__.py894 B
- 脚本resources/templates/app/agent.py1.7 KB
- 脚本resources/templates/app/app_utils/__init__.py47 B
- 脚本resources/templates/app/app_utils/telemetry.py2.1 KB
- 脚本resources/templates/app/app_utils/typing.py1.0 KB
- 脚本resources/templates/app/fast_api_app.py2.7 KB
- 参考文档resources/templates/manifest.yaml2.3 KB
- 其他resources/templates/pyproject.toml682 B
- 参考文档resources/templates/README.md1.4 KB
- 参考文档resources/templates/tests/eval/eval_config.json551 B
- 参考文档resources/templates/tests/eval/evalsets/basic.evalset.json855 B
- 参考文档resources/templates/tests/eval/evalsets/README.md607 B
- 脚本resources/templates/tests/integration/test_agent.py1.9 KB
- 脚本resources/templates/tests/integration/test_server_e2e.py6.3 KB
- 脚本resources/templates/tests/test_runnability.py2.3 KB
- 脚本resources/templates/tests/unit/test_tools.py1.0 KB
- 脚本scripts/scaffold.py7.4 KB
- 脚本tests/conftest.py421 B
- 脚本tests/test_scaffold.py10.7 KB
03 SKILL.md 正文
Scaffolding a New Python ADK Recipe
Use this skill to scaffold a new Python ADK recipe inside this repository using the automated script at scripts/scaffold.py.
Rules
- No Manual Boilerplate Writing: Always use
scripts/scaffold.pyto create the recipe. Never write the boilerplate files manually. - Do Not Modify After Scaffolding: Once the script runs successfully, do not make any further changes to the recipe in this turn.
- Use the Correct Terminology (Recipe): Always refer to what is being created as a recipe, never as a "project". Ensure all output messages, instructions, and explanations to the user use "recipe" exclusively.
Inputs
You must have both pieces of information below before running the script. If either is missing or was not explicitly provided by the user, ask for it — do not assume or use a default.
1. Output Directory (Required — must ask if not provided)
The user must choose one of these valid locations:
contrib/python/— community recipes; preferred for new Python recipescore/python/— curated recipescontrib/— legacy flat layout, still accepted; prefercontrib/python/
If the user has not specified which directory, ask them to choose. Do not proceed until a valid choice is confirmed.
This skill cannot scaffold a vertical plugin (plugins/<vertical>/<solution>/). Those have a different shape — SKILL.md, EVAL.yaml, scripts/, assets/, references/, tests/unit/ — and no template ships for them yet. If the user asks for one, tell them so rather than scaffolding into the wrong place.
2. Recipe Name (Required — must ask if not provided)
The recipe name must satisfy all of the following rules:
- Contains only lowercase letters and hyphens (
a-z,-) - Is 30 characters or less
- Does not start or end with a hyphen
If the user provided a name, validate it against these rules before proceeding. If it is invalid, explain which rule it violates and ask for a corrected name. Do not proceed until a valid name is confirmed.
Run
Execute the scaffold script:
python3 .agents/skills/scaffold-python-recipe/scripts/scaffold.py --name <RECIPE_NAME> --output-dir <OUTPUT_DIRECTORY>
The script accepts exactly two flags: --name (required) and --output-dir (required). Do not pass any other flags.
Respond
Once the script succeeds, inform the user the recipe is ready and highlight the following required next steps:
- Update
manifest.yaml: Fill in thedescription,ownership.team, andownership.pocfields (placeholders are marked withTODO:). This file is validated by CI and must not contain placeholder values. Use thegenerate-manifestskill if you want it populated automatically from the source code. - Update
README.md: Replace the generic title and description with details specific to this recipe (ownership/POC live inmanifest.yaml, above — not in the README).
Then, provide these quick-start commands:
cd <OUTPUT_DIRECTORY>/<RECIPE_NAME>
uv sync # install dependencies
uv run pytest # run the test suite
uv run adk run app # run the agent interactively
Do not make any further changes. End your turn.
04 同仓库更多 Skills
零售虚拟试穿智能体开发
retail-virtual-tryon
创建虚拟试穿智能体,在 Google Cloud 上支持图片和视频(走秀动画)试穿(使用 Gemini 图像模型和 Gemini Enterprise Agent Platform 上的 Veo)。负责资源设置、用户照片上传、图片/视频生成流水线、本地测试和评估。
零售产品搜索智能体构建
retail-product-search
在 Google Cloud 上创建具备语义搜索和 RAG 能力的产品搜索智能体(基于 Gemini Enterprise Agent Platform 上的 Vector Search、BigQuery 和 embeddings)。当用户想要“构建产品搜索智能体”“创建电商搜索”“制作购物助手”“搭建语义化目录发现”“将产品导入 Vector Search”或“部署零售 RAG 智能体”时使用。涵盖完整流程:目录数据导入 BigQuery、Gemini Enterprise Agent Platform 的 Vector Search 集合配置、ADK 智能体脚手架搭建、评估以及 Cloud Run 部署。
定时例行任务管理
routines
用于周期性、无人值守的任务(cron;如拉取数据、创建 PR、发布摘要),或先对某个例行程序进行测试/试运行。介绍如何通过 routine 工具编写和测试例行任务。
工具权限策略检查
policy
检查按工作区划分的工具策略覆盖层(.lha/policies.jsonl),该覆盖层用于对破坏性或敏感的工具调用进行门控,并告知用户若想新增或删除规则应修改哪些内容。
Google Workspace 办公套件操作
google-workspace
通过 `gws` 命令行工具读写 Google Drive、Docs、Sheets、Gmail、Calendar、Chat、Tasks、Slides。需先配置 OAuth 客户端或服务账号。适用于任何 Google Workspace 任务。
智能体技能发现与安装
find-skills
从外部来源(skills.sh)发现并安装全新的智能体技能。用于弥补自身缺失的能力,例如“找一个能做 X 的技能”。不要用于列出你已有的技能;请参阅 `<available_skills>`。