跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 google-agents-cli-adk-code

Google Agents Cli Adk Code

当用户想要"写入代理代码","用ADK构建代理","添加工具","创建回调","定义代理","使用状态管理",或需要ADK(代理开发 Kit) Python API模式和代码示例时,应当使用这一技能. 谷歌ADK技能套房的一部分. 它为代理类型,工具定义,管弦图案,回调,状态管理和参考食谱提供了快速的参考. 不要用于脚手架(使用google-agents-cli-scaffold)或部署(使用google-agents-cli-depload).

581954 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

当用户想要"写入代理代码","用ADK构建代理","添加工具","创建回调","定义代理","使用状态管理",或需要ADK(代理开发 Kit) Python API模式和代码示例时,应当使用这一技能. 谷歌ADK技能套房的一部分. 它为代理类型,工具定义,管弦图案,回调,状态管理和参考食谱提供了快速的参考. 不要用于脚手架(使用google-agents-cli-scaffold)或部署(使用google-agents-cli-depload).

何时用

您需要清晰的图形地形。 |

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:ADK Code Reference、1. Study Recipes (No Project Needed)、2. Prerequisites for Writing Code、Quick Reference — Most Common Patterns、References、Related Skills。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/samples.md、references/adk-python.md、references/adk-workflows.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management", or needs ADK (Agent Development Kit) Python API patterns and code examples. Part of the Google ADK skills suite. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

ADK Code Reference1. Study Recipes (No Project Needed)2. Prerequisites for Writing CodeQuick Reference — Most Common PatternsReferencesRelated Skills

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
google-agents-cli-adk-code
description
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management", or needs ADK (Agent Development Kit) Python API patterns and code examples. Part of the Google ADK skills suite. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 3
  • references/samples.md
  • references/adk-python.md
  • references/adk-workflows.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「google-agents-cli-adk-code」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-2b9993c351259d58-%E8%B0%B7%E6%AD%8C%E4%BB%A3%E7%90%86Cli-Adk%E4%BB%A3%E7%A0%81.html
请存为 .cursor/skills/google-agents-cli-adk-code/SKILL.md 或 .claude/skills/google-agents-cli-adk-code/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/google/agents-cli 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/google/agents-cli' --list

npx skills add 'https://github.com/google/agents-cli' --skill 'google-agents-cli-adk-code'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: google-agents-cli-adk-code description: > This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management", or needs ADK (Agent Development Kit) Python API patterns and code examples. Part of the Google ADK skills suite. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy). metadata: author: Google license: Apache-2.0 version: 1.5.0 requires: bins: - agents-cli install: "uv tool install google-agents-cli" --- # ADK Code Reference Activate `/google-agents-cli-workflow` first for required development phases and scaffolding steps. ## 1. Study Recipes (No Project Needed) **Read the topic index in `references/samples.md` before answering "how do I build X".** Worked implementations exist for: sandboxed/per-user code execution, agent-loadable `SKILL.md` skills, cross-session memory, approval gates before risky actions, tool guardrails, per-user credentials, and scheduled/event-driven runs. The index only gives you a name; the recipe is the code. Clone it and read its `AGENTS.md` before you implement anything it covers. Hand-writing a Docker or E2B sandbox wrapper, a skill loader, a moderation callback or a memory store — for a capability the index lists — means you stopped at the name. ## 2. Prerequisites for Writing Code Do NOT write agent code until a project is scaffolded. 1. Verify project: run `agents-cli info` (proceed if config exists). 2. New project: run `agents-cli scaffold create `. 3. Existing code: run `agents-cli scaffold enhance .`. > **Language Support:** This reference covers the Python ADK SDK. Support for other languages coming soon. ## Quick Reference — Most Common Patterns ```python from google.adk.agents import Agent def get_weather(city: str) -> dict: """Get current weather for a city.""" return {"city": city, "temp": "22°C", "condition": "sunny"} root_agent = Agent( name="my_agent", model="gemini-3.7-flash", instruction="You are a helpful assistant that ...", tools=[get_weather], ) ``` --- ## References Use cheatsheets for common patterns. For deep knowledge, fetch the docs index or inspect the installed package. | Reference | When to read | |------|-------------| | `references/samples.md` | **Topic-indexed catalog of ADK reference recipes.** Read in workflow Phase 1 — before scaffolding and before writing code — maps a capability to the recipe that implements it. | | `references/adk-python.md` | Core ADK API: `Agent`, tools, callbacks, plugins, state, artifacts, multi-agent systems, `SequentialAgent` / `ParallelAgent` / `LoopAgent`, custom `BaseAgent`, `ManagedAgent` (server-hosted first-party agents), A2A protocol, A2UI. Default for most agents. | | `references/adk-workflows.md` | Graph-based Workflow API (ADK 2.0): nodes, edges, fan-out/fan-in, HITL, parallel processing. Use when you need explicit graph topology. | | `curl https://adk.dev/llms.txt` | Docs index (every page title + URL). Fetch it, then `WebFetch` the specific page for anything beyond the cheatsheets. | | Installed ADK package | Exact signatures and symbols — inspect the source (see "Inspecting ADK Source Code" in `references/adk-python.md`). | ## Related Skills - `/google-agents-cli-workflow` — Development workflow, coding guidelines, and operational rules - `/google-agents-cli-scaffold` — Project creation and enhancement with `agents-cli scaffold create` / `scaffold enhance` - `/google-agents-cli-eval` — Evaluation methodology, dataset schema, and the eval-fix loop - `/google-agents-cli-deploy` — Deployment targets, CI/CD pipelines, and production workflows

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…