orchestrate
/orchestrate
Route development work to the cheapest model that can do it well, and gate it with tests and review before it is pushed. A top-tier model plans; mid-tier models write tests, implement, debug and review; a small model scouts the codebase and handles mechanical chores such as renames, file moves and formatting. Use when the user asks to plan and build a feature, hands over multi-step or multi-file work, wants changes tested before pushing, asks to save tokens or cost, or types /orchestrate. Skip for a single small edit or a quick question.
- Author
- prayag17 ↗
- Repository
- TierwiseAgents ↗
- Licence
- MIT
- Last repository change
- 10.11.2026
Assessment and security
- Files in this package
- 14
- Scripts
- 4
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 4 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/gate.py, scripts/run_tier.py, scripts/setup.py, scripts/tw_config.py
What it does and when to use it
Route development work to the cheapest model that can do it well, and gate it with tests and review before it is pushed. A top-tier model plans; mid-tier models write tests, implement, debug and review; a small model scouts the codebase and handles mechanical chores such as renames, file moves and formatting. Use when the user asks to plan and build a feature, hands over multi-step or multi-file work, wants changes tested before pushing, asks to save tokens or cost, or types /orchestrate. Skip for a single small edit or a quick question.
Arguments
/orchestrate [task description]
Original author description
Route development work to the cheapest model that can do it well, and gate it with tests and review before it is pushed. A top-tier model plans; mid-tier models write tests, implement, debug and review; a small model scouts the codebase and handles mechanical chores such as renames, file moves and formatting. Use when the user asks to plan and build a feature, hands over multi-step or multi-file work, wants changes tested before pushing, asks to save tokens or cost, or types /orchestrate. Skip for a single small edit or a quick question.
How it works
- Roles
- 1. Resolve models
- 2. Triage
- 3. Scout (small)
- 4. Plan (top)
- 5. Build
- 6. Gates
- 7. Review
- 8. Ship
- 9. Report
SKILL.md preview
---
name: orchestrate
description: Route development work to the cheapest model that can do it well, and gate it with tests and review before it is pushed. A top-tier model plans; mid-tier models write tests, implement, debug and review; a small model scouts the codebase and handles mechanical chores such as renames, file moves and formatting. Use when the user asks to plan and build a feature, hands over multi-step or multi-file work, wants changes tested before pushing, asks to save tokens or cost, or types /orchestrate. Skip for a single small edit or a quick question.
argument-hint: "[task description]"
---
# TierwiseAgents
You are the router. Spend expensive tokens only where they change the outcome: on decisions. Everything that is "follow these instructions" goes to a cheaper model, and nothing is pushed until the code has passed its gates. Keep your own context light: delegate reading, planning, editing and debugging, and never re-read what a subagent already summarized.
Task: $ARGUMENTS
## Roles
| Role | Agent | Tier | Does |
|---|---|---|---|
| scout | `tw-scout` | small | Read-only map of the relevant code, conventions and check commands |
| architect | `tw-architect` | top | Decisions and the plan file; last stop for escalations |
| tester | `tw-tester` | mid | Tests written from the plan before the code exists |
| builder | `tw-builder` | mid | Implements one planned task |
| runner | `tw-runner` | small | Mechanical chores |
| debugger | `tw-debugger` | mid | Root cause and minimal fix for a failing check |
| reviewer | `tw-reviewer` | mid | Read-only review of the final diff against the plan |
Scripts and references named below are in this skill's directory.
## 1. Resolve models
Run `python3 scripts/run_tier.py --show`. It reads `.claude/tierwise.json` (project) or `~/.claude/tierwise.json` (user) and prints, for each role, a `kind` and a `value`:
| Kind | Meaning | How to run the role |
|---|---|---|
| `alias` | `fable`, `opus`, `sonnet` or `haiku` | Spawn the role's agent and pass the alias as `model`. |
| `model` | Any other model ID | The Agent tool's `model` parameter accepts only aliases, so the ID must be pinned in `.claude/agents/tw-<role>.md` or `~/.claude/agents/tw-<role>.md`. Spawn that agent without a `model` parameter. If the file is missing, tell the user to run `scripts/setup.py` and use the tier's default alias meanwhile. |
| `command` | An external, non-Claude coding agent CLI | `python3 scripts/run_tier.py --role <role> --brief "<brief>"` through Bash. |
Defaults are `opus` (top), `sonnet` (mid), `haiku` (small). The script never returns `fable` unless the config allows it. An instruction from the user in this conversation ("plan with fable", "review with opus") overrides the file for this run; do not choose `fable` on your own.
For an agent, use the first available: the project or user agent `tw-<role>`, then the plugin agent `tierwise-agents:tw-<role>`. If neither exists, spawn `general-purpose` with the role's alias and paste the body of `agents/tw-<role>.md` at the top of the prompt.
Details, including non-Claude models: `references/configuration.md`.
## 2. Triage
Classify before spending anything, and pick the lowest row that fits. The size of the cycle follows the size of the task.
| The task is | Cycle |
|---|---|
| A question, or an edit under about 20 lines in one file | Do it yourself. A cold subagent costs more than the edit. Run the gates before any push if the project has them configured. |
| Purely mechanical: rename, move or reorganize files, reformat, bulk replace, boilerplate from a pattern | runner → gates |
| Implementation with a clear spec already given | builder (writes its own tests) → gates → reviewer |
| A bug with an unknown cause | debugger (adds a regression test first) → gates → reviewer |
| A feature, a refactor with design choices, anything ambiguous, cross-cutting or risky | Full cycle, sections 3 to 8 |
When unsure between two rows, start with the cheaper one: escalation is cheap, over-provisioning is not.
## 3. Scout (small)
Before planning in a codebase that has not been mapped for this request, spawn the scout with the request and the path `.tierwise/context/<slug>.md`. It records the relevant files, conventions, test setup, check commands and which checks pass right now. Skip the scout for a tiny or empty repository, or when a context file for this area already exists.
A check that already fails before any change is a baseline failure. Tell the user now; do not let it be discovered at the gates and blamed on the new work.
## 4. Plan (top)
Spawn the architect with the user's request verbatim, constraints from the conversation, the context file path and the plan path `.tierwise/plans/<slug>.md`. The plan follows `references/plan-format.md`: decisions, a risk level, the gates, and self-contained tasks, each with a role, a test mode and an acceptance check.
Show the user the task list (id, role, one line each), the risk level, the gates and any open questions, then ask for a go-ahead before building, unless they already said to proceed without asking. This is the cheapest place to catch a wrong direction.
## 5. Build
For each task, in dependency order:
- The brief holds only the plan path, the task id and "read the plan, do this task, run its acceptance check". Never paste the plan or code into a brief.
- **Tests first.** For a task marked `Tests: first`, the tester's task runs before the builder's, and the builder must make those tests pass without editing them. The tester never sees the implementation; the builder never rewrites the tests. If the builder reports a test is wrong, send that to the architect, not back to the builder.
- Tasks the plan marks as parallel and that touch different files go out in one message. Tasks on an external command that share a working tree run one at a time.
- Each agent ends with `STATUS: DONE | FAILED | BLOCKED`, the files changed and the check output. Trust a Claude subagent's report; do not re-read the diff. For a role on an external command, run the task's acceptance check yourself and treat a non-zero exit or failing check as `FAILED`.
- `FAILED` or `BLOCKED`: escalate one step, passing the previous report along. runner → builder → architect. Do not retry with the same role. A blocker that says the plan is wrong goes straight to the architect.
- Mark each finished task `done` in the plan file.
## 6. Gates
When all tasks are done, run:
```
python3 scripts/gate.py --plan .tierwise/plans/<slug>.md
```
It runs every gate in order (lint, types, tests, build, smoke check, as the config or the plan's `## Gates` section lists them), stops at the first failure, and records the exact state of the code that passed. This is the only thing that counts as "the checks pass"; an agent saying so does not.
On a failure:
- If the cause is plain from the output and belongs to one task (a lint error, a missed import), send it to that task's role with the output.
- Otherwise spawn the debugger with the failing output and the plan path. It finds the root cause and applies the smallest fix.
- Run the gates again. After two failed rounds on the same gate, escalate to the architect; if that also fails, stop and bring the evidence to the user.
No one may make a gate pass by weakening it: no skipped or deleted tests, loosened assertions, lowered thresholds or silenced rules. A report that did so counts as `FAILED`.
## 7. Review
After the gates pass, spawn the reviewer with the plan path and the diff command (`git diff <base>...HEAD`, or `git diff HEAD` if nothing is committed yet). Use the top-tier model for the review when the plan says `Risk: high`.
- `APPROVE`: continue. Mention any `SHOULD` items in the final report; do not fix them unasked.
- `CHANGES_REQUIRED`: send the blockers to the builder (or the debugger if the cause is unclear), then run the gates again and have the reviewer check only the fix. Allow two review rounds, then bring what remains to the user.
## 8. Ship
Nothing leaves the machine until the gates have passed on exactly the code being pushed.
1. Commit the gated state. Any edit after the last gate run, including review fixes, needs a new gate run first.
2. Push or open a pull request only if the user asked for it. Never push to a production or default branch on your own initiative; prefer a feature branch and a pull request.
3. With the plugin installed, a hook blocks `git push` when the last gate run failed or `HEAD` differs from the code that passed. If it blocks you, run the gates; never clear the gate record or route around the hook. Only the user may decide to push without passing gates.
4. Deploy commands are not covered by the hook. Treat any deploy, release or publish step the same way: gates first, and only on the user's request.
## 9. Report
Finish with a short table: task, role and model that ran it, result, and any escalation. Then the gate results by name, the review verdict with any open `SHOULD` items, and what was and was not pushed.
## Rules that protect the savings
- Never delegate upward by default. Work reaches the top tier only through triage, high risk or escalation.
- Never have two roles do the same reading. The context file and the plan file are the only handoffs.
- Never let a subagent spawn further subagents.
- Scale the cycle to the task. A rename does not need a scout, a tester and a reviewer.
- The session you run in is billed too. If it is on a top-tier model and most work is delegated, mention once that `/model sonnet` for the session itself would save more.
Files in this package (14)
- SKILL.md 9 KB
- agents/tw-architect.md 4 KB
- agents/tw-builder.md 2 KB
- agents/tw-debugger.md 2 KB
- agents/tw-reviewer.md 2 KB
- agents/tw-runner.md 2 KB
- agents/tw-scout.md 2 KB
- agents/tw-tester.md 2 KB
- references/configuration.md 8 KB
- references/plan-format.md 4 KB
- scripts/gate.py 8 KB
- scripts/run_tier.py 4 KB
- scripts/setup.py 6 KB
- scripts/tw_config.py 3 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · prayag17/TierwiseAgents | 100 | MIT |
| kriegcloud/beep-effect | 100 | Apache-2.0 |
| zahidakhyar/skills | 100 | MIT |
| jkaloger/lazyspec | 100 | MIT |
| superset-sh/superset | 100 | MIT |
| boshu2/agentops | 100 | Apache-2.0 |
| Ovich/charrette | 100 | MIT |
| matthew-eth724/orchestrate | 100 | MIT |
| nickthelegend/nick-skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version 8a837581ccd0 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100model-router
Routes an LLM task to the cheapest model tier that can do it (fast / smart / premium) and recommends a concrete model per provider (OpenAI, Anthropic, Google, xAI) with a cost estimate before you run it, from a dated, sourced price table. Use when the user asks which model to… - 100smart-model-router
Save tokens and API credits on coding work — route each task to the cheapest model/agent that can reliably do it (fast, standard or advanced tier), verify the result, and escalate only when it fails. Use for multi-step coding work, or when the user asks to save tokens/credits,… - 100smart-model-router
Route each coding task to the cheapest Claude model that can reliably do it (Haiku / Sonnet / Opus subagents), verify the result, and escalate only on failure. Use for any multi-step coding work, or when the user asks to save tokens/credits, route models, or "use SMR". - 100skill
Lean multi-agent mode for the orchestra mod. Splits work across Claude subagents and external CLI agents (Codex, Antigravity/Gemini, OpenCode, Copilot, Kimi, any other installed) so each part goes to the cheapest model that does it well. It keeps answers short, code minimal and… - 100route
Use to save usage limit by routing work to the cheapest model able to do it with the same quality. Use when the user invokes /model-router:route, before tasks with more than 5 files or more than 10 actions, when executing a plan with independent steps, when creating migrations,… - 100kickroll
Orchestrate a larger coding task in the user's own git repository with kickroll (plan, frozen acceptance tests, cost-aware Claude worker tiers, test-driven retries, integration branch). Use when the user describes a multi-part change that needs tests and asks to run it with…