AIFCC
記事一覧へ
ClaudeClaude CodeAIharness-designclaude-setup

Skills can use subagents, Subagents can use skills — Claude Code の再帰的委譲パターン

Daniel San@dani_avila7
22326
SkillsはSubagentsを使える。SubagentsはSkillsを使える。 メインセッションからコンテキストを分離するためにClaude Codeでサブエージェントを使い始めた。複雑なタスクが会話ウィンドウを汚染し、トークンを消費し、Claudeの推論力を徐々に低下させていた。重作業を担当するサブエージェントを起動してサマリーだけ返すようにしたら、すぐに問題が解決した。 そしてSkillsが登場した。コンテキスト、規約、パターン、ドメイン知識のライブラリを構築し、Claudeのタスクに注入し始めた。 組み合わせは強力だ:Skillsがエージェントに「何を知っているか」を与え、サブエージェントが「何が実行できるか」を与える。これで各タスクに適切なコンテキストが注入された専用エージェントを起動できる。
原文を表示 / Show original
Skills can use subagents, Subagents can use skills. I started using subagents in Claude Code to isolate context from the main session. Complex tasks were polluting the conversation window, consuming tokens, and making Claude progressively worse at reasoning. Spawning a subagent to do the heavy lifting and return only the summary fixed that immediately. Then skills showed up. I started building libraries of context, conventions, patterns, domain knowledge, and injecting them into Claude's tasks on demand. Now both exist at the same time, and they can reference each other. A subagent can preload skills. A skill can delegate to a subagent. They're not interchangeable, each pattern solves a different problem. Subagent preloads Skills: Use when defining a role, a specialized agent that needs domain knowledge from the first turn. The skills: field in subagent frontmatter injects skill content at startup. Skill delegates to a Subagent: Use when you have a task verbose enough that running inline would pollute main context. context: fork spawns a subagent, skill content becomes the task prompt. One constraint: context: fork only makes sense for skills with explicit instructions. When to use each: Subagent with skills = defining a role with baked-in domain knowledge. Skill with context: fork = task too verbose/expensive to run inline, want isolation without creating a full agent file.

AIFCC — AI Fluent CxO Club

読み書きそろばん、AI。経営者が AI を自分で動かせるようになるコミュニティ。

Skills can use subagents, Subagents can use skills — Claude Code の再帰的委譲パターン | AIFCC