Notes from building the `skill-manager-router` skill — how to stop a large AI skill library from becoming chaos. Agar tumhare paas bhi 50+ skills hain, ye architecture rescue karega.
Problem
Hermes 100+ skills ho sakte hain. Ek task aata hai ("traffic drop?") aur 5 skills activate ho jati hain — sab apna analysis dete hain, conflict ho jata hai. Output confusing ho jata hai, aur agent galat skill ke conclusion pe action leta hai. More skills ≠ more intelligence. Zyada skills sirf zyada confusion laate hain agar unhe manage na kiya jaye.
Doctrine (6 rules)
1. **More skills do NOT automatically mean more intelligence.** Ek focused skill 10 generic skills se better hai.
2. **Har skill ka clear domain, trigger, exclusions hona chahiye.** Agar ye nahi hai, skill incomplete hai.
3. **One task = one primary skill.** Support max 2 ho sakte hain.
4. **Support skills tools hain, competing decision-makers nahi.**
5. **Duplicate skills merge ya deprecate karo.**
6. **Value-na-dikhaye skill default inactive raho.**
Mandatory metadata (har SKILL.md mei)
name, version, domain, purpose, triggers, exclusions,
inputs, outputs, primary_or_support, priority, dependencies,
conflicts_with, source_requirements, health_status,
usage_count, success_count, last_error
Ye 16 fields har skill ko self-describing banate hain. Bina iske, router decide nahi kar sakta kon sa skill kis task ke liye hai.
Router decision tree (10 steps)
1. Parse user/task intent.
2. Determine domain.
3. Retrieve candidate skills from registry.
4. Remove excluded/conflicting skills.
5. Rank by: specificity > health > recency > success history > dependency availability.
6. **Select exactly ONE PRIMARY.**
7. Add max TWO SUPPORT skills only if required.
8. Execute.
9. Validate output.
10. Record outcome (usage_count++, success/fail).
Step 6 sabse important hai — ek se zyada primary hone se conflict guaranteed hai.
Context budget guard
MAX_PRIMARY_SKILLS = 1
MAX_SUPPORT_SKILLS = 2
MAX_ACTIVE_SKILL_DOCS = 3
MAX_DUPLICATE_CAPABILITY = 1
Load: summary metadata first; full SKILL.md only for SELECTED skills. Isse context window bachaata hai aur speed badhti hai.
Conflict resolution
Last point critical hai: agent kabhi bhi do alag skills ke contradictory answers mix nahi karega. Wo uncertainty report karega.
Real script I built
`registry_scan.py` saare skills scan karta hai, metadata extract karta hai, `registry.json` mei dump karta hai. Multi-domain skills flag karta hai consolidation ke liye.
`route.py
Maine 15 skills scan kiye — multiple skills same domain mei mile (publishing, seo variants). Ye consolidate karne ke candidates hain.
Example: SEO routing
| Task | Primary | Support |
||||
| Why did traffic drop? | gsc-intelligence | ga4-intelligence |
| Why is this page slow? | technical-seo-guardian | none |
| What article next? | content-opportunity-hunter | gsc-intelligence |
| Write evidence article | citation-article-engine-v2 | content-opportunity-hunter |
| Why not indexed? | indexing-sitemap-guardian | technical-seo-guardian |
| Who cited us? | entity-citation-monitor | none |
Consolidation rule
Jab `conflicts_with` ya overlapping triggers mile:
Why this matters for autonomous agents
Autonomous agent (jaise Hermes mesh) bina router ke random skills activate karega. Ek simple "article likho" task 5 skills trigger kar dega — seo-system, hindi-writer, publishing, governance, social. Router ensures: primary = seo-system, support = hindi-writer + social. Baaki exclude.
My experience
Pehle mere paas 11 skills the bina metadata. Task aata tha toh sab respond karte the. Ab `registry_scan` + `route.py` se exactly 1 primary milta hai. Output clarity 10x better hai, aur agent faster decide karta hai.
FAQ
**Q: Har skill mei 16 fields bharna zaroori hai?** Haan, at least name/domain/triggers/health_status. Baaki progressive fill karo.
**Q: Duplicate kaise identify karu?** `registry_scan.py` multi-domain report deta hai. Manual bhi: triggers overlap dekho.
**Q: Router khud skill hai ya system?** Dono — ek skill jo doosre skills ko route karta hai.
Common mistakes
1. **2 primary skills choose karna** — conflict guaranteed.
2. **Metadata skip karna** — router blind ho jata hai.
3. **Deprecated skills delete kar dena** — pinned hone par nuksan. Inactive rakho.
4. **Context budget ignore karna** — saare SKILL.md load karo toh context bharta hai.
*Infra note. Not trading/investment advice.*
Deep dive: ranking function kaise kaam karti hai
Router har candidate skill ko score karta hai. Formula simplified:
score = (trigger_matches × 2)
+ (health_rank × 2)
+ (success_count × 0.01)
+ recency_bonus
`trigger_matches`: task description mei jo words skill ke triggers/domain me hain, unka count. "traffic drop" task mei agar skill ke triggers mei "traffic", "ranking", "gsc" hain aur task mei "traffic" hai, +2.
`health_rank`: active=3, verified=3, experimental=2, inactive=1, deprecated=0.
`success_count`: historical wins. Zyada weight nahi (0.01) taaki new skill bhi chance paye.
Final: top scorer = PRIMARY. Agle 2 (score > 1) = SUPPORT.
Registry.json structure (real)
{
"gsc-intelligence": {
"domain": "seo/gsc",
"triggers": "traffic drop, ranking, query performance, ctr",
"health_status": "active",
"source_requirements": "GSC_OAUTH_TOKEN",
"success_count": 12
},
"citation-article-engine-v2": {
"domain": "content/creation",
"triggers": "write article, draft, evidence",
"health_status": "active",
"success_count": 30
}
}
Is JSON ko `route.py` read karta hai. Har task pe rebuild nahi, sirf `registry_scan.py` jab skills change hon.
Scenario: "NIFTY article likho with SEO"
Bina router: seo-system + hindi-writer + publishing + social + nse-options-mcp sab trigger ho jayenge.
Router ke saath:
Result: 1 primary + max 2 support. Clean.
Scaling to 100+ skills
Jab 100 skills ho jayengi:
Ye hi difference hai working agent aur chaotic agent mei.
Kyun maine ye banaya
Mera mesh 3 nodes pe chalta hai (Mac + 2 phones). Har node alag skills chala raha tha. Ek task "publish karo" pe Mac pe 5 skills activate ho rahe the, phones pe alag. Inconsistency thi. Router ne standardize kiya — har node same routing logic use karta hai.
Migration guide (apne skills par lagao)
1. Har SKILL.md ke frontmatter mei 16 fields add karo.
2. `registry_scan.py` run karo → registry.json banega.
3. Har task pe `route.py` call karo pehle.
4. Conflicts resolve karo (merge duplicates).
5. Health status update karo har week.
2 ghante ka kaam, lifetime ki clarity.
*Infra note. Not trading/investment advice.*
More From Shakti Tiwari
Real implementation notes
Maine `registry_scan.py` pehli baar 15 skills pe chalaaya. Output mei multi-domain conflicts mili — `governed-publishing-discipline` aur `governed-content-publishing` dono "publishing/governance" domain mei. Consolidation candidate. `route.py` ne "why did traffic drop" ke liye `gsc-intelligence` ko top rank diya (trigger match + active health).
Scaling lessons
Jab 50+ skills ho jayengi, manual metadata impossible hai. Isliye mandatory 16 fields frontmatter mei — `registry_scan` automate kar leta hai. New skill add karte hi metadata bharo, warna router usse ignore karega (health_status default inactive).
Why this is infrastructure, not optional
Autonomous mesh (3 nodes) mei har node alag skills chala raha tha. Ek task pe inconsistent responses. Router ne standardize kiya — har node same logic. Is bina, distributed agent chaos hai.
*Infra note. Not trading/investment advice.*
Final recommendation
Agar tumhare paas 10+ skills hain, aaj hi `registry_scan` banao. Conflicts visible honge. Ek primary rule enforce karo. 1 week mei agent ki clarity 10x ho jayegi.
*Infra note. Not trading/investment advice.*
Skill chaos silent killer hai. More skills = more confusion jab tak router na ho. 16 fields + 1 primary rule = scalable intelligence.
*Infra note. Not trading/investment advice.*
Build the router before you build the 50th skill. Order matters — chaos pehle aati hai, discipline baad mei nahi.
*Infra note. Not trading/investment advice.*
A well-routed skill library scales. A chaotic one collapses. Choose routing.
*Infra note. Not trading/investment advice.*
One more principle
Router khud ek skill hai jo doosre skills ko route karta hai — isliye ise "meta-skill" kehte hain. Iska apna koi conclusion nahi hota, sirf routing. Ye separation of concerns hai: decision skills decide karein, router sirf assign kare.