Token导航 LogoToken导航

Agent Skill · 研究检索

adk-skill(技能)

adk-skill 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

adk-skill 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 36,717。

总安装 1,877周安装 79GitHub Stars 14下载 657核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:adk-skill(技能)
来源仓库:https://github.com/miticojo/adk-skill
仓库路径:skills/adk-skill
安装命令:
npx skills add https://github.com/miticojo/adk-skill --skill adk-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/miticojo/adk-skill --skill adk-skill

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

adk-skill 提供 Google Agent Development Kit (ADK) 的官方框架指南。支持单代理和多代理架构,内置工具集成、状态管理和部署选项。适用于构建基于 Gemini 模型的 AI 代理应用。安装前建议确认权限范围、维护状态,以及是否会触发联网或命令执行。

必须设置 GOOGLE_API_KEY 或使用 Vertex AI 凭据认证。

来源仓库内路径:skills/adk-skill

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/miticojo/adk-skill --skill adk-skill;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

adk-skill 怎么安装?

在终端执行 npx skills add https://github.com/miticojo/adk-skill --skill adk-skill。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

adk-skill 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

adk-skill 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

adk-skill 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

adk-skill 用的人多吗?

公开数据是累计安装 1,877 次,近一周安装 79 次,下载 657 次,GitHub 14 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

adk-skill 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
adk-skill

技能 · 本页

1,87714调用外部服务未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Google Agent Development Kit (ADK) Guide

Overview

ADK is Google's open-source framework for building AI agents powered by Gemini models. It supports single-agent and multi-agent architectures with built-in tool integration, state management, callbacks, guardrails, and deployment options.

Critical Rules

  1. Every agent package MUST have __init__.py that imports the agent module: from. import agent
  2. Entry point MUST be root_agent -- a module-level variable in agent.py (Python). Not agent, not my_agent.
  3. Set GOOGLE_API_KEY in .env or configure Vertex AI credentials before running.
  4. Always set max_iterations on LoopAgent to prevent unbounded execution.
  5. One agent = one responsibility. Split agents with 5+ tools into specialists.
  6. Use output_key + output_schema for reliable data flow between agents -- not free text.

Documentation & Resources

For up-to-date API references and detailed guides beyond this skill, always consult:

Supported Languages

LanguagePackageInstall
Pythongoogle-adkpip install google-adk
Javacom.google.adk:google-adkMaven/Gradle
Gogoogle.golang.org/adkgo get
TypeScript@google/adknpm install @google/adk

This guide shows Python examples. For Java, Go, and TypeScript patterns, see references/multi-language.md.

Quick Reference

TaskApproach
Single agentAgent or LlmAgent with tools and instructions
Sequential pipelineSequentialAgent with ordered sub_agents
Parallel executionParallelAgent with independent sub_agents
Iterative refinementLoopAgent with max_iterations or checker agent
Agent-as-toolWrap agent with AgentTool for on-demand delegation
Remote agent (A2A)RemoteA2aAgent + to_a2a() for cross-service agents
Custom toolsPython functions with type hints + docstrings
Structured outputPydantic model via output_schema + output_key
State managementcallback_context.state and tool_context.state
MCP integrationMCPToolset with connection params
Runtime configApp object with compaction, resumability, plugins
Plugins (global hooks)BasePlugin registered on Runner or App
Context compactionEventsCompactionConfig on App for long conversations
Session rewindrunner.rewind_async() to undo interactions
Streaming (Live API)LiveRequestQueue for bidirectional audio/video
Multi-modelClaude, Ollama, LiteLLM, vLLM via model adapters
Agent SkillsSkillToolset to load Skills from files or code
Testingpytest with InMemoryRunner
EvaluationEvalSet with .test.json, adk eval CLI, pytest

Project Structure

Every ADK project follows this layout:

