/design-gate:close-gapsfrom design-gate
Works through a design-match gap report, building missing features and fixing design differences using Sonnet subagents. Verifies each gap against its acceptance criteria in the browser.
Ships in design-gate. 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.
None: SKILL.md is the whole skill.
Work through a design-match report until every open gap is closed, marked blocked, or handed back to a human. The report is the plan; do not re-plan it.
.claude/design-gate/<slug>.md. If there are several, ask which one. If there are none, run design-match first.Where; they do not trust the line numbers.[ ] gaps in priority order. Skip [~] obsolete (removed from the mock by mock-drift) and [!] (handed back to the user). Skip any gap whose Depends points to an unanswered Q.., and list those as blocked.AskUserQuestion call: which priorities to run (P0–P2 (Recommended) / P0–P1 only / All), and a multi-select question of the Extras items to keep (more than 4 Extras: list them as text and ask for the numbers). Without that tool, one message. Do not ask them to approve each gap separately.Group the gaps so that no two batches edit the same file:
Where file go in one batch, in dependency order.Size: L, or one that touches more than 3 files, is a batch of its own.For each batch, call the Agent tool with model: "sonnet", effort: "medium", subagent_type: "general-purpose". The brief is complete because the subagent starts cold:
You are closing design gaps in <repo path>. Follow the repo's CLAUDE.md and neighbouring code.
Header from the report:
<the full header block: mock, build URL, run command, login, design system, conventions>
Gaps (do them in order):
<the full text of each gap item, unchanged>
For each gap:
1. Grep for the `Where` location; line numbers may be stale.
2. Make the smallest change that meets `Accept`. Reuse the component, token or helper named in `Do`. No new dependencies, no refactors, no renames.
3. A gap marked MISSING-FEATURE must work for real: wire the handler, state and existing API. If it needs a new endpoint, schema, auth rule or payment, stop that gap and report BLOCKED with the reason.
4. Check `Accept` in the browser at the viewport named. Run the repo's typecheck and the tests for the files you touched.
5. Tick the box in .claude/design-gate/<slug>.md only when `Accept` passed. Add one line under the item: `Done: <files changed> | Verified: <what you saw>`.
Do not commit, push, deploy, migrate or touch .env files. Do not change gaps outside your list.
Report per gap: DONE | BLOCKED (<reason>) | FAILED (<what you tried, what you saw>).
Run the batches. A batch that depends on another waits for it to finish.
After all batches finish:
Accept line yourself in the browser, at the same viewport and state. A tick without passing evidence goes back to [ ].design-match limited to the screens that changed. Diff the result against the report's Matches list: anything that used to match and now does not is a regression, and becomes a new P0 gap.A gap that FAILED, or failed verification, gets one more Sonnet attempt. The brief adds what was tried and what was seen. If it fails a second time, stop working on that gap. Mark it [!] in the report with what you learned, and hand it to the user. Never try a third variation.
Before reporting, call the Agent tool with model: "opus" (subagent_type: "agent-skills:code-reviewer" if available, otherwise general-purpose). Give it the diff of this run and the gap list, and ask for correctness, security and data-loss issues only, not style. Fix the real problems with one Sonnet pass. List the rest.
## Design gaps: <closed>/<attempted> closed · score <before> -> <after> matches
Ran: P0–P<n> | Batches: <n> | Evidence: rendered | code only
Closed: G01, G02, ... (one line each: what changed, file)
Blocked on a decision: G07 (needs Q2: <question>)
Failed twice: G09 (<what was learned>)
Regressions found: <none | list>
Extras: <kept / removed per the user's answers>
Commands: <typecheck and test commands with results>
Not verified: <list>
Next: <questions to answer; commit on your yes>
Then offer the next step in one AskUserQuestion: Commit the closed gaps (Recommended when anything closed) / Answer the blocked questions (only if any) / Stop. A click on Commit is a yes to commit only, not to push.
EXTRA without the user's yes from step 1.QUESTION yourself, and never let a subagent decide one.Lessons from earlier runs live in two files: ~/.claude/skill-lessons/close-gaps.md (any repo) and .claude/skill-lessons/close-gaps.md at the repo root (this repo only).
- <YYYY-MM-DD>: <do or avoid X> because <Y>. (seen: 1). When a line already says the same thing, raise its seen count and date instead of adding one. Facts about this repo go in the repo file, everything else in the user file. Keep each file under 30 lines by merging or dropping stale lessons.seen: 3: if the ashish-claude-skills source repo is open, propose the edit to plugins/design-gate/skills/close-gaps/SKILL.md as a diff and wait for a yes, then delete the lesson once it lands; otherwise say Lesson ready to promote: <line> in the report.Learned: <the line written | nothing>.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/design-matchUse when a screen, page, flow or app has been built from a design mock (Figma file, screenshot, PNG, PDF, HTML prototype or claude.ai artifact) and needs checking against it, when the user asks whether the build matches the design, what is missing from the mock, or for a design fidelity or design QA pass. Inventories everything in the mock, maps it to the running build, and writes a gap checklist that Sonnet can finish cold./mock-driftUse when the design mock changed after the build started or after a design-match report was written. For example, the designer updated the Figma file, a new export or screenshot arrived, or the user asks what changed in the design or whether the gap report is still current. It diffs the new mock against the inventory saved in the report, then updates the report with new gaps and marks obsolete ones, so close-gaps works from the current design.npx claudepluginhub ashishyd/ashish-claude-skills --plugin design-gate