Agent skill

Context-Aware Skill Router

by yzhao062 in yzhao062/anywhere-agents

Reads the working directory, file types and prompt to pick the right domain skill automatically, and decides when a task needs a brainstorm-plan-execute-verify workflow instead of a direct dispatch.

Apache-2.0Auto-check passedAgent Workflows

Install Context-Aware Skill Router

skills CLI
$ npx skills add yzhao062/anywhere-agents --skill my-router -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yzhao062/anywhere-agents my-router --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yzhao062/anywhere-agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/my-router .claude/skills/my-router && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
my-router
GitHub stars
253
Token cost
~2.7k tokens
SKILL.md length
1,434 words
Files
3 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reads the working directory, file types and prompt to pick the right domain skill automatically, and decides when a task needs a brainstorm-plan-execute-verify workflow instead of a direct dispatch.

  • Works in 3 steps: Prompt keywords (highest priority) → File types in working directory → Project structure hints
  • Picking which domain skill applies to an ambiguous request automatically
  • SKILL.md covers Overview, When to Use Superpowers vs.…, Integration with Superpowers and How Routing Works, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill sits between an outer brainstorm, plan, execute, verify workflow and a set of domain skills, reading context so the user does not have to name a skill by hand. Its shipped routing table has concrete entries for six bundled skills, and is designed to be extended: a fork of the repository edits the routing table file directly, while a consuming project instead registers its own skills in a bootstrap-proof local file so the entries survive every bootstrap overwrite.

A decision table picks the route: a clear, scoped task with an obvious skill match goes straight to direct dispatch, an open-ended or ambiguous task goes through the full brainstorm-plan-execute-verify cycle with the router dispatching during execution, a quick edit or fix skips routing entirely, and an explicit effort signal word in the prompt, such as thorough or in-depth, always triggers the full cycle with extended thinking enabled regardless of how clear the task looks.

When your agent uses it

  • Picking which domain skill applies to an ambiguous request automatically
  • Deciding whether a task needs full planning or can be dispatched directly
  • Registering a new project-local skill so the router can dispatch to it

Example prompts

  • “Route this request to review the staged changes to the right skill.”
  • “This is an open-ended task to restructure the paper; plan it before dispatching.”
  • “Register my new skill in the local routing table so the router can find it.”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Prompt keywords (highest priority)
  2. File types in working directory
  3. Project structure hints

What it can do on your machine

Read from SKILL.md and the folder at commit cf06569. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Context-Aware Skill Router loads about 2.7k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 68 tokens; SKILL.md has 1,434 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yzhao062/anywhere-agents at commit cf06569, republished under its Apache-2.0 licence (© yzhao062). 1,434 words, ~2,720 tokens.

Download SKILL.mdSave it as .claude/skills/my-router/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
my-router
description
Context-aware router that detects work type and dispatches to the right skill. Ships with a minimal default routing table; extend it in a fork, or register project-local skills in a consuming repo via routing-table.local.md or an AGENTS.local.md Routing section.

My Router

Overview

A routing layer that sits between the outer workflow (e.g., superpowers brainstorm/plan/execute/verify) and domain skills. The router reads the working directory, file types, and user prompt to decide which skill to invoke, so the user does not need to remember skill names.

In this repo's shipped form, the routing table has concrete entries for the six shipped skills (implement-review, ci-mockup-figure, readme-polish, editable-figure, my-router itself, and prun for explicit parallel fan-out intent). It is also designed as a pattern you extend. A fork of this repo edits references/routing-table.md directly. A consuming project, where that file is overwritten on every bootstrap, instead registers its own skills in a bootstrap-proof local file (routing-table.local.md at the repo root, or a ## Routing section in AGENTS.local.md); the router reads those rows and dispatches to them. See Extending the Router.

When to Use Superpowers vs. Direct Dispatch

The router decides this. Not all tasks need superpowers' full ceremony.

