functional-area-resolver
できること
このスキルは、AIエージェントがスキルを選ぶときに使うルーティング表を圧縮する方法を説明します。スキルが数百件あり、ルーティングファイルが大きくなった人向けです。
使う場面
- ✓エージェントのルーティングファイルが長すぎて、多くの文脈を占めているとき。
- ✓多くのスキルがあり、それぞれがルーティング表の1行を占めているとき。
- ✓スキルをまとめて、エージェントが振り分けられる領域にしたいとき。
スキルのリンク
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/functional-area-resolver/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“当社のエージェントのRESOLVERファイルには数百行あります。機能領域ごとにまとめて、短くしてもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、多数の単一スキルの行を、機能領域ごとに1つのエントリに置き換えます。各エントリには、振り分け先のサブスキルを記載します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Functional-Area Resolver — Pattern for Compressing Routing Tables
Problem
Routing files (RESOLVER.md, AGENTS.md) grow as skills are added. Each skill gets its own row (trigger -> skill path). At ~200+ skills this hits 25-30KB, eating context budget that should go to actual work.
Solution: Functional-Area Dispatchers
Replace N rows per area with one entry per functional area. Each entry
lists all sub-skills it can dispatch to in a (dispatcher for: ...) clause.
Before (270 rows, 25KB)
- Creating/enriching a person or company page -> `enrich`
- Fix broken citations in brain pages -> `citation-fixer`
- Publish/share a brain page as link -> `brain-publish`
- Generate PDF from brain page -> `brain-pdf`
- Read a book through lens of a problem -> `strategic-reading`
- Personalized book analysis -> `book-mirror`
- Brain integrity -> `brain-librarian`
...
After (13 rows, 13KB)
- **Brain & knowledge**: create/enrich/search/export brain pages, filing,
citations, publishing, book analysis, strategic reading, concept synthesis,
archive mining -> `brain-ops` (dispatcher for: enrich, query, brain-pdf,
brain-publish, brain-export, brain-librarian, citation-fixer, book-mirror,
strategic-reading, concept-synthesis, archive-crawler, ...)
Why It Works
The LLM doesn't need one row per sub-skill. It needs:
- Area recognition — "this is about brain pages" -> Brain & Knowledge
- Sub-skill visibility — the
(dispatcher for: ...)list shows what's available - The skill file itself — once the LLM reads
brain-ops/SKILL.md, it has full routing detail
This is a two-layer dispatch: routing file routes to the area, the area skill routes to the specific sub-skill. Each layer does one job well.
A/B Eval Results
Three resolver architectures tested across three Anthropic frontier models (Opus 4.7, Sonnet 4.6, Haiku 4.5) on real production AGENTS.md content, 20 hand-authored training fixtures + 5 held-out blind fixtures, n=3 seeded repeats per (fixture, variant). Two scoring rules: STRICT (predicted slug exactly equals expected) and LENIENT (predicted is in the same dispatcher area as expected). Both matter:
- STRICT measures: "does the LLM return the exact slug?"
- LENIENT measures: "does the LLM land in the right area, even if it picks a
more-specific sub-skill from
(dispatcher for: ...)?" This is closer to production behavior — an agent that lands ingmailfor an email intent succeeds even if the resolver entry saidexecutive-assistant.
Training corpus (n=20, 3 seeds × 3 variants × 3 models, LENIENT)
| Variant | Opus 4.7 | Sonnet 4.6 | Haiku 4.5 | Size |
|---|---|---|---|---|
| baseline (270 bullet rows) | 81.7% ± 7.2% | 86.7% ± 7.2% | 73.3% ± 7.2% | 25KB |
| functional-areas (this pattern) | 98.3% ± 7.2% | 100% ± 0% | 88.3% ± 7.2% | 13KB |
| resolver-of-resolvers (no dispatcher clause) | 63.3% ± 14.3% | 41.7% ± 7.2% | 65.0% ± 12.4% | 10KB |
Held-out blind corpus (n=5, 3 seeds, LENIENT)
| Variant | Opus 4.7 | Sonnet 4.6 | Haiku 4.5 |
|---|---|---|---|
| baseline | 100% ± 0% | 100% ± 0% | 100% ± 0% |
| functional-areas | 100% ± 0% | 100% ± 0% | 100% ± 0% |
| resolver-of-resolvers | 100% ± 0% | 73.3% ± 28.7% | 100% ± 0% |
What the data shows
Functional-areas BEATS baseline on training across all three models (+13 to +17pp) at 48% the size. Held-out is saturated at 100% for both — within margin of error.
The
(dispatcher for: ...)clause is the load-bearing signal. resolver-of-resolvers strips that clause and collapses to 41.7% on Sonnet — the catastrophic failure case the original PR predicted, now observed.The pattern works because the LLM can drill into the dispatcher list. Most "STRICT failures" are the LLM picking a more-specific sub-skill (
gmailinstead ofexecutive-assistant). That's the pattern working as designed. STRICT scoring under-counts; LENIENT scoring reflects production agent behavior.The pattern's value scales with model tier. Compression gain (functional-areas vs baseline, training, LENIENT) is +17pp on Opus, +13pp on Sonnet, +15pp on Haiku. Sonnet shows the cleanest separation between functional-areas and resolver-of-resolvers (100% vs 41.7%) — model capacity affects how much the dispatcher signal matters.
Reproduce
cd evals/functional-area-resolver
node harness.mjs --model opus # ~225 LLM calls, ~$1.70 at Opus pricing
よくある質問
なぜ短いファイルの方が良いのですか?
スキルによると、長いルーティングファイルは本来の作業に使うべき文脈を消費してしまうためです。
ルーティングの精度は落ちませんか?
スキルでは、保留データによるテストで、振り分け方式の方が単純な表の圧縮より良い結果が出たとされています。
ファイルはどのくらいの大きさが対象ですか?
例として、約25KBで200以上のスキルがある状況が挙げられています。
詳細
作者による元の説明
Compress an agent's routing file (RESOLVER.md or AGENTS.md) by converting granular skill-per-row tables into functional-area dispatchers. Each area lists sub-skills in a "(dispatcher for: ...)" clause. The LLM reads one area entry and routes to the correct sub-skill. Proven via held-out A/B eval: dispatcher pattern outperforms naive pipe-table compression.
repo: garrytan/gbrain
人気
- GitHubのスター
- 31k
- ランキング
- #9257
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
gbrain
31kエージェントが、共有の社内ナレッジブレインで人、プロジェクト、決定事項についての事実を検索し、永続的なメモを保存できるようにします。
brain-ingest-gate
31k重複を避け、名前付きのエンティティを先に解決するため、新しい内容をナレッジブレインに追加する前に、既存のブレインと照合するようエージェントを支援します。
brain-link-discipline
31kエージェントが報告する各ブレインのページについて、同じメッセージの中で動くリンクを必ず含め、すぐに開けるようにします。
brain-ops
31kナレッジブレインの基本的な手順をエージェントに与えます。まず既存の文脈を確認し、出典つきで明示的なメモを保存し、関連するページをリンクします。
似ているスキル
writing-skills
311k新しいスキルを書き、それぞれをまず試すようエージェントに教えます。そのスキルが実際にエージェントの動作を変えることを確認します。
writing-for-agents
310kスキル、AGENTS.md、CLAUDE.mdを含め、AIエージェントのための明確な指示の書き方を説明し、エージェントが予測可能に動くようにします。
bengali-nlp
280kエージェントがベンガル語のテキストを処理できるようにします。テキストの正規化など、ベンガル語特有の性質に対応しながら、言語を理解して扱えるようにします。