मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग280k · #147

click-path-audit

यह क्या करती है

यह टूल बटन और स्क्रीन की दूसरी इंटरैक्शन में मिलने वाले बग खोजने में मदद करता है, जो आम डिबगिंग तरीकों से पकड़ में नहीं आते। यह जाँचता है कि क्या बटन का काम इंटरफ़ेस में अपेक्षित नतीजे तक पहुँचता है, भले ही उसके अलग-अलग हिस्से ठीक काम कर रहे हों।

कब इस्तेमाल करें

  • ✓जब बटन अपेक्षा के अनुसार काम न करें, लेकिन आम डिबगिंग में कोई समस्या न मिले।
  • ✓डेटा मैनेज होने के तरीके पर असर डालने वाले बड़े कोड बदलाव के बाद।
  • ✓यह सुनिश्चित करने के लिए कि यूज़र के इंटरैक्शन से सही आखिरी UI स्थिति बने।

Skill का लिंक

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/click-path-audit/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/affaan-m/ECC/blob/main/pi/core/skills/click-path-audit/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“यूज़र प्रोफ़ाइल पेज के सभी बटन जाँचो कि वे सही काम करते हैं और एक-दूसरे से टकराते नहीं।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

टूल हर क्लिक या इंटरैक्शन का विश्लेषण करता है और उससे होने वाले सभी स्टेट बदलावों को ट्रेस करता है। यह जाँचता है कि क्या एक एक्शन दूसरे को पलट तो नहीं देता, या बटन जो वादा करता है, अंतिम नतीजा उससे मेल खाता है या नहीं।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

/click-path-audit — Behavioural Flow Audit

Find bugs that static code reading misses: state interaction side effects, race conditions between sequential calls, and handlers that silently undo each other.

The Problem This Solves

Traditional debugging checks:

  • Does the function exist? (missing wiring)
  • Does it crash? (runtime errors)
  • Does it return the right type? (data flow)

But it does NOT check:

  • Does the final UI state match what the button label promises?
  • Does function B silently undo what function A just did?
  • Does shared state (Zustand/Redux/context) have side effects that cancel the intended action?

Real example: A "New Email" button called setComposeMode(true) then selectThread(null). Both worked individually. But selectThread had a side effect resetting composeMode: false. The button did nothing. 54 bugs were found by systematic debugging — this one was missed.


How It Works

For EVERY interactive touchpoint in the target area:

1. IDENTIFY the handler (onClick, onSubmit, onChange, etc.)
2. TRACE every function call in the handler, IN ORDER
3. For EACH function call:
   a. What state does it READ?
   b. What state does it WRITE?
   c. Does it have SIDE EFFECTS on shared state?
   d. Does it reset/clear any state as a side effect?
4. CHECK: Does any later call UNDO a state change from an earlier call?
5. CHECK: Is the FINAL state what the user expects from the button label?
6. CHECK: Are there race conditions (async calls that resolve in wrong order)?

Execution Steps

Step 1: Map State Stores

Before auditing any touchpoint, build a side-effect map of every state store action:

For each Zustand store / React context in scope:
  For each action/setter:
    - What fields does it set?
    - Does it RESET other fields as a side effect?
    - Document: actionName → {sets: [...], resets: [...]}

This is the critical reference. The "New Email" bug was invisible without knowing that selectThread resets composeMode.

Output format:

STORE: emailStore
  setComposeMode(bool) → sets: {composeMode}
  selectThread(thread|null) → sets: {selectedThread, selectedThreadId, messages, drafts, selectedDraft, summary} RESETS: {composeMode: false, composeData: null, redraftOpen: false}
  setDraftGenerating(bool) → sets: {draftGenerating}
  ...

