affaan-m/ECC

click-path-audit

追踪每个面向用户的按钮/触点的完整状态变化序列,以发现功能单独工作但相互抵消、产生错误最终状态或使UI处于不一致状态的错误。适用于:系统调试未发现错误但用户报告按钮失效,或在任何涉及共享状态存储的重大重构之后。

69Collecting
See how to use itView GitHub source
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/click-path-audit"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn click-path-audit's source instructions into a guide you can follow

According to the pinned SKILL.md from affaan-m/ECC: 发现静态代码审查遗漏的缺陷:状态交互副作用、顺序调用间的竞态条件,以及相互静默撤销的处理程序。

npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/click-path-audit"
Check the pinned source

Best fit

  • 追踪每个面向用户的按钮/触点的完整状态变化序列,以发现功能单独工作但相互抵消、产生错误最终状态或使UI处于不一致状态的错误。适用于:系统调试未发现错误但用户报告按钮失效,或在任何涉及共享状态存储的重大重构之后。

Bring this context

  • A concrete task that matches the documented purpose of click-path-audit.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned click-path-audit instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read click-path-audit through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

解决的问题

函数是否存在?(缺少连接) 是否崩溃?(运行时错误) 是否返回正确类型?(数据流)

SKILL.md · 解决的问题
函数是否存在?(缺少连接)是否崩溃?(运行时错误)是否返回正确类型?(数据流)
02

工作原理

Review the “工作原理” section in the pinned source before continuing.

SKILL.md · 工作原理
Review and apply the “工作原理” source section.
03

执行步骤

在审计任何触点之前,构建每个状态存储操作的副作用映射:

SKILL.md · 执行步骤
在审计任何触点之前,构建每个状态存储操作的副作用映射:这是关键参考。"新邮件"缺陷在不知道 selectThread 重置了 composeMode 的情况下是不可见的。
04

步骤 1:映射状态存储

在审计任何触点之前,构建每个状态存储操作的副作用映射:

SKILL.md · 步骤 1:映射状态存储
在审计任何触点之前,构建每个状态存储操作的副作用映射:这是关键参考。"新邮件"缺陷在不知道 selectThread 重置了 composeMode 的情况下是不可见的。
05

步骤 2:审计每个触点

Review the “步骤 2:审计每个触点” section in the pinned source before continuing.

SKILL.md · 步骤 2:审计每个触点
Review and apply the “步骤 2:审计每个触点” source section.

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use click-path-audit to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned click-path-audit source to [task]. Pay particular attention to these source sections: “解决的问题”, “工作原理”, “执行步骤”, “步骤 1:映射状态存储”, “步骤 2:审计每个触点”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current click-path-audit result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “解决的问题” has been checked.

The source section “工作原理” has been checked.

The source section “执行步骤” has been checked.

The source section “步骤 1:映射状态存储” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

click-path-audit

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.

A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.

Open source detail

click-path-audit

ユーザー向けボタン/タッチポイントを完全な状態変更シーケンスを通して追跡し、機能が個別に機能するが互いにキャンセルされたり、間違った最終状態を生成したり、UIを矛盾した状態にしたままにするバグを見つけます。次の場合に使用します:体系的なデバッグがバグを見つけたが、ユーザーは壊れたボタンを報告する場合、または共有状態ストアに触れる主要なリファクター後。

A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.

Open source detail

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

A separate implementation from coreyhaines31/marketingskills; compare its source, maintenance signals, and permission requirements.

Open source detail

FAQ

What does click-path-audit do?

发现静态代码审查遗漏的缺陷:状态交互副作用、顺序调用间的竞态条件,以及相互静默撤销的处理程序。

How do I start using click-path-audit?

The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/click-path-audit". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
234,327
Repository forks
35,711
Quality
69/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

69/100
Documentation23/30
Specificity14/25
Maintenance20/20
Trust signals12/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

click-path-audit by affaan-m

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.

click-path-audit by affaan-m

