google-agents-cli-scaffold
它能做什么
这项技能使用 agents 命令行工具创建新的智能体项目,并为现有项目添加部署文件。适合希望在编写智能体代码之前就拥有可用项目结构的开发者。
适用场景
- ✓当你想从零开始创建一个新的 ADK 智能体项目时。
- ✓当你想为现有项目添加部署或 CI 和 CD 设置时。
- ✓当你想创建一个不做部署的原型智能体时。
技能链接
https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-scaffold/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请创建一个名为 support-bot 的新 ADK 智能体项目,使其可以部署到 Cloud Run,并为它设置 CI 和 CD。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会先明确智能体应该做什么,然后运行 agents 命令来创建项目,或增强现有项目。它可以选择框架、部署目标,以及是否将其作为原型。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Project Scaffolding Guide
Requires:
agents-cli(uv tool install google-agents-cli) — install uv first if needed.
Use the agents-cli CLI to create new agent projects or enhance existing ones with deployment, CI/CD, and infrastructure scaffolding.
Prerequisite: Clarify Requirements (MANDATORY for new projects)
Before scaffolding a new project, load /google-agents-cli-workflow and complete Phase 0 — clarify the user's requirements before running any scaffold create command. Ask what the agent should do, what tools/APIs it needs, and whether they want a prototype or full deployment.
Step 1: Choose Architecture
Mapping user choices to CLI flags:
| Choice | CLI flag |
|---|---|
| Retrieval/RAG, sandboxed execution, cross-session memory, OAuth consent, guardrails, scheduled runs | No flag — these come from clone-and-study recipes. ADK Python: see the topic index in /google-agents-cli-adk-code → references/recipes.md; on other frameworks, see the agent catalog the framework template ships |
| A2A protocol | built into the scaffolded app — scaffold normally (ADK Python: --agent adk_python, the default; ADK Go: --agent adk_go) |
| Prototype (no deployment) | --prototype |
| Deployment target | --deployment-target <agent_runtime|cloud_run|gke> |
| CI/CD runner | --cicd-runner <github_actions|google_cloud_build> |
| Session storage | --session-type <in_memory|cloud_sql|agent_platform_sessions> |
Product name mapping
Current names (and older names users may say) → CLI values (vertexai SDK package name unchanged):
- Agent Runtime in Gemini platform (Agent Engine / Vertex AI Agent Engine / Agent Runtime) →
--deployment-target agent_runtime - Sessions in Gemini platform (Agent Engine sessions / Agent Platform Sessions) →
--session-type agent_platform_sessions - Search / Vector Search in Gemini platform (Vertex AI Search / Vertex AI Vector Search) / RAG → clone-and-study recipe, not a flag
Removed flags.
--datastore, theagentic_ragtemplate, andagents-cli infra datastore/agents-cli data-ingestionno longer exist. If you reach for one, you want a recipe instead.
Step 2: Create or Enhance the Project
Create a New Project
agents-cli scaffold create <project-name> \
--agent <template> \
--deployment-target <target> \
--region <region> \
--prototype
Constraints:
- Project name must be 26 characters or less, lowercase letters, numbers, and hyphens only.
- Do NOT
mkdirthe project directory before runningcreate— the CLI creates it automatically. If you mkdir first,createwill fail or behave unexpectedly. - Pass
--agent-guidance-filenamefor your IDE:GEMINI.mdfor Antigravity CLI,CLAUDE.mdfor Claude Code,AGENTS.mdotherwise. - When enhancing an existing project, check where the agent code lives. If it's not in
app/, pass--agent-directory <dir>(e.g.--agent-directory agent). Getting this wrong causes enhance to miss or misplace files.
Reference Files
| File | Contents |
|---|---|
references/flags.md |
Full flag reference for create and enhance commands |
Enhance an Existing Project
agents-cli scaffold enhance . --deployment-target <target>
agents-cli scaffold enhance . --cicd-runner <runner>
Run this from inside the project directory (or pass the path instead of .).
Upgrade a Project
Upgrade an existing project to a newer agents-cli version, intelligently applying updates while preserving your customizations:
agents-cli scaffold upgrade # Upgrade current directory
agents-cli scaffold upgrade <project-path> # Upgrade specific project
agents-cli scaffold upgrade --dry-run # Preview changes without applying
agents-cli scaffold upgrade --auto-approve # Auto-apply non-conflicting changes
agents-cli scaffold upgrade --force # Overwrite scaffolding files when smart-merge fails
agents-cli scaffold upgrade --force --dry-run # List what --force would overwrite
--force is a fallback for when smart-merge fails. Smart-merge also stops when the agents-cli version that created the project is not on PyPI, because it needs that version's template; use --force then too. It overwrites scaffolding files with the new template and keeps agent code, config files, README.md, the agent guidance file an
常见问题
我需要先安装什么吗?
需要 agents 命令行工具。如有需要,它会建议先安装 uv。
我可以创建一个不部署的原型吗?
可以。有一个选项可以创建不做部署的原型。
它可以升级现有项目吗?
可以。描述涵盖对现有项目执行增强和升级命令。
详情
作者的原始描述
This skill should be used when the user wants to "create an agent project", "start a new ADK project", "build me a new agent", "add CI/CD to my project", "add deployment", "enhance my project", or "upgrade my project". Part of the agents-cli skills suite. Covers `agents-cli scaffold create`, `scaffold enhance`, and `scaffold upgrade` commands, template options, deployment targets, and the prototype-first workflow. Do NOT use for writing agent code (ADK projects: use google-agents-cli-adk-code) or deployment operations (use google-agents-cli-deploy).
repo: google/agents-cli
热度
- GitHub 星标
- 6.3k
- 排名
- #14373
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/27
评论
- …
同一仓库的更多技能
google-agents-cli-adk-code
6.3k帮你的智能体使用 Google ADK 为 AI 智能体编写代码,包括工具、回调、状态和编排模式。
google-agents-cli-deploy
6.3k帮你的智能体把 AI 智能体部署到 Google Cloud,涵盖 Agent Runtime、Cloud Run、GKE、密钥、CI/CD 和故障排查。
google-agents-cli-eval
6.3k帮你的智能体用测试数据集和评分来评估 AI 智能体,并找出回答出错的原因。
google-agents-cli-observability
6.3k帮你的智能体为已部署在 Google Cloud 上的 AI 智能体设置追踪、日志和监控,让你看到它在做什么。