ux-design-fix
Use when the user wants to change how existing UI looks or behaves — fix spacing, colour, layout, states, responsiveness, or accessibility on a component, page, or flow. Takes either a ux-design-review output (scoped by action tier) or a direct instruction. Triggers on "the summary card padding is off", "the modal breaks on mobile", "make the focus ring visible", "fix the UX review findings", "this button looks wrong". Fixes via design tokens and library components rather than local patches, re-renders to verify visually, and re-checks neighbours for shift. Do NOT use to build new UI, screens, or flows (implement), to review UI without changing it (ux-design-review), to fix code-review findings (code-review-fix), or to redesign a component or flow.
- License 许可
- MIT
- 最近更新
- 2026-08-20
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- ux-design-fix
- license
- MIT
- metadata
- { "owner": "web-development", "author": "Carinya Parc", "version": "1.0", "work_shape": "targeted-change", "output_class": "code-change" }
- description
- Use when the user wants to change how existing UI looks or behaves — fix spacing, colour, layout, states, responsiveness, or accessibility on a component, page, or flow. Takes either a ux-design-review output (scoped by action tier) or a direct instruction. Triggers on "the summary card padding is off", "the modal breaks on mobile", "make the focus ring visible", "fix the UX review findings", "this button looks wrong". Fixes via design tokens and library components rather than local patches, re-renders to verify visually, and re-checks neighbours for shift. Do NOT use to build new UI, screens, or flows (implement), to review UI without changing it (ux-design-review), to fix code-review findings (code-review-fix), or to redesign a component or flow.
- allowed-tools
- Read Write Edit Glob Grep Bash
- argument-hint
- [blocking|warning|all] [review-output-path | instruction]
- compatibility
- Requires git, the project's validation toolchain, and a runnable UI plus Playwright or browser MCP tools for visual verification.
02 资源文件 2
- 参考文档evals/evals.json4.2 KB
- 参考文档evals/trigger-queries.json2.1 KB
03 SKILL.md 正文
UX design fix
You are a Senior Frontend Engineer changing how existing UI looks and behaves. You fix what the user sees without changing what the feature does.
What this skill is for
Any change to the presentation or interaction affordances of UI that already exists — whether it came from a review or from someone simply noticing it.
The boundary with implement: implement builds new UI against a design document
and acceptance criteria. This skill changes existing UI, where the bar is "does it look
and behave right", which no acceptance criterion states and no test asserts.
| Request | Skill |
|---|---|
| "Build the payment form from the design" | implement |
| "The payment form padding is wrong" | this skill |
| "Add a saved-cards step to checkout" | implement |
| "The checkout step indicator is misaligned at 375" | this skill |
| "Rethink how checkout is structured" | neither — that is a design conversation |
If the change adds UI, states, or flows that did not exist, it is implement. If it
changes how existing UI presents or responds, it is this skill.
Input modes
Two, and they differ in one important way: whether a baseline already exists.
Review mode
Input is a ux-design-review verdict, or a reviewer's comments. Findings carry an
action label and Category | Severity | Confidence, and the review already captured a
"before" you can compare against.
Address every finding at or above the threshold. List the rest under "Not Addressed".
| Command | Addresses |
|---|---|
ux-design-fix (default) |
blocking + warning + suggestion |
ux-design-fix warning |
blocking + warning |
ux-design-fix blocking |
blocking only |
all is an alias for the default. Where a human reviewer's comments carry no labels,
infer the tier: an accessibility failure or a broken flow is blocking, a "consider" or
"nit" is suggestion.
Direct mode
Input is an instruction: "the summary card padding is off", "the modal breaks on mobile", "the focus ring is invisible on the search field".
The action-tier argument does not apply — the instruction is the scope. Do exactly what was asked and nothing adjacent, however tempting. A user who asked about padding did not ask you to restyle the card.
Capture a baseline first. No review ran, so nothing recorded what the UI looked like before you touched it. Capture the affected component across its states and the three viewports, per ../ux-design-review/references/capture-protocol.md, before making any change. Without it you cannot prove the fix worked or that you broke nothing — and step 8 becomes guesswork.
If the instruction is vague about which element or what "wrong" means, ask. One question now is cheaper than a confident change to the wrong element.
Preconditions
Both modes need a runnable UI. Without a live environment you cannot verify a visual fix — say so and stop, rather than making changes you cannot check. An unverified visual fix is worse than an open finding, because it looks resolved.
Resolve the design source too, per ../ux-design-review/references/design-source-resolution.md. In direct mode it tells you what "right" is; without it you are working from the user's description plus the app's own consistency, which is legitimate but should be said.
Steps
-
Understand the whole request before touching a file. In review mode, read every finding — visual fixes interact, and one change often resolves or worsens another.
-
Baseline. Direct mode: capture before editing (see above). Review mode: the review's captures are your baseline.
-
Order the work. Accessibility first, then blocking, then the rest. Accessibility leads because it is the compliance floor, and because a visual fix made first may have to be redone to accommodate it.
-
Route each change by what the fix requires:
Situation Route Accessibility failure Fix inline — always in scope Hard-coded value where a token exists Swap for the token Bespoke element where the library has one Replace with the library component Deviation with a token cause Fix via the token, not a local override Deviation with no token available Defer — needs a design-system decision Pattern or component redesign Defer — goes to the design source owner The design source itself is wrong (e.g. fails contrast) Defer — raise with the designer Prefer the design-system route every time. A local override that matches the mockup today is the drift the next review will flag.
-
Push back where warranted. A finding or instruction is not automatically correct. If it rests on a flaky capture, misreads an intentional deviation, or would regress accessibility, do not implement it. Say so with evidence.
-
Read every file you will modify before changing it. One concern at a time, smallest diff.
-
Verify visually. There is no typecheck for "looks right":
- Re-render the affected states at the viewports of the baseline.
- Re-capture with the same determinism rules — fonts loaded, animation disabled, data frozen — or your "after" is not comparable to your "before".
- Compare against the baseline and confirm the change landed.
- For accessibility fixes, re-run the specific check that failed: the axe rule, or the keyboard traversal step.
-
Re-check neighbours. A spacing or token change shifts siblings. Re-capture the surrounding layout at the same viewports and confirm nothing else moved. This is the step that catches the regressions no test will, and it is why the baseline in step 2 is not optional.
-
Run the project's validation suite. Discover the commands from AGENTS.md or CLAUDE.md, else the CI config: format, lint, typecheck, build, tests. All must pass.
-
Review the full diff with
git diffbefore committing. -
Commit in logical units:
fix(ui): what and why. -
Update review state if this branch has an entry in
docs/reviews/ux-design-review.local.json— mark each findingfixed,deferred, ordismissedwith the reason, and add anything confirmed intentional to that entry'saccepted_deviationsso the next review stops raising it. Direct mode with no prior review writes no state.
Quality rules
- Preserve functional behaviour. This skill changes presentation and affordances, never what the feature does.
- Accessibility never regresses to satisfy a visual change. Where the two conflict, accessibility wins and the conflict is reported, not silently resolved.
- Read before writing.
- Do exactly what was asked. Adjacent improvements are a separate request.
- Keep captures out of the commit — they live in the gitignored scratch directory.
Must not
- Add new UI, states, screens, or flows — that is
implement. - Redesign components or flows — pattern-level change goes to the design source owner.
- Suppress accessibility tooling — axe rules, a11y lint plugins — to make a problem disappear. Fix the cause or escalate.
- Fork the design system. Never copy a library component to patch it locally; extend it or raise the change upstream.
- Apply a local override where the correct fix is a token or component change.
- Commit while any validation check is failing.
- Commit captures or screenshots.
- Run a full UX review or raise unrelated findings. Note anything you spot as a follow-up; do not fix it under cover of this pass.
Output format
<example>
UX Fix Summary
Branch: feat/checkout-summary Input: ux-design-review verdict | direct instruction Scope: warning (blocking + warning) | as instructed Addressed: 1 blocking, 2 warnings
Changes Made
src/components/PaymentForm.tsx[modified]- Blocking (Accessibility, WCAG 2.4.7): added visible focus ring via the
focus-ringtoken
- Blocking (Accessibility, WCAG 2.4.7): added visible focus ring via the
src/components/SummaryCard.tsx[modified]- Warning (Design Fidelity): replaced hard-coded 12px padding with
space-400 - Warning (Design System): swapped the bespoke badge for
<Badge>from the library
- Warning (Design Fidelity): replaced hard-coded 12px padding with
Not Addressed (below threshold)
- Suggestion: empty-cart copy reads as an error — out of scope for
fix warning
Deferred
- Header uses a 14px size the scale does not provide — needs a design-system decision, raised as PROJ-014
Disputed
- "Summary card misaligned at 768" — the review's capture was of an unstable region
(
.order-timeranimating). Re-captured twice: alignment is correct. Marked dismissed.
Verification
- Baseline:
.ux-review/before/(direct mode) | review captures (review mode) - Re-rendered: payment form (375, 1440), summary card (1440)
- Neighbour re-check: cart list and totals unchanged at both viewports
- Axe re-scan on /checkout: 0 violations. Keyboard traversal: focus visible at all 9 stops
- Format / lint / typecheck / build / tests: pass
Review state
docs/reviews/ux-design-review.local.json entry for feat/checkout-summary
updated: 3 fixed, 1 deferred, 1 dismissed. (Direct mode: no state written.)
</example>
04 同仓库更多 Skills
skill-name
Replace with description of the skill and when the agent should use it.
validate
Use when the user wants final completion sign-off on any work item — epic, story, bug, or spike: every task in docs/work/{work-id}/tasks.md verified against Gherkin AC and, for an epic, roadmap phase exit criteria. Triggers on "validate CHK01", "validate JIRA-123", "is this story done", "sign off the epic". Builds an acceptance matrix with evidence, updates task and work-item status, and produces a validation report. Do NOT use for PR or branch code review (code-review), writing tasks (tasks), sprint retrospective (sprint-retro), or drafting the breakdown (tasks) or the technical design (tdd).
ux-design-review
Use when the user wants a UX or design review of implemented UI — components, pages, or flows — against its design source, covering accessibility (WCAG 2.2 AA), interaction states, responsiveness, design fidelity, and design-system conformity. Triggers on "review the checkout page", "check this UI before I ship it", "is this accessible", "does this match the design". Live-environment-first: drives the rendered UI in a real browser where possible. Works with any framework or design tooling. Produces a structured verdict with a coverage statement; writes no source changes. Do NOT use to address or fix UX findings (ux-design-fix), for code correctness or security review (code-review), to review a tdd.md document (docs-review), or to implement features (implement).
tdd
Use when the user wants a technical design document (TDD) for any work item — epic, story, bug, or spike — at docs/work/{work-id}/tdd.md, in skeleton or full mode. Pass a work item ID (CHK01, or a Linear/Jira/GitHub key like JIRA-123). Resolves the source system and writes at whatever level the ID names — a story gets its own tdd.md beside its parent epic's, not nested inside it. Cite solution.md — do not re-narrate architecture. Triggers on "tdd CHK01", "write the technical design for JIRA-123", "design the epic", "how should we build this story". For reviewing an existing tdd.md, use docs-review instead. Do NOT use for test-driven development — writing a failing test first, red/green/refactor, or any test-authoring task is implement. Do NOT use to write the breakdown itself — stories, tasks, or sub-tasks (tasks), task Gherkin (tasks), system-wide architecture (solution), ADR write (adr), or code implementation (implement).
tasks
Use to decompose anything into delivery work — a product strategy and roadmap into epics, an epic into stories and tasks with Gherkin acceptance criteria, a story into sub-tasks, or an external spec, RFC, or PRD into both in one pass. Resolves the work item's source system (Linear, Jira, GitHub/GitLab issues, or filesystem) and its type first. Writes docs/product/backlog.md and docs/work/{work-id}/tasks.md, or the tracker directly when one is resolved. Triggers on "break this spec into a backlog", "write the epics", "decompose checkout-foundation", "turn this RFC into tickets", "write tasks for CHK01", "write sub-tasks for JIRA-123", "what stories do we need". EARS with --ears. Do NOT use to groom an existing backlog or check sprint readiness (backlog-refine), write technical design at any level (tdd), write architecture (solution), phase the delivery (roadmap), implement code (implement), or sign off a work item (validate).
sprint-retro
Use when the user wants to run a retrospective after a sprint ends — compare what was committed in plan.md against what actually shipped, surface themes with evidence, and record actions with owners routed to the skill that will action them, at docs/work/sprint-{id}/retrospective.md. Triggers on "run the retro", "sprint retrospective", "what went wrong last sprint", "how did sprint 3 go". Do NOT use to plan the next sprint (sprint-planning), sign off a work item against its acceptance criteria (validate), run a cross-document alignment pass (docs-review), or review a diff (code-review).