my_agent/
├── my_agent/
│   ├── __init__.py          # Must import agent module
│   ├── agent.py             # Defines root_agent (entry point)
│   ├── prompts.py           # Instruction strings (optional)
│   ├── tools.py             # Custom tool functions (optional)
│   ├── sub_agents/          # Sub-agent packages (optional)
│   └── shared_libraries/    # Callbacks, utilities (optional)
├── tests/
│   └── test_agent.py
├── pyproject.toml
└── .env                     # GOOGLE_API_KEY or GOOGLE_CLOUD_PROJECT

Critical: init.py

# my_agent/__init__.py
from . import agent

Critical: root_agent

The root_agent variable at module level is the framework entry point:

# my_agent/agent.py
from google.adk.agents import Agent

root_agent = Agent(
    name="my_agent",
    model="gemini-2.5-flash",
    description="Brief description for agent discovery",
    instruction="Detailed system prompt...",
    tools=[...],
)

pyproject.toml

Minimal config: requires-python = ">=3.10", dependencies = ["google-adk"], build-backend setuptools. For full example and environment config, see references/advanced-patterns.md.


Agent Types

1. LlmAgent (Single Agent)

The fundamental building block. Wraps a single LLM call with tools and instructions.

from google.adk.agents import LlmAgent

agent = LlmAgent(
    name="assistant",
    model="gemini-2.5-flash",
    description="General assistant",
    instruction="""You are a helpful assistant.
    Use the search tool when you need current information.""",
    tools=[search_tool],
    output_schema=ResponseModel,   # Optional structured output
    output_key="response",         # State key for output
    generate_content_config=types.GenerateContentConfig(
        temperature=0.7,
    ),
)

2. SequentialAgent

Runs sub-agents in order. Output of each flows to the next via shared state.

from google.adk.agents import SequentialAgent

pipeline = SequentialAgent(
    name="research_pipeline",
    description="Research then summarize",
    sub_agents=[
        researcher_agent,    # Step 1: writes to state["research"]
        summarizer_agent,    # Step 2: reads state["research"]
    ],
)

3. ParallelAgent

Runs sub-agents concurrently. Use for independent tasks.

from google.adk.agents import ParallelAgent

parallel = ParallelAgent(
    name="multi_channel",
    description="Send to all channels simultaneously",
    sub_agents=[
        email_agent,
        slack_agent,
        calendar_agent,
    ],
)

4. LoopAgent

Repeats sub-agents until termination. Two termination patterns:

Pattern A: Fixed iterations

from google.adk.agents import LoopAgent

loop = LoopAgent(
    name="refinement_loop",
    description="Iteratively refine output",
    sub_agents=[writer_agent, critic_agent],
    max_iterations=3,
)

Pattern B: Checker agent with escalate

# The checker agent uses tool_context.actions.escalate = True to stop
def check_quality(score: float, tool_context: ToolContext) -> str:
    """Check if quality meets threshold."""
    if score >= 0.9:
        tool_context.actions.escalate = True
        return "Quality threshold met, stopping loop."
    return "Quality below threshold, continuing refinement."

checker = Agent(
    name="checker",
    model="gemini-2.5-flash",
    instruction="Evaluate the output quality and call check_quality.",
    tools=[check_quality],
)

loop = LoopAgent(
    name="quality_loop",
    sub_agents=[generator_agent, checker],
)

5. Composing Agent Types

Nest agent types freely for complex workflows. Example: SequentialAgent containing a ParallelAgent containing LlmAgents. See references/advanced-patterns.md for hierarchical workflow examples.


Tools

Function Tools

Any Python function with type hints and a docstring becomes a tool:

def get_weather(city: str, units: str = "celsius") -> dict:
    """Get current weather for a city.

    Args:
        city: The city name to look up weather for.
        units: Temperature units - 'celsius' or 'fahrenheit'.

    Returns:
        dict with temperature, conditions, and humidity.
    """
    # Implementation
    return {"temperature": 22, "conditions": "sunny", "humidity": 45}

