$npx -y skills add google/agents-cli --skill google-agents-cli-scaffoldgoogle-agents-cli-scaffold is an agent skill published from google/agents-cli, installable through the skills CLI.
| 1 | # ADK Project Scaffolding Guide |
| 2 | |
| 3 | > **Requires:** `agents-cli` (`uv tool install google-agents-cli`) — [install uv](https://docs.astral.sh/uv/getting-started/installation/index.md) first if needed. |
| 4 | |
| 5 | Use the `agents-cli` CLI to create new ADK agent projects or enhance existing ones with deployment, CI/CD, and infrastructure scaffolding. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Prerequisite: Clarify Requirements (MANDATORY for new projects) |
| 10 | |
| 11 | **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. |
| 12 | |
| 13 | --- |
| 14 | |
| 15 | ## Step 1: Choose Architecture |
| 16 | |
| 17 | **Mapping user choices to CLI flags:** |
| 18 | |
| 19 | | Choice | CLI flag | |
| 20 | |--------|----------| |
| 21 | | RAG (vector or document search) | Not a scaffold flag — clone-and-study `rag-vector-search` / `rag-agent-search` (see `/google-agents-cli-workflow` Phase 1) | |
| 22 | | A2A protocol | built into every ADK agent — scaffold normally (`--agent adk`) | |
| 23 | | Prototype (no deployment) | `--prototype` | |
| 24 | | Deployment target | `--deployment-target <agent_runtime\|cloud_run\|gke>` | |
| 25 | | CI/CD runner | `--cicd-runner <github_actions\|google_cloud_build>` | |
| 26 | | Session storage | `--session-type <in_memory\|cloud_sql\|agent_platform_sessions>` | |
| 27 | |
| 28 | ### Product name mapping |
| 29 | |
| 30 | Older names → CLI values (`vertexai` SDK package name unchanged): |
| 31 | |
| 32 | - Agent Engine / Vertex AI Agent Engine → `--deployment-target agent_runtime` |
| 33 | - Agent Engine sessions / Agent Platform Sessions → `--session-type agent_platform_sessions` |
| 34 | - Vertex AI Search / Vertex AI Vector Search / RAG → clone-and-study recipe, not a flag (see `/google-agents-cli-workflow` Phase 1) |
| 35 | |
| 36 | --- |
| 37 | |
| 38 | ## Step 2: Create or Enhance the Project |
| 39 | |
| 40 | ### Create a New Project |
| 41 | |
| 42 | ```bash |
| 43 | agents-cli scaffold create <project-name> \ |
| 44 | --agent <template> \ |
| 45 | --deployment-target <target> \ |
| 46 | --region <region> \ |
| 47 | --prototype |
| 48 | ``` |
| 49 | |
| 50 | **Constraints:** |
| 51 | - Project name must be **26 characters or less**, lowercase letters, numbers, and hyphens only. |
| 52 | - Do NOT `mkdir` the project directory before running `create` — the CLI creates it automatically. If you mkdir first, `create` will fail or behave unexpectedly. |
| 53 | - Auto-detect the guidance filename based on the IDE you are running in and pass `--agent-guidance-filename` accordingly (`GEMINI.md` for Antigravity CLI, `CLAUDE.md` for Claude Code, `AGENTS.md` for OpenAI Codex/other). |
| 54 | - 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. |
| 55 | |
| 56 | ### Reference Files |
| 57 | |
| 58 | | File | Contents | |
| 59 | |------|----------| |
| 60 | | `references/flags.md` | Full flag reference for `create` and `enhance` commands | |
| 61 | |
| 62 | ### Enhance an Existing Project |
| 63 | |
| 64 | ```bash |
| 65 | agents-cli scaffold enhance . --deployment-target <target> |
| 66 | agents-cli scaffold enhance . --cicd-runner <runner> |
| 67 | ``` |
| 68 | |
| 69 | Run this from inside the project directory (or pass the path instead of `.`). |
| 70 | |
| 71 | ### Upgrade a Project |
| 72 | |
| 73 | Upgrade an existing project to a newer agents-cli version, intelligently applying updates while preserving your customizations: |
| 74 | |
| 75 | ```bash |
| 76 | agents-cli scaffold upgrade # Upgrade current directory |
| 77 | agents-cli scaffold upgrade <project-path> # Upgrade specific project |
| 78 | agents-cli scaffold upgrade --dry-run # Preview changes without applying |
| 79 | agents-cli scaffold upgrade --auto-approve # Auto-apply non-conflicting changes |
| 80 | ``` |
| 81 | |
| 82 | ### Execution Modes |
| 83 | |
| 84 | The CLI defaults to **strict programmatic mode** — all required params must be supplied as CLI flags or a `UsageError` is raised. No approval flags needed. Pass all required params explicitly. |
| 85 | |
| 86 | ### Common Workflows |
| 87 | |
| 88 | **Always ask the user before running these commands.** Present the options (CI/CD runner, deployment target, etc.) and confirm before executing. |
| 89 | |
| 90 | ```bash |
| 91 | # Add deployment to an existing prototype (strict programmatic) |
| 92 | agents-cli scaffold enhance . --deployment-target agent_runtime |
| 93 | |
| 94 | # Add CI/CD pipeline (ask: GitHub Actions or Cloud Build?) |
| 95 | agents-cli scaffold enhance . --cicd-runner github_actions |
| 96 | ``` |
| 97 | |
| 98 | --- |
| 99 | |
| 100 | ## Template Options |
| 101 | |
| 102 | | Templ |