agentleFS
Scylla23Scylla23/modelrouter/AGENTS.md

modelrouter

AGENTS.md1 starsChanged 4 months agoMITView on GitHub

ModelRouter is a zero-dependency Claude Code plugin. Runtime logic lives in scripts/ as single-file CommonJS programs. hooks/hooks.json connects those scripts to Claude Code events. Agent definitions are in agents/, while each command or routing capability has its own skills/<name>/SKILL.md. Default user state is copied from defaults/. Keep architectural documentation in docs/ and demo instructions in DEMO.md. Development fixtures live under .route/fixtures/: .router/ is per-repo runtime state (log.jsonl, gitignored), while .route/ is the gitignored dev harness (plans, fixtures, checkpoints). Plugin metadata…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository10 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the relevant script directly after changes, then exercise the matching checkpoint documented in CONTRIBUTING.md using the .route/*.sh …

    line 27
  2. Very specific:

    Use two-space indentation, semicolons, double-quoted strings, and CommonJS require() with explicit node: prefixes.

    line 33
  3. Very specific:

    Follow the existing Conventional Commit style: feat:, fix:, or chore:, with a concise imperative summary.

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Repository Guidelines

Project Structure & Module Organization

ModelRouter is a zero-dependency Claude Code plugin. Runtime logic lives in scripts/ as single-file CommonJS programs. hooks/hooks.json connects those scripts to Claude Code events. Agent definitions are in agents/, while each command or routing capability has its own skills/<name>/SKILL.md. Default user state is copied from defaults/. Keep architectural documentation in docs/ and demo instructions in DEMO.md. Development fixtures live under .route/fixtures/: .router/ is per-repo runtime state (log.jsonl, gitignored), while .route/ is the gitignored dev harness (plans, fixtures, checkpoints). Plugin metadata belongs in .claude-plugin/plugin.json.

Build, Test, and Development Commands

There is no build step and no npm install; scripts use only Node.js built-ins.

  • claude plugin validate . validates the plugin manifest and layout.
  • for f in scripts/*.js; do node --check "$f" || exit; done checks JavaScript syntax across every hook script.
  • echo '{"prompt":"fix typo in README","hook_event_name":"UserPromptSubmit","cwd":"."}' | node scripts/inject.js smoke-tests prompt routing from stdin.
  • node scripts/stats.js renders statistics from .router/log.jsonl; set ROUTER_NOW when a deterministic date is needed.

Run the relevant script directly after changes, then exercise the matching checkpoint documented in CONTRIBUTING.md using the .route/*.sh scripts with RUN_LIVE=1.

Coding Style & Naming Conventions

Use two-space indentation, semicolons, double-quoted strings, and CommonJS require() with explicit node: prefixes. Prefer small functions and Node's standard library over dependencies. Script filenames use kebab-case (memory-card.js); skill directories use lowercase command names. Preserve the hook contract: read JSON from stdin and emit only valid JSON or intentional user-facing text. Keep Markdown direct and wrap prose near 80 columns.

Testing Guidelines

The repository uses focused smoke checks instead of a test framework or formal coverage target. Test valid input, malformed or missing local state, and the empty-data path for any changed hook. Use temporary HOME and fixture data when a script touches ~/.router so development does not overwrite personal rules. Add fixtures only when output must remain stable across runs.

Commit & Pull Request Guidelines

Follow the existing Conventional Commit style: feat:, fix:, or chore:, with a concise imperative summary; append a plan ID such as (T4.2) when applicable. Pull requests should explain behavior changes, list commands run, link the issue or plan task, and include screenshots for visible CLI or Claude Code output. Never commit API keys, personal ~/.router data, or generated .router/ logs and cards.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.