agent = Agent(
    name="weather_agent",
    model="gemini-2.5-flash",
    instruction="Help users check the weather.",
    tools=[get_weather],
)

Requirements:

  • Type hints on all parameters
  • Docstring with description and Args section
  • Return type annotation

Tools with State Access

Use ToolContext to read/write session state:

from google.adk.tools import ToolContext

def add_to_cart(item: str, quantity: int, tool_context: ToolContext) -> dict:
    """Add an item to the shopping cart."""
    cart = tool_context.state.get("cart", [])
    cart.append({"item": item, "quantity": quantity})
    tool_context.state["cart"] = cart
    return {"status": "added", "cart_size": len(cart)}

AgentTool (Agent-as-Tool)

Wrap an agent to use it as a tool for another agent:

from google.adk.tools.agent_tool import AgentTool

specialist = Agent(
    name="code_reviewer",
    model="gemini-2.5-pro",
    instruction="Review code for bugs and best practices.",
)

coordinator = Agent(
    name="coordinator",
    model="gemini-2.5-flash",
    instruction="Coordinate tasks. Use code_reviewer for code reviews.",
    tools=[AgentTool(agent=specialist)],
)

Built-in Tools

from google.adk.tools import google_search

agent = Agent(
    name="researcher",
    tools=[google_search],
)

MCP Tools

from google.adk.tools.mcp_tool import MCPToolset, StdioConnectionParams
from mcp import StdioServerParameters

agent = Agent(
    name="db_agent",
    tools=[
        MCPToolset(
            connection_params=StdioConnectionParams(
                server_params=StdioServerParameters(
                    command="npx",
                    args=["-y", "some-mcp-server"],
                ),
            ),
        ),
    ],
)

For advanced tool patterns (FunctionTool, ToolboxToolset, long-running tools), see references/tools-reference.md.


Callbacks

Callbacks intercept the agent lifecycle. Return None to proceed, return a value to short-circuit.

CallbackSignatureUse Case
before_agent_callback(CallbackContext)Initialize state
before_tool_callback`(BaseTool, dict, CallbackContext) -> dict\None`Validate inputs, auto-approve
after_tool_callback`(BaseTool, dict, ToolContext, dict) -> dict\None`Post-process results
before_model_callback(CallbackContext, LlmRequest)Rate limit, safety filter
def before_tool(tool, args, tool_context) -> dict | None:
    """Return dict to skip tool execution with that response."""
    if tool.name == "approve_discount" and args.get("value", 0) > 50:
        return {"status": "rejected", "reason": "Discount too large"}
    return None  # Proceed normally

agent = Agent(
    name="guarded_agent",
    model="gemini-2.5-flash",
    instruction="...",
    before_tool_callback=before_tool,
)

For rate limiting, input validation, and safety callbacks, see references/advanced-patterns.md.


State Management

State is a shared dictionary across agents, tools, and callbacks. Scopes: state["key"] (session), app:key (app-wide), user:key (user-wide).

Passing data between agents: Use output_key to write to state, read in next agent's instruction:

researcher = Agent(name="researcher", output_key="findings", output_schema=ResearchOutput, ...)
writer = Agent(name="writer", instruction="Write report based on state['findings'].", ...)
pipeline = SequentialAgent(name="pipeline", sub_agents=[researcher, writer])

Structured Output

Use Pydantic models for typed, validated agent output:

from pydantic import BaseModel

class AnalysisResult(BaseModel):
    summary: str
    key_findings: list[str]
    confidence: float
    recommendations: list[str]

agent = Agent(
    name="analyzer",
    model="gemini-2.5-flash",
    instruction="Analyze the provided data and return structured results.",
    output_schema=AnalysisResult,
    output_key="analysis",  # Stored in state["analysis"]
)

Running and Testing

Local Development

# Install
pip install google-adk

