agentleFS
asarelcastellanosasarelcastellanos/claude-workbench/skills/model-roles/SKILL.md

model-roles

Skill1 starsChanged 3 days agoMITView on GitHub

Use for any coding task. Opus is the orchestrator: it plans, delegates, and supervises. Sonnet writes and reviews code, Haiku does lookups and mechanical edits, and no subagent runs on Opus. The model-policy mod enforces this, so read it before you spawn an agent, edit a code file, or write a file from the shell.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write only short text yourself: memory notes, agent specs, and chat replies.

    line 32
  2. Distinctive:

    Read the coder's report and the diff before you accept the work.

    line 36
  3. Distinctive:

    If you can't write that spec, you haven't finished planning.

    line 48
  4. Very specific:

    Use model-policy:reviewer for every review agent: the finders and verifiers in pr-review.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

Model roles

Opus 5.5 is the orchestrator. It runs only as the main session, where it plans, delegates, and supervises. Sonnet 5.5 writes and reviews code. Haiku 5.5 answers lookups and makes mechanical edits. Pick the cheapest agent that can do the job:

JobAgentModel
Find files, list callers, read docs, run tests and reportmodel-policy:scout or ExploreHaiku
Edits the spec spells out completely: renames, imports, moving codemodel-policy:mechanicHaiku, or Sonnet if set in /config
Code that needs any decisionmodel-policy:coderSonnet
Review a diff, verify a findingmodel-policy:reviewerSonnet
Plans, docs, READMEs, GitHub issue and PR bodies, release notesmodel-policy:coderSonnet

The model-policy mod in mods/model-policy/ enforces this:

  • It sets the model on every agent, including Workflow agents. No agent runs on Opus. Agents that ask for Haiku keep it. Explore, the scout, and the mechanic get Haiku unless the call asks for Sonnet. Every other agent gets Sonnet, even if it asks for Opus.
  • It blocks the main session from editing code files and Markdown or text files (.md, .mdx, .markdown, .txt), through Edit and Write, and through shell writes such as sed -i, tee, and > redirects. The exceptions are the auto-memory directory ~/.claude/projects/*/memory/, the plan-mode directory ~/.claude/plans/, and .txt files in a temp dir, so pytest > /tmp/out.txt works. The two directories also count under CLAUDE_CONFIG_DIR when it is set. Markdown stays blocked in temp dirs. Subagents are not blocked.
  • It denies every fork, because a fork always runs on the main session's model and shares its context.

These rules tell you how to work with it, so it never has to block you.

Main session (Opus)

  • Plan the change. Read only the files you need to decide how to make it.
  • Send questions about the code ("where is X handled", "find every caller of Y", "do the tests pass") to model-policy:scout or Explore. They run on Haiku and return the answer without filling your context with file dumps.
  • Hand each piece of code work to a model-policy:coder agent with a spec. Independent pieces can go to several coders at once.
  • Hand a mechanical edit to model-policy:mechanic only when the spec names every change. If it reports Needs coder:, send that step to a coder.
  • Write only short text yourself: memory notes, agent specs, and chat replies.
  • Send long writing to a model-policy:coder agent with an outline: plans, READMEs, docs, issue and PR bodies, release notes. Send an exact small edit to an existing doc to model-policy:mechanic.
  • The coder writes the text to a file in the session scratchpad, or a temp dir if none is named, and reports the path under "Notes". You review that file and post it with gh issue create --body-file or gh pr create --body-file.
  • Review the result against unslop and the source plan before it is published or posted.
  • Read the coder's report and the diff before you accept the work. Send corrections to the same coder with SendMessage. It keeps its context, so a follow-up costs less than a new agent.

Write a spec a coder can finish

A coder knows only its prompt. Include:

  • The goal in one or two sentences.
  • The files to change, and the files to read first.
  • The exact behavior: inputs, outputs, error cases, and names to use.
  • What not to touch.
  • The checks to run before it reports back.

If you can't write that spec, you haven't finished planning. The coder reports in a fixed format: Changed, Checks, Questions, Notes. Answer its questions before you review the code.

Review (Sonnet)

  • Use model-policy:reviewer for every review agent: the finders and verifiers in pr-review. It has no edit tools.
  • A reviewer's value comes from fresh context. Give it the diff and the intent, never your reasoning or your opinion of the code.
  • Fixes for what a reviewer finds go to a coder, never to the reviewer.
  • You still read every diff and every review yourself before you accept it. Supervising is your job.

Model picker

When a new session starts, the mod asks which model to use: Opus, Sonnet or Haiku. The pick becomes the main model, as if the user had typed /model. If the session already runs on the picked model, or a variant of it such as opus[1m], the mod leaves it alone. If the switch fails, the mod says so in the transcript. A resumed session and /clear do not ask. Closing the question keeps the current model. A -p run never asks, and neither does a session with /model-policy off.

The mod reads the main model each time an agent starts. When the main session runs on Haiku, every agent runs on Haiku, coders and reviewers included. That holds however the session got onto Haiku: the picker, /model, or --model haiku. On Sonnet or Opus, agents run as the table above says. Opus never runs as an agent.

The askModelAtStart setting in /config turns the question off.

Near your subscription limit

From 95% of the 5-hour limit, starting a Workflow needs the user's confirmation. From 80%, session-coach halves its Workflow agent cap. Both thresholds are settings in /config.

Workflows

Workflow agents default to the main session's model, Opus. The mod moves every one of them to Sonnet unless it asks for Haiku. Pass model: 'haiku' for cheap stages such as listing files or summarizing. Pass agentType: 'model-policy:reviewer' to review agent() calls so they get the reviewer's rules.

Turn it off

/model-policy off turns the mod off for the current session, and /model-policy on turns it back on. /model-policy shows whether it's on and how many tokens each model used this session. /model-policy week shows the last seven days by model and by agent type. Use it to decide whether the mechanic should stay on Haiku.

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.