Task shapeRouteWhy
Clear, scoped task with an obvious skill match (e.g., "review staged changes")Direct dispatch — router picks the domain skill and runs it immediatelyBrainstorming and planning add no value when the task is already well-defined
Open-ended, multi-step, or ambiguous task (e.g., "build a new feature", "restructure the paper")Superpowers first — brainstorm → plan → execute (router dispatches during execute) → verifyThese benefit from thinking before doing
Quick edit or fix (e.g., "fix the typo on line 42", "rename this variable")Neither — just do it directlyNo routing or workflow needed
Effort signal words in prompt (e.g., "extensively", "deep", "thorough", "in-depth", "carefully", "comprehensive")Superpowers + extended thinking — enable extended thinking (Alt+T) and route through superpowers regardless of task shapeThe user is explicitly asking for more deliberation

The rule: if the domain skill is obvious and the scope is clear, skip superpowers and dispatch directly. If the task needs exploration or planning, let superpowers run the outer loop and the router dispatches during execution. If the user signals they want deep effort, always use superpowers with extended thinking enabled.

Integration with Superpowers

When superpowers is active, it handles workflow phases: brainstorm → plan → execute → verify. The router activates during the execute phase and dispatches to the right domain skill.

When superpowers is not active (direct dispatch or quick task), the router works standalone.

How Routing Works

At dispatch time, the router checks three signals in order (keywords, file types, project structure). In a consuming project, before applying the shipped table below, it first merges any consumer-local routing extensions: a routing-table.local.md at the repo root, or a ## Routing section in AGENTS.local.md. These two files survive bootstrap (the shipped table does not), so they are where a consuming repo registers its own skills; on a keyword or file-type conflict, the local row wins. See Extending the Router.

1. Prompt keywords (highest priority)

The user's prompt often contains the clearest signal. The shipped routing table includes keyword entries for implement-review, ci-mockup-figure, readme-polish, and editable-figure. Add entries for your own skills in your fork's references/routing-table.md, or, in a consuming project, in a bootstrap-proof local file (see Extending the Router).

When a figure request explicitly asks for PowerPoint or native editability, take the editable-figure route ahead of the generic figure, README-polish, or slide routes. A request to simplify an existing editable figure stays on that route. An explicit HTML mockup, TikZ, screenshot, or prompt-only request keeps its requested format. Before taking that route, check that the session can perform the desktop PowerPoint validation editable-figure requires. If it cannot, explain the limitation and offer ci-mockup-figure only when its output fits the request. Do not silently substitute HTML for an explicitly requested PPTX.

See references/routing-table.md for the current table and the extension template.

For a paper or proposal explanatory figure, especially an overview or "Figure 1", read editable-figure/references/gallery/index.md through the normal skill lookup. Do this whichever figure skill the route selects, including a project-local variant such as nsf-figure-builder. When working for Yue Zhao, enforce its required preference-first design protocol as the top design priority. Inspect selected images and feedback, map confirmed qualities to the new design, and carry that mapping into prompts and implementation. Compare the result against those references. Preserve the requested output format; reading the gallery does not require PowerPoint or change a prompt-only task into a figure build.

2. File types in working directory

If prompt keywords are ambiguous, inspect the files being worked on. The shipped router recognizes staged git changes → implement-review, HTML mockup files for dashboards/timelines → ci-mockup-figure, a top-level README.md flagged for polish → readme-polish, and .pptx figure sources beside a paper, proposal, or README → editable-figure. Add your own file-type rules when you add new skills.

3. Project structure hints

Some projects declare their type in AGENTS.local.md or via directory naming conventions (e.g., a proposals/ or papers/ directory, or a submodule pointing at a shared editorial repo). Use these hints to pick content-aware behavior when relevant to your skills.

Show full SKILL.md (625 more words)Show less

Dispatch Rules

  1. Local-first override: before dispatching, scan skills/ (project-local) for any skill that is a more specific variant of the matched skill. If a local variant exists, use it instead of any pack-deployed or bootstrapped copy.
  2. If a prompt keyword matches → invoke that skill.
  3. If file context matches but prompt is vague (e.g., "help me with this") → state the detected context and proposed skill, ask the user to confirm before proceeding.
  4. If multiple skills could apply → state the candidates and ask the user to choose.
  5. If nothing matches → fall through to superpowers or general agent behavior. Do not force a skill where none fits.

Skill Lookup Order