# Set API key
export GOOGLE_API_KEY="your-key"

# Run interactively
adk run my_agent

# Run with web UI
adk web my_agent

Testing with InMemoryRunner

import pytest
from google.adk.runners import InMemoryRunner
from google.genai import types

@pytest.mark.asyncio
async def test_agent():
    runner = InMemoryRunner(agent=root_agent, app_name="test")
    session = await runner.session_service.create_session(
        user_id="test_user", app_name="test",
    )
    content = types.Content(
        role="user", parts=[types.Part.from_text(text="Hello")],
    )
    events = []
    async for event in runner.run_async(
        user_id="test_user", session_id=session.id, new_message=content,
    ):
        events.append(event)
    assert "expected" in events[-1].content.parts[0].text.lower()

Evaluation

ADK provides built-in evaluation for tool correctness, response quality, and safety. Define eval cases in .test.json files and run with adk eval, pytest, or the web UI. See references/evaluation.md for eval data formats, all 8 metrics, and patterns.


Model Selection

Use gemini-2.5-flash for most agents (fast, cost-effective). Use gemini-2.5-pro for complex reasoning. Gemini 3 models (gemini-3-flash, gemini-3-pro) also supported. Non-Gemini models work too: Claude, Ollama, LiteLLM, vLLM. Configure via generate_content_config=types.GenerateContentConfig(temperature=0.2).


Design Patterns

PatternWhen to UseADK Implementation
Sequential pipelineMulti-step tasks with dependenciesSequentialAgent with ordered sub-agents
Fan-out / Fan-inIndependent tasks then synthesisParallelAgent → merger Agent
Reflection loopQuality matters more than speedLoopAgent with producer + critic agents
Dynamic routingDiverse inputs need different handlingParent Agent with sub_agents (Auto-Flow)
Layered fallbackTool failures need graceful recoverySequentialAgent: primary → fallback → response
Guardrailed agentSafety/compliance requirementsbefore_model_callback + before_tool_callback
Resource tieringCost optimization under constraintsDifferent model per agent (Pro vs Flash)

Key design rules:

  • Split agents with 5+ tools into focused specialists. One agent = one responsibility.
  • Pass data between agents via output_key + output_schema (Pydantic) -- never rely on free text.
  • Set max_iterations on every LoopAgent. No exceptions.
  • Separate generation from evaluation -- use a different agent to critique (avoids self-review bias).
  • Write precise sub-agent description fields -- they drive Auto-Flow routing decisions.
  • Embed reasoning steps in instructions: "1. Analyze 2. Plan 3. Execute 4. Verify".
  • Include a fallback route for unclear inputs -- ambiguous requests must not be silently misrouted.

See also: advanced-patterns.md (App config, plugins, deployment, AG-UI, session rewind) | design-patterns.md (chaining, reflection, planning, guardrails, memory, HITL) | a2a-protocol.md (A2A server/client, agent cards) | troubleshooting.md (debugging, performance).


Decision Guide

When to use which agent type:

Single task, one LLM call? → Agent / LlmAgent
Steps must run in order? → SequentialAgent
Steps are independent? → ParallelAgent
Need iteration/refinement? → LoopAgent
Need on-demand delegation? → AgentTool
Remote agent, different service? → RemoteA2aAgent (A2A)
Complex multi-stage? → Compose agent types

When to use which tool type:

Simple function? → Python function with type hints
Need state access? → Add ToolContext parameter
Delegate to another agent? → AgentTool
Remote agent over network? → RemoteA2aAgent (A2A protocol)
External MCP server? → MCPToolset
Database access? → ToolboxToolset
Web search? → google_search (built-in)
Modular skill package? → SkillToolset

平台分布

Codex

36.27%
按下载量换算238

Claude

30.47%
按下载量换算200

Cursor

15.97%
按下载量换算105

Gemini CLI

8.99%
按下载量换算59

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills