/design-engine:click-path-auditfrom design-engine
Traces behavioral state bugs in UI interactions: silent resets, race conditions, stale closures, and final-state mismatches in shared state stores (Zustand, Redux, React context).
Ships in design-engine. 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.
Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com. Imported and adapted from ECC's
community-sourced click-path-audit skill (PR-salvaged, attributed to linus707's original
report). This is a debugging/state-tracing procedure, not an aesthetic judgment, so it does not
fall under the human-design-authority re-sourcing rule the same way a visual/typographic claim
would — its authority is the traced code itself, cited by file:line.
design-audit.performance-as-ux-and-core-web-vitals or
a profiler, not a state trace.design-qa-and-pre-launch-review; pull this skill in first if a behavioural bug is suspected.| Artefact or context | Source | Required? | Why |
|---|---|---|---|
| The target area (page, component, or shared store) | User or bug report | yes | Scopes an audit that is expensive to run unbounded |
| Read access to the handler and store source | Codebase | yes | The trace is done by reading actual call order and side effects, not by guessing |
| The button/control's stated intent (its label or spec) | UI copy or spec | yes | The audit's verdict is "does final state match what the label promises" |
Map every state-store action before auditing any touchpoint. For each Zustand
store/Redux slice/React context action in scope, document what fields it sets and,
critically, what fields it resets as a side effect that it does not own. This map is the
audit's load-bearing artefact — the canonical bug this skill was built to catch (a "New Email"
button that called setComposeMode(true) then selectThread(null), where selectThread
silently reset composeMode back to false) is invisible without it.
STORE: emailStore
setComposeMode(bool) -> sets: {composeMode}
selectThread(thread|null) -> sets: {selectedThread, ...} RESETS: {composeMode: false, ...}
DANGEROUS RESETS (actions that clear state they don't own):
selectThread -> resets composeMode (owned by setComposeMode)
For each interactive touchpoint (button/toggle/form submit) in scope, trace the handler in call order. For every function call: what does it read, what does it write, does it have a side effect on shared state, does it reset/clear state as a side effect. Then check:
setCount(count+1); setCount(count+1) incrementing by 1, not 2)?useEffect watching the same field the handler just set immediately reset it
(useEffect Interference)?Check the final state against the label's promise. The audit's core question is not "did the code run" but "does the resulting UI state match what the control's label told the user would happen." A handler with no crash, correct types, and full wiring can still fail this.
Record each finding with a trace, not just a conclusion:
CLICK-PATH-NNN: [severity]
Touchpoint: [Button label] in [file:line]
Pattern: [Sequential Undo / Async Race / Stale Closure / Missing Transition / Dead Path / useEffect Interference]
Trace: 1. [call] -> sets {field: value}
2. [call] -> RESETS {field: value} <- CONFLICT
Expected: [what the label promises]
Actual: [what actually happens]
Fix: [specific fix]
Scope the audit to the actual risk. A full-app audit is expensive — reserve it for launch or after a major refactor, and split it across parallel agents by page/area, with the state-map step (step 1) run once and shared as input to every other agent, since it must complete before the per-area traces can be trusted.
| Condition | Action | Wrong-choice failure |
|---|---|---|
| Systematic debugging reports "no bugs found" but users report a broken control | Run this audit on that control before looking elsewhere | The actual bug (a silent state reset) is invisible to crash/type-level debugging |
| A shared-store action was just modified | Audit every consumer of that action, not only the edited call site | A caller relying on the old reset behaviour breaks silently |
| Full-app audit requested | Run the state-store map (step 1) first, as shared input to all subsequent area audits | Per-area audits without the shared map re-derive it inconsistently or skip it |
| A finding is reported | Cite file:line and the literal call trace, not a general description | An unverifiable claim cannot be fixed or reviewed |
Read access to the component/handler and state-store source is required; this is a static trace, not a runtime observation, so no execution capability is required to complete it (though running the flow to confirm a finding is preferred where available). Editing is allowed only when a fix is explicitly requested.
Without read access to the actual store/handler source, this skill cannot produce a verifiable finding — report that the audit could not run rather than guessing at a plausible-sounding bug. Without the ability to run the flow, mark each finding as a static-trace hypothesis rather than a confirmed reproduction, and say so explicitly in the report. Stop the audit when the required source or stated control intent is unavailable; record the gap and do not infer a failure from an unobserved path.
| Artefact | Consumer | Evidence and acceptance condition |
|---|---|---|
| State-store side-effect map | Engineering, subsequent audits | Every in-scope action's sets/resets documented, dangerous resets flagged |
| Click-path finding(s) | Engineering | Each finding cites file:line, a literal call trace, expected vs actual, and a specific fix |
examples/sequential-undo-worked.md — the canonical "New Email button does nothing" bug: full
state-store map, handler trace, and finding write-up, reproduced from the case that motivated
this skill.00-cross-cutting-ops-qa-a11y/design-qa-and-pre-launch-review (the broader pre-ship
gate; run this skill first when a behavioural bug is suspected, then the full gate).click-path-audit skill. Imported near-verbatim because its
content is a debugging procedure (verifiable against actual code, cited by file:line), not a
design/aesthetic recommendation — it does not require re-sourcing to human design authority the
way a typographic or colour claim would.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
state-debugging, race-conditions, zustand, redux, react-context
Other plugins' skills for the same job
110 skills in this plugin
/accessibility-wcag-2-2-complianceUse when designing or auditing an interactive UI for WCAG 2.2 AA, keyboard and focus behaviour, accessible names, screen readers, target size, reflow, authentication, or reduced motion. Use inclusive-and-assistive-design for needs beyond the compliance floor./accessible-color-and-contrastUse when verifying or fixing text, UI, focus, border, status, or data colours for contrast and colour-vision accessibility. Unlike color-system-and-palette, this is the focused WCAG/APCA and non-colour-cue gate, not palette creation./advertising-creative-art-directionUse when art-directing advertising or campaign creative - copy and image relationships, poster and cover tests, triplet or cousin campaign systems, big-idea tests across channels, a 7-point effectiveness screen, critique and ad layout specs handed back to the marketing engine. Use art-direction-routes for brand or website directions./ai-agent-uxUse when an AI agent or copilot interface needs status, plans, approvals, uncertainty, interruption, or trust controls across web or mobile. Do not use for formatting a single AI answer; route output structure and citations to ai-output-design./ai-image-generation-art-directionUse when turning an art-direction brief into generated imagery, prompts, negative constraints, reject gates, provenance notes, and post-processing instructions. Use photography-art-direction for sourced photos and visual-product-slop-audit for product-wide review./ai-output-designUse when an AI answer surface needs structure, citations, grounding, editable refinement, or a chat-versus-canvas decision. Do not use for agent autonomy, approvals, or execution status; route those interaction controls to ai-agent-ux.npx claudepluginhub peterbamuhigire/chwezi-design-engine --plugin design-engine