skills/code-audit/SKILL.md
Comprehensive code audit for bugs, security, performance, architecture, and production readiness. Use this whenever the user asks for a code audit, security audit, architecture audit, production-readiness review, compliance-oriented scan, or a broad health check of a repository, service, feature area, or codebase. Prefer this skill over PR review skills when the task is repository-wide or multi-dimensional rather than a review of a specific diff.
npx skillsauth add cenjie/skills code-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run a broad, risk-first audit of the target codebase. The goal is to find the issues that matter most, explain why they matter, and give the user a practical path to fix them.
This skill is for repository-scale or feature-scale audits. If the user wants feedback on a specific PR, commit range, or current git diff, prefer the code-review skill instead.
A strong audit:
Use this priority order throughout the audit:
User safety > Correctness > Maintainability > Performance > Elegance
Use this skill when the user asks for any of the following:
Do not use this skill for:
Match the depth of the audit to the request.
| Request shape | Default approach | Deliverable depth | | --- | --- | --- | | Single file or function | Stay local; inspect only adjacent dependencies as needed | Findings + short summary | | Feature or module | Map inputs, outputs, auth, data flow, and integration points | Core deliverables | | Full repository | Run full discovery, then audit hotspots first and widen only where justified | Core + extended deliverables | | Targeted audit, such as security or performance | Go deep on the requested dimension and check nearby failure modes | Core deliverables scoped to target |
Build a short mental model before listing findings.
Inspect enough of the repo to answer:
Produce a brief Repo Mental Map before the main findings.
Do not audit every file with equal weight. Start with the highest-risk surfaces:
Use lightweight search to map blast radius before going deep.
Inspect only the areas that are relevant to the stack and request.
Every finding should be grounded in repo evidence.
For each finding, include:
Avoid generic recommendations with no evidence.
If something important is unclear:
If you could not verify an area, say so plainly in a Not Verified section.
Use severity consistently.
| Severity | Use when | | --- | --- | | Critical | Account takeover, fund loss, data loss, major auth bypass, exploitable secret exposure, severe PII leak | | High | Likely production incident, privilege gap, unsafe data handling, major correctness bug, or easy-to-hit performance collapse | | Medium | Material maintainability or reliability issue, partial protection gap, moderate perf waste, weak test coverage on critical paths | | Low | Minor robustness, clarity, or local design issue with limited blast radius |
Bias upward when exploitability and impact are both high.
Always provide these sections in this order:
## Repo Mental Map
## Executive Summary
## Top Risks
## Findings
Rules:
Executive Summary: 5-10 bullets maximumTop Risks: the most important issues first, ordered by real-world impact rather than file orderFindings: grouped by subsystem, package, or risk area, not by the order you discovered themUse this structure for each finding:
### [Severity] Short Title
- Location: path/to/file.ts:123 (`functionName`)
- Category: Security
- Confidence: High
- Issue: What is wrong
- Why it matters: User or business impact
- Fix: Minimal remediation or next change
- Tests: Specific test coverage to add or update
Include these when the user asks for a deep audit or when the repository scope warrants them:
Security ChecklistPerformance HotspotsRefactor ProposalsOperational GuardrailsSequenced Action PlanKeep these concise and tied to evidence already surfaced.
Use these heuristics to stay sharp:
Write like a senior engineer reporting to an owner who needs to act.
End with a clear next-step choice only when the audit is complete.
Use this format:
## Next Steps
I found X issues (Critical: _, High: _, Medium: _, Low: _).
1. Fix all issues
2. Fix only Critical and High issues
3. Fix specific findings you choose
4. Stop at the audit report
Wait for the user's direction before changing code.
Version: 1.1.0 Status: Active Last Updated: 2026-03-12
development
Launch both thermo-nuclear review subagents in parallel, then synthesize their findings. Use for thermos, double thermo review, or combined bug/security and code-quality branch audits.
development
Comprehensive security and correctness audit of a branch's changes. Use for thermo nuclear, thermonuclear, or deep review requests, or branch/PR diff audits focused on bugs, breaking changes, security issues, devex regressions, and feature-gate leaks.
development
Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for a thermo-nuclear code quality review, thermonuclear review, deep code quality audit, or especially harsh maintainability review.
development
Use for custom storefronts requiring direct GraphQL queries/mutations for data fetching and cart operations. Choose this when you need full control over data fetching and rendering your own UI. NOT for Web Components - if the prompt mentions HTML tags like <shopify-store>, <shopify-cart>, use storefront-web-components instead.