/han-coding:design-an-api [size: small | medium | large | dynamic] [the goal or ticket this serves, and the interface to design]from han-coding
Designs the contract for an API change (props, function surface, URL/query params, event payload, module boundary) through discovery, options with recommendation, questions, and adversarial validation. Produces a design document without writing code.
Ships in han-coding. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
which git 2>/dev/null || echo "not installed"git branch --show-current 2>/dev/null || echo "no git branch"git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || echo unknownfind . -maxdepth 1 -name "CLAUDE.md" -type ffind . -maxdepth 3 -name "project-discovery.md" -type fbash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude"cat .han/config.md 2>/dev/null || echo ""As your first action, use the Read tool on .han/config.md inside the personal config directory path above. A read
that returns no file is no personal configuration: continue silently. When that file or the project .han/config.md
probe supplies content, apply it per config-rule.md, which governs precedence
between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.
Read these before dispatching anything. They constrain every step below.
han-core:codebase-explorer,
han-core:software-architect, han-core:junior-developer, and han-core:adversarial-validator run at every size
BECAUSE evidence, design, questioning, and attack are the irreducible core of a contract that survives contact. Every
other specialist is added only when the interface's signals warrant it and the band allows it, BECAUSE dispatching an
agent whose domain the contract never touches burns tokens and pulls the design toward concerns the goal did not ask
for.tdd run against this document.han-communication:readability-guidance and applies it, holding one audience
above the writing: the engineer who will implement this contract and the reviewer who will approve it. Scope that
frame per section so the specifics that reader needs — exact signatures, types, precedence rules, file paths — are
preserved, never simplified away.Bind $size. If the user passed small, medium, large, or dynamic as the first positional argument, bind
$size to it. Anything else is part of the goal-and-interface context, not a size; bind $size to the literal
none provided.
Resolve the goal. Take the remaining argument and conversation context as the goal this design serves. A ticket reference, issue URL, file path, or a described capability all qualify. Read the referenced material if it names a file or is fetchable from the conversation. Record the goal verbatim where it is quotable — the justification field in every later step cites it. If no goal resolves, stop and ask the user for the ticket, issue, or one-paragraph statement of what this change is for. Do not proceed without it.
Resolve the interface. Identify what is being designed: which component, function, module, route, or payload, and
where it lives. Confirm it resolves to real files using Glob and Read. If the interface is genuinely new and has no
file yet, resolve instead the module or directory it will live in and the consumers that will call it. If neither
resolves, ask the user to name the surface before going further.
Resolve the starting point. Read the current branch and default branch values from Project Context. When
default branch reads unknown, origin/HEAD is unset and there is no base to compare against: the working tree is
the starting point, no question is asked, and the run continues. Otherwise run
git diff --name-only {default branch}...HEAD and check whether any interface file resolved above appears in the
output. Only when one does, ask the user in one short message whether to design from the branch as it stands or from
the merge base, ignoring the branch's changes; read the merge-base state with git show when they choose the merge
base. In every other case — no interface file changed on the branch, git unavailable, or the command fails — the
working tree is the starting point and no question is asked. State the chosen starting point in one line.
Resolve project context. If CLAUDE.md is present, read its ## Project Discovery section for conventions. Fall
back to project-discovery.md. These resolve language, framework, and convention questions so the agents infer less. If
neither exists, the agents fall back to surrounding-code inference — note this in the briefs.
Resolve the output folder. The run writes three files: {folder}/context-brief.md, {folder}/design-options.md,
and {folder}/api-design.md. Resolve {folder} in this order:
output-directory, place the run folder under it, per
config-rule.md.CLAUDE.md, project-discovery.md, or a Glob fallback (docs/plans/, docs/).Create the folder with mkdir -p. Check all three names with Glob before writing anything. If any of the three
already exists there, write every file this run produces to a date-suffixed name (for example api-design-2026-08-07.md
alongside context-brief-2026-08-07.md and design-options-2026-08-07.md) so one run's files stay together, and state
which files were written; never silently overwrite. State the chosen folder in one short line and proceed without
waiting for confirmation.
Run targeted Grep and Glob over the interface and its consumers to detect which domains the contract actually
touches. These signals drive both the band and the roster:
Classify the size. Default to small. Escalate only when a band's signal is clearly present; when a signal is borderline, stay at the smaller band.
$size is
large.Apply the size override. If $size is not none provided, use it: a band value is the band and skips the
signal-based classification above, while dynamic forces the signal-based classification even when the project config
sets a default band. If $size is none provided and the project config supplies a band via default-swarm-size (per
config-rule.md), use that band, skip the signal-based classification, and announce
the config as the source. In every case still select specialists by signal: a large band does not dispatch agents
whose domain the contract never touches. A conversational override ("design this large") is equivalent to $size.
Spine — dispatched at every size:
han-core:codebase-explorer — discovers the current surface, its consumers, and the constraints the design has to
live inside. Feeds the context brief. Runs in Step 4.han-core:software-architect — produces the options document and every later amendment. Runs in Steps 5, 7, 8, and 9.han-core:junior-developer — questions the chosen option as a generalist who was not in the room. Runs in Step 7.han-core:adversarial-validator — attacks the amended design and the evidence under it. Runs in Step 9.Signal-selected specialists — added to the discovery wave when the signal is present and the band allows:
| Specialist | Add when | Min band |
|---|---|---|
han-core:structural-analyst | Consumer-spread signal | Medium |
han-core:behavioral-analyst | Boundary-data signal | Medium |
han-core:concurrency-analyst | Ordering signal | Medium |
han-core:data-engineer | Data-contract signal | Medium |
han-core:on-call-engineer | Failure-path signal | Medium |
han-core:system-architect | System-seam signal | Large |
han-core:adversarial-security-analyst | Trust-boundary signal | Medium |
Roster caps by band are ceilings, not quotas: small runs the spine only (4 agents); medium adds at most two
signalled specialists (up to 6 agents); large adds at most four, including han-core:system-architect when a
system-seam signal is present (up to 8 agents). A band reached by override rather than by signal can sit well under its
ceiling; add no specialist whose signal is absent just to fill the band. If more specialists are signalled than the cap
allows, keep the band's count, prefer the specialists covering the strongest signals, and name the omitted domains in
the design document's summary so the user can re-run larger.
Extra agents named in the project config's ## Extra Agents list join the signal-selected pool and compete under the
same signals and band caps, per config-rule.md: add one only when a signal in the
interface matches its stated specialty, count it against the band's cap, and skip an entry that does not resolve to a
dispatchable agent with a one-line note.
Announce the decision in one line before dispatching, with per-specialist justification — for example:
Size: medium. Designing the query-parameter prefill contract on
FlowProvider; consumer-spread signal (7 call sites) and a trust-boundary signal (values arrive from the URL). Roster (6):han-core:codebase-explorer,han-core:structural-analyst(consumer audit),han-core:adversarial-security-analyst(untrusted URL input), thenhan-core:software-architect,han-core:junior-developer, andhan-core:adversarial-validator.
State git availability in the same message if git is absent. Proceed without a blocking confirmation; discovery is read-only and re-runnable, so a gate here would gate a reversible operation. If the user objects to the roster, honor the adjustment.
Running collaboratively. When the request asks to review each round as it lands, which is what
pairing does when it hands work here, stop at this point and hand control back instead of continuing. Present the stop
in the shape collaborative-stop-rule.md specifies. Absent such a request,
continue as below; an ordinary invocation is unchanged.
For this skill a round is one dispatch step: the discovery wave, the options round, the question round, and the validation round. The two human gates below are unchanged and still fire regardless.
Launch han-core:codebase-explorer and every signalled specialist in a single message with one Agent call per agent
so they run concurrently. Each brief must contain:
Wait for the whole wave to return. Then write {folder}/context-brief.md: a numbered list of findings (F1, F2, F3, …),
each carrying the finding, its provenance (a file:line citation, or the label inferred), and the agent that reported
it. Merge duplicates and keep conflicting findings as separate numbered entries with both citations, rather than
picking a winner. Apply the evidence rule from ../../references/evidence-rule.md to
every finding. When a question the design depends on has no evidence at any tier, record it as an open item rather than
guessing, and carry it into Step 8 alongside the open items the question round produces.
If a specialist returns nothing usable or fails, record a one-line note in the context brief naming the agent and the
domain left uncovered, and continue. A missing specialist narrows the design's evidence; it does not stop the run. If
han-core:codebase-explorer returns nothing usable, relaunch it once with the interface's file paths spelled out. If
the second attempt also returns nothing, stop and tell the user the interface could not be discovered, naming the paths
that were searched.
Launch han-core:software-architect with one Agent call. Pass it the stated goal verbatim, the full context brief,
and the resolved project conventions. Its brief must ask for:
Write the returned options to {folder}/design-options.md.
If the architect returns one option, or returns options whose elements carry no justification, relaunch it once with the missing requirement restated. If the second attempt still returns one option, carry that option forward and record in the design document that only one viable option was produced, with the architect's stated reason. If the second attempt still leaves elements unjustified, do not carry those elements: move each one to the cut list with what it would have done and the note that no justification was produced for it, so the gap reaches the user in Step 6 rather than passing as designed.
Before writing the question, invoke han-communication:explanation-guidance to source the shared explanation standard
into your context. After that skill returns, proceed immediately to the question below — do not stop there. The
standard stays in context for Step 8, so do not invoke it a second time.
Present the options to the user with AskUserQuestion: one option per choice, the recommendation named first and
labelled as recommended, each with its one-line reasoning. Apply the explanation standard to the wording, so each option
reads as an outcome the user could observe rather than a mechanism. Include the cut list in the surrounding message so
the user sees what the design is giving up.
Handle the response:
Launch han-core:junior-developer with one Agent call. Pass it the stated goal verbatim, the context brief, and the
chosen option in full. Its brief must ask it to reframe the contract in simpler terms and raise the clarifying questions
a generalist who was not in the room would ask: unstated prerequisites, conflicts with the project's own conventions,
names that do not say what they hold, and behavior the contract leaves undefined. Ask for numbered questions.
Sort the returned questions into three buckets:
Then relaunch han-core:software-architect with one Agent call, passing the chosen option, every question, and the
answers from buckets 1 and 2, and ask it to amend the design accordingly. Hold the open items until Step 8 answers
them.
If Step 7 and Step 4 left no open item, say so in one line, skip this gate, and go straight to Step 9. The gate exists to settle open items; with none to settle it has nothing to ask and no answer to fold in.
Otherwise surface the open items — those the question round produced in Step 7, plus any no-evidence item recorded in
Step 4 — one at a time, each as its own AskUserQuestion call. Never batch them BECAUSE
each answer routinely settles or reshapes the ones behind it, and a batch asks the user to decide in an order the design
does not follow.
Apply the explanation standard already in your context from Step 6 to each question's wording. Each question leads with the plain-language consequence of the choice, names two to four candidate answers, and says what changes in the contract depending on the answer. After each answer, re-check the remaining open items: drop the ones the answer just settled, and re-word the ones it changed.
When every open item is answered, relaunch han-core:software-architect with one Agent call carrying the answers, and
have it fold them into the amended design. Record each answer in the design document as the justification for the
elements it settles.
Launch han-core:adversarial-validator with one Agent call. Pass it, verbatim and unsummarized, the stated goal, the
full context brief with every finding and its citation, the amended design with its justifications, and the cut list.
Do not summarize — the validator needs the detail to attack effectively. Its job is to try to break the contract: find
the consumer the design forgets, the input state it does not define behavior for, the invariant a caller can violate,
the justification that does not actually follow from the goal, and the finding whose evidence does not support what the
design built on it.
Record its output as numbered validation findings (V1, V2, V3, …), and mark each one:
han-core:software-architect a single time
carrying all accepted findings together, and record what changed for each.If the validator finds nothing, record what it checked and why that supports the design. A clean validation round is a result, not an empty section.
Cap the revision at one round. If the revised design would open new open items, list them in the design document's Open Risks section rather than starting another gate cycle.
Read references/api-design-template.md and render it into
{folder}/api-design.md. Render rules:
Then invoke han-communication:readability-guidance to source the shared readability standard into your context. After
that skill returns, proceed immediately to the rewrite below — do not stop there. Dispatch
han-communication:readability-editor with one Agent call to audit and rewrite the document. Pass it the
file path and the named audience: the engineer who will implement this contract and the reviewer who will approve it.
The editor reads han-communication's own canonical rule, so pass no rule path. It preserves every fact and edits prose
regions only — never inside code fences, pseudocode sketches, type signatures in code blocks, or finding-ID and
file:line citation identifiers. Apply its rewrite to the file.
Then run the readability rule's standardized self-check, which is in your context from the readability-guidance
invocation above, over the document's prose regions only. Correct every failure before presenting. Its fidelity
criterion is not optional: the standard governs how the content is said, and drops a required fact only when the reader
asked for less and losing it would not change what they do next.
Present the design to the user in a short closing message covering:
tdd run that implements the contract.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub testdouble/han --plugin han-coding11 skills in this plugin
/architectural-analysisPerforms deep architectural analysis of a specified module, directory, or feature area by examining structural coupling, data flow, concurrency patterns, risk, and SOLID alignment. Use when the user wants to assess, evaluate, or review the architecture, design quality, dependency structure, coupling, cohesion, or technical debt of an existing part of the codebase. Not for investigating specific bugs, runtime errors, or failures — use investigate. Not for test planning — use automated-test-planning. Not for file-level code review — use code-review. Not for researching open-ended options, prior art, or how something works — use research. Not for designing a new interface or contract — use design-an-api. Not for planning the change its findings imply — use plan-a-change. Not for discovering bounded contexts, ubiquitous language, or where code boundaries diverge from domain boundaries — use ddd-analysis. Not for writing documentation or architectural decision records./automated-test-planningProduce a standalone test plan by analyzing code for test coverage gaps and edge cases. Use when you need to create, generate, or draft a test plan for a branch, need to analyze test coverage, or need to identify what tests to write for specific files or directories. Does not produce a plain-language plan for a person to run tests by hand — use manual-test-planning for that. Does not write test code — use tdd to implement behavior test-first. Does not refine existing plans — use iterative-plan-review. Does not review code quality, security, or style — use code-review for full code review. Does not evaluate architectural testability or structural coupling — use architectural-analysis for architectural assessment.
/code-overviewProduces a human-readable, progressive-disclosure overview of unfamiliar code or a pull request's changes — why it exists (the real problem it solves or goal it serves for the business or a user), and from there what it does, how it flows, and where to start — so you can get up to speed before working on or reviewing it. Use when you want to understand, get oriented in, make sense of, explain, or get up to speed on a chunk of code, a file, a directory, a symbol, or a PR's changes. Writes the overview to a scratch file and changes no code. Does not review code quality or raise findings — use code-review for auditing changes or post-code-review-to-pr for posting them. Does not produce durable feature or system documentation — use project-documentation. Does not assess architecture or structural risk — use architectural-analysis. Does not diagnose bugs or root-cause failures — use investigate. Does not pace a person through the code one step at a time in conversation — use code-walkthrough.
/code-reviewRun a comprehensive code review on local source files. Use this skill when the user asks to review, audit, inspect, evaluate, or check code, even if they never use the word "review." Does not post comments to GitHub pull requests — use post-code-review-to-pr for that. Does not analyze architectural structure or module boundaries — use architectural-analysis for that. Does not explain code or a PR to build understanding before reviewing — use code-overview for a written overview, or code-walkthrough to be paced through it one step at a time. Does not map bounded contexts or domain boundaries — use ddd-analysis for that. Does not capture feedback on Han's own skills — use han-feedback for that./code-walkthroughWalks a person through code changes one step at a time in conversation, starting at the entry point and following the flow that changes, showing a small chunk per step and explaining it in plain language. Defaults to the current branch's changes, and walks the code from the perspective of any context provided instead — a file, directory, symbol, pull request, plan, or ticket. Use when someone wants to be walked through, taught, paced through, or shown around code or a branch step by step, or to learn how a change works before reviewing or extending it. Stops after every step and waits, so the learner sets the pace. Paces through code that already exists and builds nothing — to build new work while being paced through it, use pairing. Does not produce a written overview to read alone — use code-overview. Does not review code quality — use code-review. Does not diagnose bugs — use investigate.
/coding-standardCreates and updates coding standards, conventions, rules, and guidelines for the current project. Use when creating new standards from scratch, converting existing documents into coding standards, or updating existing standards. Does not create architectural decision records — use architectural-decision-record for ADRs. Does not write feature or system documentation — use project-documentation for that. Does not research open-ended options — use research. Does not produce runbooks for operational scenarios — use runbook for that.
2 plugins ship this exact skill · first indexed Aug 21, 2026
Other plugins' skills for the same job