skill-router
Select the right skill for a task when the best match is unclear. Use when facing an unfamiliar task domain, when multiple skills could apply, when unsure whether a skill exists for the current work, when the agent needs to decide between overlapping skills, or when a user asks what is the best approach or how to handle a specialized domain. Trigger: which skill should I use, what skill handles, multiple skills apply, is there a skill for, choose between skills, skill selection, ambiguous task routing, disambiguation. Do NOT trigger for: clearly defined tasks with one obvious skill match, pure code implementation.
- License 许可
- MIT
- 最近更新
- 2026-08-27
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- skill-router
- license
- MIT
- trigger
- always
- metadata
- { "author": "Community", "status": "stable", "version": "3.2", "category": "ai-agents" }
- description
- Select the right skill for a task when the best match is unclear. Use when facing an unfamiliar task domain, when multiple skills could apply, when unsure whether a skill exists for the current work, when the agent needs to decide between overlapping skills, or when a user asks what is the best approach or how to handle a specialized domain. Trigger: which skill should I use, what skill handles, multiple skills apply, is there a skill for, choose between skills, skill selection, ambiguous task routing, disambiguation. Do NOT trigger for: clearly defined tasks with one obvious skill match, pure code implementation.
- disable-model-invocation
- false
02 资源文件 2
- 参考文档evals/evals.json3.4 KB
- 参考文档references/disambiguation.md2.0 KB
03 SKILL.md 正文
Skill Router
When to invoke a skill. Progressive disclosure: system prompt <available_skills> = catalog. This = decision guide.
Usage
System prompt already lists all available skills with name, description, location. Use that catalog directly.
| Situation | Action |
|---|---|
| Task fits one skill | Invoke skill(name) to load L2 instructions |
| ≥2 skills could match | Pick most specific category: api > backend > process |
| No skill matches | Proceed without — system prompt has enough general knowledge |
| Need depth | Load references/disambiguation.md |
Disambiguation — Common Pairs
| Pair | Rule |
|---|---|
kubernetes-expert vs helm-expert |
Raw K8s YAML → kubernetes. Helm chart pkg → helm |
postgres-database-expert vs similar |
Queries/schema → postgres. Migrations → postgres also covers schema changes |
terraform-expert vs aws-cloud-expert |
IaC/.tf → terraform. AWS svc cfg → aws-cloud |
| evaluation-expert vs reasoning-expert | Quality measurement → evaluation. Fallacy detection → reasoning |
| prompt-expert vs llm-expert | Prompt design/injection → prompt. LLM ops/cost → llm |
Boot Skills (MUST load ALL 7 at session start — mechanism per host kernel: native skill tool where available, otherwise read each SKILL.md)
operating-protocol governance engineering-standards context-management tool-usage token-efficiency skill-router
Declared in content/rules/core/boot-manifest.yaml. There, trigger: always marks BOOT CATALOG MEMBERSHIP, not automatic injection: most harnesses do NOT inject skill bodies at session start. Therefore, as Step 0 of every session, load ALL 7 BEFORE any other tool call (native skill tool where available; otherwise read each SKILL.md file). Read-only tasks, small budgets, and "trivial" work NEVER waive Step 0. Skip an individual invocation ONLY if that skill's full SKILL.md body is already verbatim in context (e.g., Claude Code @import expansion).
Anti-patterns
Loading multiple skills when one suffices
// WRONG: task is a DB migration — loads both DB + migration skills
skill(postgres-database-expert)
skill(mysql-expert)
// CORRECT: pick the most specific — postgres-database-expert covers migrations + schema
skill(postgres-database-expert)
Why: Each skill load costs context budget. Load only what the immediate task needs.
Routing by single loose keyword
// WRONG: task mentions "database" for caching question
skill(postgres-database-expert) // should be redis-cache-expert
// CORRECT: require >=2 trigger keyword matches from system prompt
keywords: {"redis", "cache", "TTL"} >= 2 → redis-cache-expert
Why: Single-keyword routing causes false positives and wastes context.
Invoking skill for trivial tasks
// WRONG: loading a skill for a grep or rename
skill(git-expert) // for renaming a variable
// CORRECT: system prompt knowledge suffices — skip skill load
proceed without loading a skill
Why: Skills are for specialized domain knowledge, not general-purpose tasks.
Falling back to no skill without broader category search
// WRONG: searched "ETL" → no match → gave up
// CORRECT: search broader category "data" or "pipeline" first
system prompt categories → data → scala-expert
Why: Skills use consistent category labels; broader search finds cross-domain matches.
Verification Checklist
- [ ] Task domain classified before scanning skills
- [ ] System prompt
<available_skills>consulted first (catalog always in context) - [ ] >=2 trigger keywords matched before invoking skill
- [ ] Most specific skill selected when multiple candidates match
- [ ] No skill invoked for trivial edits (grep, rename, single-line fix)
- [ ] All 7 boot skills loaded at session start via host kernel mechanism, OR each body verified verbatim in context
Known Limitations
- System prompt skill list may be stale:
<available_skills>reflects the system prompt snapshot; new/deleted skills take effect on agent restart. Always verify withreferences/disambiguation.mdfor edge cases. - Category assignment is subjective: Some skills could fit multiple categories (e.g.,
evaluation-expertas process vs quality). When categories conflict, skill-router prefers the most narrowly scoped category. - Trigger keyword collision: Similar domain skills (
golang-expertvsjava-expert) may share keywords like "gRPC" or "REST". Use language-specific keywords for disambiguation.
References
| Resource | URL | Last verified |
|---|---|---|
| AgentSkills.io Specification | https://agentskills.io/specification | 2026-05-30 |
| Anthropic Skills Repository | https://github.com/anthropics/skills | 2026-05-30 |
04 同仓库更多 Skills
web-browsing-agent-expert
Web browsing for AI agents: driving a headless browser (Playwright, Puppeteer) from agent tooling, navigation and page-state grounding, DOM extraction and structured data capture, form interaction, session and cookie management, anti-bot mitigation awareness, and safe browsing rules (no PII exfiltration, respect robots and terms). Use when building a browsing tool or MCP server for an agent, teaching an agent to navigate and read web pages, extracting structured content from dynamic sites, or handling login walls and pagination in agent workflows. Trigger: web browsing agent, headless browser, Playwright MCP, Puppeteer, browser automation for agents, DOM extraction, page navigation, session management. Do NOT trigger for: end-to-end UI testing of an application (use playwright-expert); writing standalone scraping scripts for data pipelines (use python-expert); fetching a single public URL (use the fetch tool).
vector-databases
Design and operate vector databases for cloud-native AI features. Use when selecting between pgvector, Pinecone, or Weaviate for AI context layer or integration-hub; designing embedding schemas and index parameters; implementing ANN search with metadata filtering; managing embedding model versions; optimizing query latency; or debugging low retrieval quality. Pairs with rag-architecture for pipeline design and postgres-database-expert for pgvector specifics. Trigger: vector database, pgvector, Pinecone, Weaviate, embedding, ANN search, HNSW, cosine similarity. Do NOT trigger for: relational SQL optimization, standard PostgreSQL schema design, Redis caching.
typescript-expert
Full-stack TypeScript stack for modern projects: frontend SSR/CSR with Next.js 14 App Router and React, backend APIs with Node.js (Express/Fastify), state management with Zustand/Redux Toolkit, unit and integration testing with Vitest/Jest + React Testing Library + MSW, and static analysis with ESLint/Prettier/tsc. Use when building React components or hooks, implementing Next.js App Router or Server Components, writing Node.js REST API handlers, implementing middleware (auth, rate-limit, logging), managing client state (Zustand/RTK), writing frontend/backend tests, or running TypeScript linting/type checks. Trigger: TypeScript, Next.js, React, Zustand, Node.js, Express, Fastify, MSW, Vitest. Do NOT trigger for: Python backend development, Go microservices, iOS/mobile development.
tool-usage
Guide correct tool selection, design, and orchestration for AI agents. Use when choosing between dedicated vs Bash tools, designing MCP tool interfaces, naming tool parameters, handling tool response limits, orchestrating parallel vs sequential calls, evaluating tool accuracy, applying ACI design principles, selecting workflow patterns, or reading/filtering/transforming/generating structured data (JSON, YAML, CSV, TOML, XML). Trigger: tool selection, MCP tool design, orchestration, ACI, parallel execution, composite tool, structured data, jq, yq, dasel, mlr, csvkit. Do NOT trigger for: writing application business logic, domain-specific development (route to domain skill), database migrations.
token-efficiency
Enforce token-efficient output, compression, caching, and model routing. Use when calibrating response verbosity, applying compression strategies to logs or RAG chunks, routing tasks to the right model tier, setting thinking budgets, enforcing word limits, compressing context before reinitiation, applying KV-cache ordering, masking tool output observations, or applying clarification-first protocol before irreversible actions. Trigger: token efficiency, compression, model routing, thinking budget, KV-cache, clarification protocol. Do NOT trigger for: non-agent tooling, CI/CD pipeline scripting, infrastructure provisioning.
time-series-db
Time-series database patterns for cloud-native metrics and analytics: TimescaleDB, InfluxDB, and Amazon Timestream selection; continuous aggregates, retention policies, downsampling, and integration with Prometheus/Grafana. Use when storing business metrics over time, building custom business dashboards, designing high-frequency event storage, or querying time-bucketed aggregations. Trigger: time-series, TimescaleDB, InfluxDB, Prometheus, Grafana, hypertable, continuous aggregate, retention policy. Do NOT trigger for: relational PostgreSQL schema design, NoSQL document stores, Kafka event streaming.