In consuming project repos, skills can be project-local, pack-deployed, or bootstrapped from shared config. When dispatching, look for each skill in this order:

  1. skills/<name>/SKILL.md: project-local (highest priority). Projects can add their own skills here.
  2. .claude/skills/<name>/SKILL.md: pack-deployed by anywhere-agents pack install. The .claude/ prefix is a historical Claude Code convention; the SKILL.md contents are agent-agnostic.
  3. .agent-config/repo/skills/<name>/SKILL.md: bootstrapped from the shared config repo.
  4. Installed plugins: agent-specific plugin skills (e.g., Claude Code plugins), check /skills output.

If a project-local skill matches the task better than a pack-deployed or bootstrapped skill, prefer the project-local one. The router itself follows this same lookup order.

Extending the Router

Where you register a new skill depends on whether you own this repo or only consume it. The mechanism is the same: a routing row keyed on prompt keywords, file types, and directory hints. Only the location differs, and it must survive your config-refresh path.

In a fork of this repo (you own the shipped table):

  1. Add the skill directory under skills/<your-skill>/.
  2. Add a row to references/routing-table.md.
  3. Add a matching .claude/commands/<your-skill>.md pointer so Claude Code can invoke it directly.

In a consuming project (this skill arrives via bootstrap or anywhere-agents pack install):

Do not edit references/routing-table.md here. Every on-disk copy (.agent-config/repo/skills/my-router/, .claude/skills/my-router/) is overwritten on the next bootstrap or pack verify --fix. Register your skill where bootstrap never reaches:

  1. Add the skill directory under skills/<your-skill>/ (project-local, bootstrap-proof by construction).
  2. Register its routing in either of these bootstrap-proof files:
    • routing-table.local.md at the repo root, using the same table format as references/routing-table.md; or
    • a ## Routing section in AGENTS.local.md, convenient when you already keep project overrides there.
  3. Optionally add a project-local .claude/commands/<your-skill>.md pointer. The bootstrap copy step is non-destructive and never deletes command files absent from upstream, so a consumer-only pointer survives.

At dispatch time the router merges these local rows on top of the shipped table; on a keyword or file-type conflict, the local entry wins. Both routing-table.local.md and AGENTS.local.md sit outside the set of files bootstrap rewrites, so the registration persists across refreshes.

Combining with Implement-Review

When review is needed after a domain skill finishes:

  1. Domain skill runs (e.g., code changes, paper edits)
  2. Changes are staged
  3. Router dispatches to implement-review with the appropriate lens (code, paper, proposal, general)
  4. Reviewer applies the lens-specific criteria

See implement-review/SKILL.md for the review loop protocol.

Examples

User says: "Review this" → Router detects: staged changes exist → dispatches to implement-review; content-type lens (code, paper, proposal, general) selected based on staged files.

User says: "Build the feature and review it" → Router detects: code context → superpowers handles the build, then router dispatches to implement-review with code lens.

User says: "Make an HTML mockup for the method figure" → Router detects: keyword "mockup" → dispatches to ci-mockup-figure.

User says: "Polish the README with modern patterns" → Router detects: keyword "polish README" → dispatches to readme-polish.

User says: (anything else, shipped router has no rule) → Router falls through to superpowers or general agent behavior. Add more rules in references/routing-table.md (in a fork) or in routing-table.local.md / an AGENTS.local.md ## Routing section (in a consuming project).

© yzhao062, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/my-router of yzhao062/anywhere-agents.

  • SKILL.md
  • agents/openai.yaml
  • references/routing-table.md

Open the folder on GitHubat commit cf06569

Compare with similar skills

Context-Aware Skill Router next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context-Aware Skill Router compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context-Aware Skill Router this skillyzhao062/anywhere-agents253—~2.7kAutomated safety check: PassApache-2.0
Executing Plans Inlineobra/superpowers297k2 repos~5.1kAutomated safety check: PassMIT
Interview Meaddyosmani/agent-skills104k6 repos~3.8kAutomated safety check: PassMIT
OpenSpec Guided OnboardingFission-AI/OpenSpec72k1 repos~4.5kAutomated safety check: PassMIT
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Writing Plansgeeksblabla/stateofdev.ma16357 repos~661Automated safety check: PassNone

