google-agents-cli-scaffold
Skill này làm gì
Skill thiết lập dự án agent mới và thêm các tệp triển khai vào dự án hiện có bằng công cụ dòng lệnh agents. Skill dành cho lập trình viên muốn có cấu trúc dự án hoạt động trước khi viết mã agent.
Khi nào nên dùng
- ✓Khi bạn muốn bắt đầu một dự án agent ADK mới từ đầu.
- ✓Khi bạn muốn thêm thiết lập triển khai hoặc CI và CD vào dự án có sẵn.
- ✓Khi bạn muốn tạo một nguyên mẫu agent không triển khai.
Liên kết skill
https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-scaffold/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo dự án agent ADK mới tên support-bot có thể triển khai lên Cloud Run, và thiết lập CI và CD cho nó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill trước tiên làm rõ agent cần làm gì, rồi chạy lệnh agents để tạo dự án hoặc nâng cấp dự án có sẵn. Skill có thể chọn framework, đích triển khai và việc có phải là nguyên mẫu hay không.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Bạn có cần cài đặt gì trước không?
Có, cần công cụ dòng lệnh agents, và skill gợi ý cài uv trước nếu cần.
Bạn có thể tạo nguyên mẫu không triển khai không?
Có. Có tùy chọn tạo nguyên mẫu không triển khai.
Skill có nâng cấp dự án có sẵn không?
Có. Mô tả bao gồm các lệnh enhance và upgrade cho dự án hiện có.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 6.3k
- Vị trí xếp hạng
- #14373
- Giấy phép
- Apache-2.0
- Cập nhật
- 27/10/2026
Bình luận
- …
Thêm skill từ kho mã này
google-agents-cli-adk-code
6.3kGiúp agent của bạn viết mã cho agent AI bằng Google ADK, gồm công cụ, callback, trạng thái và các mẫu điều phối.
google-agents-cli-deploy
6.3kGiúp agent của bạn triển khai một agent AI lên Google Cloud, gồm Agent Runtime, Cloud Run, GKE, bí mật, CI/CD và xử lý sự cố.
google-agents-cli-eval
6.3kGiúp agent của bạn đánh giá một agent AI bằng bộ dữ liệu kiểm thử và chấm điểm, rồi tìm nguyên nhân các câu trả lời bị sai.
google-agents-cli-observability
6.3kGiúp agent của bạn thiết lập truy vết, ghi nhật ký và giám sát cho một agent AI đã triển khai trên Google Cloud, để bạn thấy nó làm gì.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.