[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ASKQ9X442RJ1C33YV43G0A":3,"skill-same:01M7ASKQ9X442RJ1C33YV43G0A":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7ASKQ9X442RJ1C33YV43G0A","google-adk-agent-patterns",null,"Define, compose, and wire Google ADK agents with function tools and multi-agent orchestration. Use when writing agent definitions, adding Python function tools, building pipelines with SequentialAgent\u002FLoopAgent\u002FParallelAgent, or designing router\u002Fdelegation patterns. Trigger on: adk agent, LlmAgent, SequentialAgent, LoopAgent, ParallelAgent, AgentTool, function tool, output_key, output_schema, agent routing.","saski\u002Farnesto","saski","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F140356?v=4","01M7ASBDSNXTRYDYB4K1PEA1RV","01M7ASBDTAKBDAAV99S1GE7HK6",6,"Unlicense","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgoogle-adk-agent-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: google-adk-agent-patterns\ndescription: \"Define, compose, and wire Google ADK agents with function tools and multi-agent orchestration. Use when writing agent definitions, adding Python function tools, building pipelines with SequentialAgent\u002FLoopAgent\u002FParallelAgent, or designing router\u002Fdelegation patterns. Trigger on: adk agent, LlmAgent, SequentialAgent, LoopAgent, ParallelAgent, AgentTool, function tool, output_key, output_schema, agent routing.\"\n---\n\n# Google ADK Agent Patterns\n\n## When to Use \u002F When Not to Use\n\n**Use this skill when:**\n- Defining or modifying an `Agent` (LlmAgent) with model, instructions, or tools.\n- Writing Python function tools registered in `tools=[...]`.\n- Composing multi-agent pipelines (sequential, loop, parallel, router).\n- Passing state between agents using `output_key` \u002F `{var}` injection.\n\n**Do not use this skill when:**\n- Setting up a new ADK project from scratch (use `google-adk-setup`).\n- Deploying to Cloud Run (covered in `google-adk-setup` references).\n\n---\n\n## Agent Configuration (LlmAgent \u002F Agent)\n\n```python\nfrom google.adk.agents.llm_agent import Agent\n\nroot_agent = Agent(\n    name=\"my_agent\",\n    model=\"gemini-2.5-flash\",\n    description=\"One-sentence description used by other agents for routing.\",\n    instruction=\"You are a helpful assistant. Answer: {topic?}\",\n    tools=[my_tool],\n)\n```\n\nKey parameters:\n\n| Parameter | Purpose |\n|-----------|---------|\n| `name` | Unique identifier for the agent |\n| `model` | Gemini model string (e.g. `gemini-2.5-flash`) |\n| `description` | Used by orchestrators for routing — be precise |\n| `instruction` | System prompt; supports `{var}` (required) and `{var?}` (optional) state injection |\n| `tools` | List of Python functions or `AgentTool` instances |\n| `output_schema` | Pydantic model for structured output |\n| `output_key` | Writes agent output to shared session state under this key |\n| `include_contents` | Controls which conversation history is passed |\n| `generate_content_config` | Fine-grained generation parameters |\n\n**Critical constraint:** `output_schema` and `tools` cannot both be set on most models. Choose one.\n\n---\n\n## Function Tools\n\nSee [references\u002Ftool-patterns.md](references\u002Ftool-patterns.md) for full examples.\n\n### Minimal function tool\n\n```python\ndef get_weather(city: str) -> dict:\n    \"\"\"Return current weather for the given city name.\n\n    Args:\n        city: The city name to look up.\n    \"\"\"\n    return {\"status\": \"success\", \"temperature_c\": 22}\n\nagent = Agent(model=\"gemini-2.5-flash\", name=\"weather_agent\", tools=[get_weather])\n```\n\n### Rules for function tools\n\n1. The **docstring is the tool description** the LLM reads — write it precisely.\n2. Always return a `dict` with a `\"status\"` key: `\"success\"`, `\"error\"`, or `\"pending\"`.\n3. Non-dict returns are auto-wrapped as `{\"result\": value}`.\n4. Minimize parameters; use only simple, serializable types.\n5. `*args` and `**kwargs` are ignored in schema generation — never use them.\n6. Long-running operations: wrap with `LongRunningFunctionTool(func=my_func)`.\n\n---\n\n## Multi-Agent Patterns\n\nSee [references\u002Fmulti-agent-patterns.md](references\u002Fmulti-agent-patterns.md) for full examples.\n\n### SequentialAgent (pipeline)\n\n```python\nfrom google.adk.agents import SequentialAgent\n\npipeline = SequentialAgent(\n    name=\"research_pipeline\",\n    sub_agents=[researcher, writer, reviewer],\n)\n```\n\n- Each agent runs in order.\n- Use `output_key=\"my_key\"` on an agent to write its result to shared state.\n- Downstream agents read it via `{my_key}` in their `instruction`.\n\n### LoopAgent (iterative refinement)\n\n```python\nfrom google.adk.agents import LoopAgent\n\nloop = LoopAgent(\n    name=\"refinement_loop\",\n    sub_agents=[drafter, critic],\n    max_iterations=5,\n)\n```\n\n- Runs sub-agents repeatedly until a termination condition is met.\n\n### ParallelAgent (concurrent)\n\n```python\nfrom google.adk.agents import ParallelAgent\n\nparallel = ParallelAgent(\n    name=\"parallel_research\",\n    sub_agents=[topic_a_agent, topic_b_agent],\n)\n```\n\n- Runs all sub-agents concurrently; results aggregate into shared session state.\n\n### AgentTool (delegation)\n\n```python\nfrom google.adk.agents import AgentTool\n\ndispatcher = Agent(\n    name=\"dispatcher\",\n    model=\"gemini-2.5-flash\",\n    tools=[AgentTool(agent=specialist)],\n)\n```\n\n- Wraps an agent as a callable tool for the parent agent.\n- The `description` on the wrapped agent controls when it is invoked.\n\n---\n\n## State Injection in Instructions\n\n```python\n# Required variable (errors if missing from state)\ninstruction = \"Summarize this text: {raw_text}\"\n\n# Optional variable (silently ignored if missing)\ninstruction = \"Context: {context?}\\n\\nAnswer the user's question.\"\n```\n\nState is populated by prior agents' `output_key` values or session initialization.\n","# Google ADK Agent Patterns\n\n## When to Use \u002F When Not to Use\n\n**Use this skill when:**\n- Defining or modifying an `Agent` (LlmAgent) with model, instructions, or tools.\n- Writing Python function tools registered in `tools=[...]`.\n- Composing multi-agent pipelines (sequential, loop, parallel, router).\n- Passing state between agents using `output_key` \u002F `{var}` injection.\n\n**Do not use this skill when:**\n- Setting up a new ADK project from scratch (use `google-adk-setup`).\n- Deploying to Cloud Run (covered in `google-adk-setup` references).\n\n---\n\n## Agent Configuration (LlmAgent \u002F Agent)\n\n```python\nfrom google.adk.agents.llm_agent import Agent\n\nroot_agent = Agent(\n    name=\"my_agent\",\n    model=\"gemini-2.5-flash\",\n    description=\"One-sentence description used by other agents for routing.\",\n    instruction=\"You are a helpful assistant. Answer: {topic?}\",\n    tools=[my_tool],\n)\n```\n\nKey parameters:\n\n| Parameter | Purpose |\n|-----------|---------|\n| `name` | Unique identifier for the agent |\n| `model` | Gemini model string (e.g. `gemini-2.5-flash`) |\n| `description` | Used by orchestrators for routing — be precise |\n| `instruction` | System prompt; supports `{var}` (required) and `{var?}` (optional) state injection |\n| `tools` | List of Python functions or `AgentTool` instances |\n| `output_schema` | Pydantic model for structured output |\n| `output_key` | Writes agent output to shared session state under this key |\n| `include_contents` | Controls which conversation history is passed |\n| `generate_content_config` | Fine-grained generation parameters |\n\n**Critical constraint:** `output_schema` and `tools` cannot both be set on most models. Choose one.\n\n---\n\n## Function Tools\n\nSee [references\u002Ftool-patterns.md](references\u002Ftool-patterns.md) for full examples.\n\n### Minimal function tool\n\n```python\ndef get_weather(city: str) -> dict:\n    \"\"\"Return current weather for the given city name.\n\n    Args:\n        city: The city name to look up.\n    \"\"\"\n    return {\"status\": \"success\", \"temperature_c\": 22}\n\nagent = Agent(model=\"gemini-2.5-flash\", name=\"weather_agent\", tools=[get_weather])\n```\n\n### Rules for function tools\n\n1. The **docstring is the tool description** the LLM reads — write it precisely.\n2. Always return a `dict` with a `\"status\"` key: `\"success\"`, `\"error\"`, or `\"pending\"`.\n3. Non-dict returns are auto-wrapped as `{\"result\": value}`.\n4. Minimize parameters; use only simple, serializable types.\n5. `*args` and `**kwargs` are ignored in schema generation — never use them.\n6. Long-running operations: wrap with `LongRunningFunctionTool(func=my_func)`.\n\n---\n\n## Multi-Agent Patterns\n\nSee [references\u002Fmulti-agent-patterns.md](references\u002Fmulti-agent-patterns.md) for full examples.\n\n### SequentialAgent (pipeline)\n\n```python\nfrom google.adk.agents import SequentialAgent\n\npipeline = SequentialAgent(\n    name=\"research_pipeline\",\n    sub_agents=[researcher, writer, reviewer],\n)\n```\n\n- Each agent runs in order.\n- Use `output_key=\"my_key\"` on an agent to write its result to shared state.\n- Downstream agents read it via `{my_key}` in their `instruction`.\n\n### LoopAgent (iterative refinement)\n\n```python\nfrom google.adk.agents import LoopAgent\n\nloop = LoopAgent(\n    name=\"refinement_loop\",\n    sub_agents=[drafter, critic],\n    max_iterations=5,\n)\n```\n\n- Runs sub-agents repeatedly until a termination condition is met.\n\n### ParallelAgent (concurrent)\n\n```python\nfrom google.adk.agents import ParallelAgent\n\nparallel = ParallelAgent(\n    name=\"parallel_research\",\n    sub_agents=[topic_a_agent, topic_b_agent],\n)\n```\n\n- Runs all sub-agents concurrently; results aggregate into shared session state.\n\n### AgentTool (delegation)\n\n```python\nfrom google.adk.agents import AgentTool\n\ndispatcher = Agent(\n    name=\"dispatcher\",\n    model=\"gemini-2.5-flash\",\n    tools=[AgentTool(agent=specialist)],\n)\n```\n\n- Wraps an agent as a callable tool for the parent agent.\n- The `description` on the wrapped agent controls when it is invoked.\n\n---\n\n## State Injection in Instructions\n\n```python\n# Required variable (errors if missing from state)\ninstruction = \"Summarize this text: {raw_text}\"\n\n# Optional variable (silently ignored if missing)\ninstruction = \"Context: {context?}\\n\\nAnswer the user's question.\"\n```\n\nState is populated by prior agents' `output_key` values or session initialization.\n",{"name":5,"description":7},"main","3c24fc2c035029b08c7326774bee3fef8fb95566",".agents\u002Fskills\u002Fgoogle-adk-agent-patterns",0,"https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto","https:\u002F\u002Fgithub.com\u002Fsaski","http:\u002F\u002Fsaski.com","2026-11-12 20:09:16",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add saski\u002Farnesto --skill google-adk-agent-patterns",{"tool":37,"command":38},"bunx","bunx skills add saski\u002Farnesto --skill google-adk-agent-patterns",{"tool":40,"command":41},"pnpm","pnpm dlx skills add saski\u002Farnesto --skill google-adk-agent-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgoogle-adk-agent-patterns\u002FSKILL.md",true,[45,51],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fmulti-agent-patterns.md","REFERENCE","参考文档",3817,"https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgoogle-adk-agent-patterns\u002Freferences\u002Fmulti-agent-patterns.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Ftool-patterns.md",1885,"https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgoogle-adk-agent-patterns\u002Freferences\u002Ftool-patterns.md",[56,63,70,77,84,91],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7AT7F5FSHNAMFMF01N0QA1X","visualize","Use \u002Fvisualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fvisualize\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7AT79MHSAR3JDDMP7DGERM9","update-cursor-settings","Modify Cursor\u002FVSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fupdate-cursor-settings\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7AT73WF3Y22E0FKYAMCCJES","update-cli-config","View and modify Cursor CLI configuration settings in ~\u002F.cursor\u002Fcli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fupdate-cli-config\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7AT6F3FBP85AJJ5BJNR8B5W","statusline","Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fstatusline\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7AT6D24QFS5XRAFN8S5XJ7W","split-to-prs","Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fsplit-to-prs\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M7AT69FYFN84XZKW452JV5DF","shell","Runs the rest of a \u002Fshell request as a literal shell command. Use only when the user explicitly invokes \u002Fshell and wants the following text executed directly in the terminal.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fshell\u002FSKILL.md",[],[]]