ユーザー向けボタン/タッチポイントを完全な状態変更シーケンスを通して追跡し、機能が個別に機能するが互いにキャンセルされたり、間違った最終状態を生成したり、UIを矛盾した状態にしたままにするバグを見つけます。次の場合に使用します:体系的なデバッグがバグを見つけたが、ユーザーは壊れたボタンを報告する場合、または共有状態ストアに触れる主要なリファクター後。

ab-testing by coreyhaines31

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

churn-prevention by coreyhaines31

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers o

design-intelligence by event4u-app

Grounded design brief from the adopted corpus — style, WCAG-checked color tokens, typography, layout pattern, anti-patterns. Use on ui-design-brief or any which-style/palette/font/chart decision.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 1 min

/click-path-audit — 行为流审计

发现静态代码审查遗漏的缺陷:状态交互副作用、顺序调用间的竞态条件,以及相互静默撤销的处理程序。

解决的问题

传统调试检查:

  • 函数是否存在?(缺少连接)
  • 是否崩溃?(运行时错误)
  • 是否返回正确类型?(数据流)

但未检查:

  • 最终 UI 状态是否与按钮标签承诺一致?
  • 函数 B 是否静默撤销了函数 A 刚刚执行的操作?
  • 共享状态(Zustand/Redux/context)是否存在抵消预期操作的副作用?

真实案例:一个"新邮件"按钮依次调用了 setComposeMode(true)selectThread(null)。两者单独工作正常。但 selectThread 有一个副作用重置了 composeMode: false。按钮毫无反应。系统化调试发现了 54 个缺陷——这个被遗漏了。


工作原理

针对目标区域内的每个交互触点:

1. 识别处理函数(onClick、onSubmit、onChange 等)
2. 按顺序追踪处理函数中的每个函数调用
3. 对于每个函数调用:
   a. 它读取了哪些状态?
   b. 它写入了哪些状态?
   c. 它是否对共享状态产生了副作用?
   d. 它是否作为副作用重置/清除了任何状态?
4. 检查:后续调用是否会撤销前面调用的状态变更?
5. 检查:最终状态是否符合用户对按钮标签的预期?
6. 检查:是否存在竞态条件(异步调用以错误顺序解析)?

执行步骤

步骤 1:映射状态存储

在审计任何触点之前,构建每个状态存储操作的副作用映射:

对于作用域内的每个 Zustand 存储 / React 上下文:
  对于每个操作/设置器:
    - 它设置了哪些字段?
    - 它是否作为副作用重置了其他字段?
    - 文档:actionName → {sets: [...], resets: [...]}

这是关键参考。"新邮件"缺陷在不知道 selectThread 重置了 composeMode 的情况下是不可见的。

输出格式:

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

危险的重置(清除不属于自身状态的操作):
  selectThread → 重置 composeMode(由 setComposeMode 拥有)
  reset → 重置所有内容

步骤 2:审计每个触点

针对目标区域内的每个按钮/开关/表单提交:

TOUCHPOINT: [按钮标签] 在 [组件:行]
  HANDLER: onClick → {
    调用 1: functionA() → 设置 {X: true}
    调用 2: functionB() → 设置 {Y: null} 重置 {X: false}  ← 冲突
  }
  EXPECTED: 用户看到 [按钮标签所承诺的描述]
  ACTUAL: X 为 false,因为 functionB 重置了它
  VERDICT: BUG — [描述]

检查以下每种缺陷模式:

模式 1:顺序撤销

handler() {
  setState_A(true)     // 设置 X = true
  setState_B(null)     // 副作用:重置 X = false
}
// 结果:X 为 false。第一次调用毫无意义。

模式 2:异步竞态

handler() {
  fetchA().then(() => setState({ loading: false }))
  fetchB().then(() => setState({ loading: true }))
}
// 结果:最终的 loading 状态取决于哪个先完成

模式 3:过期闭包

const [count, setCount] = useState(0)
const handler = useCallback(() => {
  setCount(count + 1)  // 捕获了过时的 count
  setCount(count + 1)  // 同样的过时 count — 只增加 1,而不是 2
}, [count])

模式 4:缺失状态转换

// 按钮显示"保存",但处理程序仅验证,从未实际保存
// 按钮显示"删除",但处理程序设置了一个标志而未调用API
// 按钮显示"发送",但API端点已被移除/损坏

