Install
openclaw skills install bug-auditComprehensive bug audit for Node.js web projects. Activate when user asks to audit, review, check bugs, find vulnerabilities, or do security/quality review on a project. Works by dissecting the project's actual code to build project-specific check matrices, then exhaustively verifying each item — not by running a generic checklist. Supports games, data tools, WeChat apps, API services, bots, and dashboards.
openclaw skills install bug-auditDo NOT run a generic checklist. Instead: read the code, extract every auditable entity, then exhaustively question each one.
Read all project files. Build 7 tables. These tables ARE the audit — everything found here gets verified in Phase 2.
For every route in server-side code:
| # | Method | Path | Auth? | Params validated? | Precondition | Returns | Attack vector |
For each endpoint, ask:
For every boolean/enum state variable (isGameOver, battleState, Game.running, phase, mode...):
| # | Variable | Set by | Read by | Init value | Reset when? | Can it leak across lifecycles? |
For each variable, ask:
For every setTimeout/setInterval:
| # | Type | Delay | Created in | Cleared in | What if lifecycle ends before it fires? |
For each timer, ask:
For every user-influenceable number (cost, score, damage, lootValue, kills, quantity...):
| # | Name | Source (client/server/config) | Validated? | Min | Max | What if 0? | What if negative? |
For each value, ask:
For every pair of related APIs (buy→use, start→complete, pay→deliver, login→action):
| # | Step 1 API | Step 2 API | Token/link between them? | Can skip Step 1? | Can replay Step 1? |
This is where the biggest bugs hide. For each flow, ask:
For every in-game resource (coins, gems, items, XP, energy...):
| # | Resource | All INFLOWS (APIs/events that add) | All OUTFLOWS (APIs/events that subtract) | Daily limits? | Can any inflow be infinite? |
For each resource, ask:
For every operation that reads-then-writes shared state (balance check→deduct, stock check→reserve, coupon check→redeem):
| # | Operation | Read step | Write step | Atomic? | What if 2 requests hit simultaneously? |
This catches race conditions that single-request testing misses. For each operation, ask:
UPDATE x=x-1 WHERE x>=1 is atomic; SELECT then UPDATE is NOT)Go through every row in every table. For each row, determine:
Output format:
Bug N: [🔴/🟡/🟢] Brief description
- Row: Table X, #Y
- Cause: ...
- Fix: ...
- File: ...
Do NOT stop when you run out of "inspiration". You stop when every row in every table has been verified ✅ or flagged 🔴/🟡/🟢. This is exhaustive, not heuristic.
After verifying all tables, switch to adversarial mode. Read references/redblue.md for the full playbook.
The playbook has 4 parts:
After red/blue team, run generic checks as a final safety net. Read references/modules.md and pick sections matching the project:
Update project docs with: date, tables built, bugs found/fixed, key pitfalls for next audit.
references/modules.md — Generic audit modules (Security, Crypto, Data, Performance, Game, WeChat, API, Bot, Deploy, Error Handling, UX, Supply Chain, Logging) for Phase 4 supplementary checks.references/redblue.md — Red team attack chains (universal + 6 project types) and blue team defense verification playbook for Phase 3.references/pitfalls.md — Real-world pitfall lookup table from 200+ bugs, plus WeChat WebView remote debugging techniques.