click-path-audit

Traces UI button handlers through state changes to detect conflicting side effects.

2|Updated Mar 29, 2015
One-click install
npx skills add https://github.com/ovisan/dotfiles --skill click-path-audit-ovisan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: click-path-audit
Source: https://github.com/ovisan/dotfiles/tree/main/.agents/skills/click-path-audit
Command: npx skills add https://github.com/ovisan/dotfiles --skill click-path-audit-ovisan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Systematic debugging verifies that functions exist, run without errors, and return correct types, but it misses bugs where individually working functions cancel each other out through shared state side effects. This Skill finds buttons that appear wired correctly yet do nothing because a later call silently resets state set by an earlier call. ## Core Features & Use Cases - State Store Side-Effect Mapping: Documents every Zustand store or React context action with the fields it sets and the fields it silently resets. - Touchpoint Handler Tracing: Walks every onClick, onSubmit, and onChange handler call-by-call to detect sequential undo, async races, stale closures, missing transitions, dead paths, and useEffect interference. - Structured Bug Reports: Produces severity-rated findings with the full call trace, expected versus actual state, and a specific fix. - Use Case: A "New Email" button calls setComposeMode(true) then selectThread(null); both work individually, but selectThread resets composeMode to false, so the button does nothing. This audit catches that conflict. ## Quick Start Audit every button on the emails page by tracing each handler's state changes through the Zustand store and report any conflicting side effects.

Frequently Asked Questions about click-path-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find bugs where a button does nothing despite having a working onClick handler?

Trace every function call in the handler in order, recording what state each call sets and resets. A common cause is sequential undo, where a later call like selectThread silently resets state set by an earlier call like setComposeMode.

How to audit Zustand store actions for hidden side effects?

Build a side-effect map before auditing touchpoints: for each store action, document which fields it sets and which fields it resets as a side effect. Flag dangerous resets where an action clears state owned by another action.

What bug patterns does a click-path audit detect that unit tests miss?

It detects sequential undo, async race conditions, stale closures in useCallback, missing state transitions, conditional dead paths, and useEffect interference. These involve interactions between functions, so tests of individual functions pass while the combined behavior is broken.

When should I run a click-path audit instead of systematic debugging?

Run it after systematic debugging finds no bugs but users still report broken buttons, after modifying any Zustand store action, or after refactors touching shared state. It is not suited for API-level bugs, styling issues, or performance problems.

Can a click-path audit scale to a full application?

Yes, by scoping the work: one agent maps all state stores first as shared context, then parallel agents audit individual pages or feature areas like dashboard, chat, emails, and settings. Single-page or store-focused audits work for smaller scopes.