DANGEROUS RESETS (actions that clear state they don't own):
  selectThread → resets composeMode (owned by setComposeMode)
  reset → resets everything

Step 2: Audit Each Touchpoint

For each button/toggle/form submit in the target area:

TOUCHPOINT: [Button label] in [Component:line]
  HANDLER: onClick → {
    call 1: functionA() → sets {X: true}
    call 2: functionB() → sets {Y: null} RESETS {X: false}  ← CONFLICT
  }
  EXPECTED: User sees [description of what button label promises]
  ACTUAL: X is false because functionB reset it
  VERDICT: BUG — [description]

Check each of these bug patterns:

Pattern 1: Sequential Undo

handler() {
  setState_A(true)     // sets X = true
  setState_B(null)     // side effect: resets X = false
}
// Result: X is false. First call was pointless.

Pattern 2: Async Race

handler() {
  fetchA().then(() => setState({ loading: false }))
  fetchB().then(() => setState({ loading: true }))
}
// Result: final loading state depends on which resolves first

Pattern 3: Stale Closure

const [count, setCount] = useState(0)
const handler = useCallback(() => {
  setCount(count + 1)  // captures stale count
  setCount(count + 1)  // same stale count — increments by 1, not 2
}, [count])

Pattern 4: Missing State Transition

// Button says "Save" but handler only validates, never actually saves
// Button says "Delete" but handler sets a flag without calling the API
// Button says "Send" but the API endpoint is removed/broken

Pattern 5: Conditional Dead Path

handler() {
  if (someState) {        // someState is ALWAYS false at this point
    doTheActualThing()    // never reached
  }
}

Pattern 6: useEffect Interference

// Button sets stateX = true
// A useEffect watches stateX and resets it to false
// User sees nothing happen

Step 3: Report

For each bug found:

CLICK-PATH-NNN: [severity: CRITICAL/HIGH/MEDIUM/LOW]
  Touchpoint: [Button label] in [file:line]
  Pattern: [Sequential Undo / Async Race / Stale Closure / Missing Transition / Dead Path / useEffect Interference]

…
अक्सर पूछे जाने वाले सवाल

स्टेट में 'साइड इफ़ेक्ट' क्या होते हैं?

ये सिस्टम के उन हिस्सों में होने वाले बदलाव हैं जो उस एक्शन का सीधा लक्ष्य नहीं होते। जैसे 'नया ईमेल' पर क्लिक करने से एडिटर खुलना चाहिए, लेकिन कोई अनचाहा साइड इफ़ेक्ट एडिटर को बंद कर दे।

'रेस कंडीशन' क्या है?

यह तब होता है जब दो एक्शन लगभग एक साथ होते हैं और उनके पूरे होने का क्रम अंतिम नतीजे को बदल देता है, जिससे अनपेक्षित स्थिति बन जाती है।

क्या यह पारंपरिक डिबगिंग की जगह लेता है?

नहीं, यह उसका पूरक है। पारंपरिक डिबगिंग देखती है कि कोड मौजूद है और क्रैश नहीं होता। यह टूल इस पर ध्यान देता है कि यूज़र के इंटरैक्शन अंतिम UI स्थिति को कैसे प्रभावित करते हैं।

जानकारी

लेखक का मूल विवरण

Trace every user-facing button/touchpoint through its full state change sequence to find bugs where functions individually work but cancel each other out, produce wrong final state, or leave the UI in an inconsistent state. Use when: systematic debugging found no bugs but users report broken buttons, or after any major refactor touching shared state stores.

repo: affaan-m/ECC

लोकप्रियता

GitHub स्टार
280k
रैंकिंग में स्थान
#147
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

accessibility

280k

यह आपके एजेंट को ऐसे इंटरफ़ेस बनाने में मदद करता है जिन्हें हर कोई इस्तेमाल कर सके। यह पक्का करता है कि वेबसाइट और ऐप दिव्यांग लोगों के लिए भी अच्छे से काम करें, जैसे नेत्रहीन या जिन्हें चलने-फिरने में दिक्कत होती है।

डिज़ाइनइंटरफ़ेस (UI/UX)

agent-architecture-audit

280k

यह आपके एजेंट को जाँचने देता है कि सब कुछ सही से चल रहा है। यह AI सिस्टम में समस्याएँ ढूँढकर ठीक करता है, ताकि वे उम्मीद के मुताबिक काम करें।

AI और एजेंटएजेंट

agent-eval

280k

यह आपके एजेंट को अलग-अलग AI coding tools की तुलना करने में मदद करता है। यह मापता है कि किसी खास काम के लिए कौन सा टूल ज़्यादा तेज़, सस्ता और भरोसेमंद है।

AI और एजेंटएजेंट

agent-harness-construction

280k

यह आपके एजेंट को काम कैसे करना है, यह बेहतर समझने में मदद करता है। यह उन tools और instructions को बेहतर बनाता है जिनका एजेंट इस्तेमाल करता है, ताकि उसकी सफलता की संभावना बढ़े।

AI और एजेंटएजेंट

मिलती-जुलती skills