跳到正文
Skillpedia
通用编程6.3k · #14373

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-scaffold/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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, the agentic_rag template, and agents-cli infra datastore / agents-cli data-ingestion no 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 mkdir the project directory before running create — the CLI creates it automatically. If you mkdir first, create will fail or behave unexpectedly.
  • Pass --agent-guidance-filename for your IDE: GEMINI.md for Antigravity CLI, CLAUDE.md for Claude Code, AGENTS.md otherwise.
  • 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能