Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

adaptive-subagents自适应子 Agent

Agent Skill

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

总安装

380

周安装

16

GitHub Stars

公开资料未说明

下载量

133
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/maleko91/claude-code-adaptive-subagents --skill adaptive-subagents

简介

adaptive-subagents 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于需要分解任务并委托给合适模型执行的复杂研究场景,支持机械性查找与逻辑性理解两类操作的分级处理。
  • 通过 npx skills add 命令从 GitHub 仓库安装,调用时需先分解子任务再分配执行,避免直接操作文件。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Adaptive Subagent Routing

FIRST: Decompose Before Acting

Do NOT start working on the task directly. Before reading files or making edits, decompose the task into subtasks and delegate each one to the cheapest sufficient model via the Agent tool. The only exception is if the entire task is under ~100 tokens of output (a one-liner fix).

Quick Decision (apply to EVERY delegation)

Default: Haiku. Escalate only with reason.

  1. Is this a mechanical lookup? (find files, grep for a string, list structure, check if something exists) → Haiku
  2. Does it require comprehension or writing? (implement, refactor, test, debug, fix, analyze code, explain logic, summarize complex systems) → Sonnet
  3. Is it architectural, security-sensitive, or ambiguous? → Opus

Haiku boundary: Haiku can *find* things and *format* things. It cannot *understand* or *reason about* code. If the task requires reading code and making a judgment, that's Sonnet.

If unsure between two tiers, pick the cheaper one. Escalate after failure, not before.

Before each delegation, output **Routing to {Model}:** {brief reason} on its own line. When handling work inline, output **Staying on {Model}:** {brief reason} instead.

When to Delegate vs Handle Inline

Always delegate to a cheaper tier — the 3x–15x cost savings always outweigh subagent overhead.

Skip delegation only when:

  • The output is under ~100 tokens (one-liner answers, quick fixes already in context)
  • The overhead of spawning a subagent exceeds the work itself
  • The subtask needs the same model tier you're already on and context is already available

Routing Rules

Haiku (1x)Sonnet (3x)Opus (15x)
File search, grep, globImplementation, bug fixArchitecture, migration
Format/lint existing textRefactor (< 10 files)Security review
Check if file/string existsTest writingAmbiguous/conflicting scope
List files, directory structureDebugging with stack tracesMulti-system design
Literal string replacementsCode generation (< 500 lines)Performance analysis
Summarize/analyze code logic
Rename across multiple files
Code review, explain code

Escalate +1 tier: ambiguous requirements, public-facing output, security-sensitive, production-critical, or 2 consecutive failures. Downgrade: after planning completes, or remaining work is formatting/summarization.

Cost Ratios

ModelRelative CostPricing
Haiku (1x)Baseline~$1/M input, $5/M output
Sonnet (3x)3x Haiku~$3/M input, $15/M output
Opus (15x)15x Haiku~$15/M input, $75/M output

A 10-delegation task routed to Haiku instead of Opus saves ~93% on those calls.

Per-Subtask Routing

When a request involves multiple steps:

  1. Decompose first. Break the request into a todo list of subtasks.
  2. Route each subtask independently. Most items are cheaper than the overall task.
  3. Downgrade after planning. If Opus produces a plan, implementation goes to Sonnet. Lookups and cleanup go to Haiku.

Example — "design and implement a caching layer":

  • Plan the architecture → Opus
  • Search for existing cache usage → Haiku
  • Implement the cache module → Sonnet
  • Write tests → Sonnet
  • Update internal dev notes → Haiku
  • Write public API docs → Sonnet (escalated: public-facing)

Delegation

Choose agent type by task and model by complexity independently.

Agent TypeUse WhenTools Available
ExploreSearch, grep, read-only explorationRead, Glob, Grep (no Edit/Write)
general-purposeImplementation, edits, multi-step workAll tools
PlanArchitecture design, implementation planningRead, Glob, Grep (no Edit/Write)

Combine freely — Explore + haiku for file lookups, general-purpose + sonnet for implementation, Explore + sonnet for complex investigation, Plan + sonnet for straightforward design.

Agent(subagent_type: "Explore", model: "haiku", description: "...", prompt: "...")
Agent(subagent_type: "general-purpose", model: "sonnet", description: "...", prompt: "...")
Agent(subagent_type: "Explore", model: "sonnet", description: "...", prompt: "...")
Agent(subagent_type: "Plan", model: "sonnet", description: "...", prompt: "...")

Keep prompts scoped: relevant files, constraints, expected output format. The description parameter is required — use a short 3-5 word summary.

Expected Output Formats

TierExpected Output
HaikuFile paths, grep results, existence checks, formatted text
SonnetCode diffs, implementation files, test files, error analysis
OpusNumbered plan steps, architecture decisions with rationale, risk assessment

Parallel Fan-Out

When a request contains independent subtasks, launch multiple subagents in a single message.

Before splitting, build a dependency graph. Does any subtask need another's output, or do they modify the same file? If yes, run them sequentially.

PatternParallel?Why
Separate files, separate concernsYesNo shared state
Research + unrelated implementationYesRead-only doesn't conflict with writes
Implementation + its testsNoTests depend on the implementation
Feature + docs describing that featureNoDocs need to reflect what was built
Two features touching different modulesYesIndependent code paths
Refactor + anything in same filesNoRefactor changes the baseline

After all phases return, review outputs for conflicts before applying.

User Overrides

If the user says any of the following, respect it for the current request:

  • "no routing" / "don't delegate" — handle everything inline on the current model.
  • "use Opus" / "use Sonnet" / "use Haiku" — force that tier for all delegations.

Log the override with **Override:** {what the user requested} and resume normal routing on the next request.

Routing Log

After each routing decision, append a line to routing.log in the project root using the Bash tool:

echo "{model} | {agent_type or inline} | {estimated savings vs Opus, e.g. ~93%} | {brief task description}" >> routing.log

Log every **Routing to** and **Staying on** decision.

Guardrails

  • Max 2 retries per subagent, then escalate or ask the user.
  • Max 5 sequential delegations per user request. No limit on parallel.
  • Always review subagent outputs before applying — check for conflicts, hallucinated paths, and incomplete work.
  • Do NOT modify project files: Never write routing rules to CLAUDE.md. Never add hooks to settings.json. This skill is loaded automatically by the plugin.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.29%
按下载量换算52

Claude

28.88%
按下载量换算38

Cursor

17.04%
按下载量换算23

Gemini CLI

8.99%
按下载量换算12

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills