Sketch types, signatures, and module structure before code, compare at least two independent candidate designs, then implement against the chosen sketch and scrap it if implementation keeps fighting it. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape.
Ships in architect. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Sketch types, function signatures, class shapes, and module boundaries with not implemented bodies and pseudocode. Get at least two independent candidate designs, synthesize one, then fill in code against it.
Open a todo list with one entry per phase before starting.
Build a real mental model of every system the new code touches. Naming a file isn't grounding. For each subsystem, read the code and write down:
If the design changes ownership or layering, also find out why the current shape exists. Read git log and git blame on the files that carry the design, plus any linked issue or design doc. Record the reason as a constraint, so the new design keeps it or drops it on purpose.
Skip Phase A only when the work is greenfield with no surrounding system to integrate.
Design it twice. Get at least two structurally distinct candidates before synthesis, even when the first looks sufficient. They must be different whole shapes, not point fixes inside one shape.
mktemp -d. Each runner gets its own subdirectory and writes only there. Runners must not edit the repo.Agent calls in one message. In Codex, use spawn_agent and wait for every runner.references/runner-prompt.md.Screen every candidate against references/design-red-flags.md. Assume the next contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Prefer the design where a change that looks right from one file is right for the whole repo.
Compare the candidates that pass on interface depth. Prefer the design that hides more complexity behind a smaller, simpler public interface. A rich interface can keep call chains short by putting capability in one place instead of spreading it across layers.
Pick one candidate as the base. Take specific parts from the others where they are better, and only where they fit the base's core types. Do not average the candidates into a middle shape. Record the result in the rationale's "Synthesis decision" section: the base and why, what you took from each other candidate, and what you rejected and why.
Default: stop after synthesis. Show the usage sketch, the type sketch, and the rationale, then wait for sign-off before Phase D.
Skip the stop only when the invoker says to go straight through, for example "/architect, no checkpoint" or "design it and build it".
The sketch can ship as its own commit before the implementation, when the invoker wants commits. Planned breakage while the bodies are filled in is fine if the sketch said where it happens. For adversarial pressure on the design before implementing, run the grill-me skill on the synthesized sketch.
If the human pushes back on the shape, at the checkpoint or later, treat that as Phase A evidence. Re-ground and re-run Phase B before writing more code.
Replace not implemented bodies with code, and pseudocode with logic. The synthesized sketch is the contract. Report each deviation from it instead of absorbing it silently. If a function needs a parameter the sketch didn't expect, decide which is true: the sketch was wrong, a requirement was missed, or the implementation is doing too much.
If implementation keeps producing friction the sketch can't absorb, throw the sketch out. Don't bolt fixes onto a wrong design. Fix the cause, which is the shape.
The signal is a repeated pattern, not a single instance. Tells:
any, casts, or optional fields that are always set in practice.Use judgment. A few edge cases don't condemn an architecture. Some problems are complex. Complexity in the data is not complexity in the design.
When you scrap:
Write the caller's usage first and derive the type sketch from it. For a small change, put the new types and signatures in one file. For larger work, give a module map plus the type definitions. The sketch goes into the repo as code with not implemented bodies.
The rationale ships with the sketch, shaped per references/rationale-template.md, including the usage sketch and the synthesis decision. Put it where the repo keeps design docs. If the repo has no such place, put it in the PR description, or in chat when there is no PR.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/architect:architectfrom architect
npx claudepluginhub rehanhaider/aiman --plugin architect