Similar skills

  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    297k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Interview Me

    addyosmani/agent-skills

    Asks one question at a time, each with a best guess attached, until the agent is about 95 percent sure what you really want, before any plan, spec or code.

    104k GitHub starsUsed in 6 repos~3.8k tokens
    Agent WorkflowsAuto-check passed
  • OpenSpec Guided Onboarding

    Fission-AI/OpenSpec

    Walks you through a complete OpenSpec workflow cycle with narration while doing real work in your codebase.

    72k GitHub starsUsed in 1 repo~4.5k tokens
    Agent WorkflowsAuto-check passed
  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Writing Plans

    geeksblabla/stateofdev.ma

    A skill your agent uses when design is complete and you need detailed implementation tasks for engineers with zero codebase context - creates comprehensive implementation plans with exact file…

    163 GitHub starsUsed in 57 repos~661 tokens
    Agent WorkflowsAuto-check passed
  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    104k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed

More from yzhao062/anywhere-agents

  • Parallel Run Fan-Out

    yzhao062/anywhere-agents

    Fans a task out into independent units that run on a separate Gemini-based agent pool, while the current session only coordinates.

    253 GitHub stars~9.8k tokensUpdated 2 days ago
    Auto-check passed
  • Editable Figure Designer

    yzhao062/anywhere-agents

    Designs editable PowerPoint overview figures, especially Figure 1 for papers and proposals, from source material and the author's own visual preferences.

    253 GitHub stars~7.2k tokensUpdated 2 days ago
    Auto-check passed
  • Readme Polish

    yzhao062/anywhere-agents

    Audit a GitHub README and rewrite it using modern 2025-2026 patterns — centered header, badges, hero image, GitHub alert callouts, emoji-prefixed features, expandable details, Mermaid diagrams…

    253 GitHub stars~3.7k tokensUpdated 2 days ago
    Auto-check passed
  • CI Mockup Figure

    yzhao062/anywhere-agents

    Create paper and proposal figures guided by confirmed visual preferences and efficient use of page space.

    253 GitHub stars~7.5k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Context-Aware Skill Router

What does Context-Aware Skill Router do?

Reads the working directory, file types and prompt to pick the right domain skill automatically, and decides when a task needs a brainstorm-plan-execute-verify workflow instead of a direct dispatch. The skill sits between an outer brainstorm, plan, execute, verify workflow and a set of domain skills, reading context so the user does not have to name a skill by hand. Its shipped routing table has concrete entries for six bundled skills, and is designed to be extended: a fork of the repository edits the routing table file directly, while a consuming project instead registers its own skills in a bootstrap-proof local file so the entries survive every bootstrap overwrite.

When should I use Context-Aware Skill Router?

Context-Aware Skill Router fits situations like: picking which domain skill applies to an ambiguous request automatically; deciding whether a task needs full planning or can be dispatched directly; registering a new project-local skill so the router can dispatch to it.

How do I install Context-Aware Skill Router in Claude Code?

Run `npx skills add yzhao062/anywhere-agents --skill my-router -a claude-code`. Or copy the skill folder (skills/my-router in yzhao062/anywhere-agents) into .claude/skills/my-router in your project. Claude Code loads it when a task matches its description.

How do I install Context-Aware Skill Router in Codex?

Run `npx skills add yzhao062/anywhere-agents --skill my-router -a codex`. Or copy the skill folder (skills/my-router in yzhao062/anywhere-agents) into .agents/skills/my-router in your project. Codex loads it when a task matches its description.

Can I use Context-Aware Skill Router in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yzhao062/anywhere-agents --skill my-router -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/my-router, .gemini/skills/my-router, .github/skills/my-router and .opencode/skills/my-router in your project.

What does Context-Aware Skill Router need to run?

SKILL.md names no scripts, command-line tools or credentials: Context-Aware Skill Router is instructions for the agent only.

Does Context-Aware Skill Router access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Context-Aware Skill Router safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Context-Aware Skill Router use?

Context-Aware Skill Router is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Context-Aware Skill Router use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Context-Aware Skill Router?

Skills that share tags, products or a category with Context-Aware Skill Router: Executing Plans Inline (obra/superpowers, 297k stars), Interview Me (addyosmani/agent-skills, 104k stars), OpenSpec Guided Onboarding (Fission-AI/OpenSpec, 72k stars) and Darwin Skill Optimizer (alchaincyf/darwin-skill, 6.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context-Aware Skill Router?

yzhao062 (a GitHub user) maintains it in yzhao062/anywhere-agents, which has 253 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 8, 2026.

Source: yzhao062/anywhere-agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.