模式 5:条件死路径

handler() {
  if (someState) {        // 此时 someState 始终为 false
    doTheActualThing()    // 永远不会执行到
  }
}

模式 6:useEffect 干扰

// Button 设置 stateX = true
// useEffect 监听 stateX 并将其重置为 false
// 用户看不到任何变化

步骤 3:报告

针对发现的每个缺陷:

CLICK-PATH-NNN: [严重性: 严重/高/中/低]
  触点: [按钮标签] 位于 [文件:行号]
  模式: [顺序撤销 / 异步竞态 / 过期闭包 / 缺失过渡 / 死路径 / useEffect 干扰]
  处理函数: [函数名或内联]
  追踪:
    1. [调用] → 设置 {字段: 值}
    2. [调用] → 重置 {字段: 值}  ← 冲突
  预期: [用户期望的结果]
  实际: [实际发生的结果]
  修复: [具体修复方案]

范围控制

此审计成本较高。请适当限定范围:

  • 全应用审计: 在发布或重大重构后使用。按页面启动并行代理。
  • 单页面审计: 在构建新页面或用户报告按钮失效后使用。
  • 存储聚焦审计: 在修改 Zustand 存储后使用——审计所有使用已更改操作的消费者。

全应用推荐的代理拆分:

Agent 1:映射所有状态存储(步骤 1)——这是所有其他代理的共享上下文
Agent 2:仪表盘(任务、笔记、日志、想法)
Agent 3:聊天(DanteChatColumn、JustChatPage)
Agent 4:邮件(ThreadList、DraftArea、EmailsPage)
Agent 5:项目(ProjectsPage、ProjectOverviewTab、NewProjectWizard)
Agent 6:CRM(所有子标签页)
Agent 7:个人资料、设置、保险库、通知
Agent 8:管理套件(所有页面)

代理 1 必须首先完成。其输出是所有其他代理的输入。


何时使用

  • 系统化调试发现"无缺陷"但用户报告 UI 失效后
  • 修改任何 Zustand 存储操作后(检查所有调用者)
  • 任何涉及共享状态的重构后
  • 发布前,针对关键用户流程
  • 当按钮"无反应"时——这是解决该问题的工具

何时不使用

  • 针对 API 级别缺陷(错误的响应结构、缺失端点)——使用系统化调试
  • 针对样式/布局问题——视觉检查
  • 针对性能问题——性能分析工具

与其他技能的集成

  • /superpowers:systematic-debugging(发现其他 54 种缺陷类型)之后运行
  • /superpowers:verification-before-completion(验证修复是否有效)之前运行
  • 反馈至 /superpowers:test-driven-development——此处发现的每个缺陷都应添加测试

示例:启发此技能的缺陷

ThreadList.tsx "新邮件"按钮:

onClick={() => {
  useEmailStore.getState().setComposeMode(true)   // ✓ 设置 composeMode = true
  useEmailStore.getState().selectThread(null)      // ✗ 重置 composeMode = false
}}

存储定义:

selectThread: (thread) => set({
  selectedThread: thread,
  selectedThreadId: thread?.id ?? null,
  messages: [],
  drafts: [],
  selectedDraft: null,
  summary: null,
  composeMode: false,     // ← 这个静默重置导致按钮失效
  composeData: null,
  redraftOpen: false,
})

系统化调试遗漏了它,因为:

  • 按钮有 onClick 处理程序(未失效)
  • 两个函数都存在(无缺失连接)
  • 两个函数均未崩溃(无运行时错误)
  • 数据类型正确(无类型不匹配)

点击路径审计捕获了它,因为:

  • 步骤 1 映射出 selectThread 重置了 composeMode
  • 步骤 2 追踪处理程序:调用 1 设置为 true,调用 2 重置为 false
  • 判定:顺序撤销——最终状态与按钮意图矛盾
Source repo
affaan-m/ECC
Skill path
docs/zh-CN/skills/click-path-audit/SKILL.md
Commit SHA
4e973d3eaf92
Repository license
MIT
Data collected