code-audit
Skill65 starsChanged 2 months agoApache-2.0View on GitHub
Review code for correctness bugs, concurrency and lifecycle errors, type-safety holes, error handling gaps, API-contract breaks, and maintainability problems, with every finding gated on a concrete failure scenario. Use when asked to review code, check a diff or branch for bugs, look for problems before committing or opening a PR, or assess code quality.
27 other projects use a version of this.
Adopted by
Most recently taken up by
- pietz/skillstheir own version, first seen Nov 8, 2026
- robinbril/claude-code-harnesstheir own version, first seen Nov 1, 2026
- lza6/claw-code-tingfengtheir own version, first seen Nov 1, 2026
- VorElze/hermes-office-skillstheir own version, first seen Nov 1, 2026
- greglas75/zuvotheir own version, first seen Oct 16, 2026
- folkjrk/claude-skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use database-security, malware-analysis and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JeremyMorganSkilldatabase-security
Examines all database interactions for injection, access control, encryption, and data-exposure risks. Use when auditing database and data-layer security.
Also in 3 projects that use this
tsaleSkillmalware-analysis
Professional malware analysis workflow for PE executables and suspicious files. Triggers on file uploads with requests like "analyze this malware", "analyze this sample", "what does this executable do", "check this file for malware", or any request to examine suspicious files. Performs static analysis, threat intelligence triage, behavioral inference, and produces analyst-grade reports with reasoned conclusions.
Also in 3 projects that use this
jefflesterSkillapi-security
API security best practices and common vulnerability prevention. Enforces security checks for authentication, input validation, SQL injection, XSS, and OWASP Top 10 vulnerabilities. Use when building or modifying APIs.
Also in 3 projects that use this
QiuChenlySkillreverse-engineering
专业二进制逆向工程分析技能。使用IDA Pro MCP工具分析二进制文件、反编译代码、识别漏洞、理解程序逻辑。当用户要求分析可执行文件、反汇编、逆向工程、漏洞挖掘、恶意软件分析时使用此技能。
Also in 3 projects that use this
SentrySkillui-design
Also in 3 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 3 projects that use this
Other versions27 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 27
- zhaoxuya520/reverse-skill-private★ 40ksame name
- zhaoxuya520/reverse-skill★ 38ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- pass-with-high-score/blockads-android★ 2.7ksame name
- 3stoneBrother/code-audit★ 893same name
- aspi6246/Claude-Code-Skills-for-Academics★ 153same name
- hawkyre/hawk-skills★ 30same name
- greglas75/zuvo★ 7same name
- lza6/claw-code-tingfeng★ 5same name
17 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a11y-auditSkill
- ai-adversarial-loopSkill
- ai-agents-mdSkill
- ai-architectSkill
- ai-audit-codeSkill
- ai-audit-designSkill
- ai-audit-docsSkill
- ai-brainstormSkill
- ai-codegraphSkill
- ai-config-to-projectSkill
- ai-debugSkill
- ai-design-md-plannerSkill
- ai-exploreSkill
- ai-git-cleanupSkill
- ai-issue-reportSkill
- ai-noteSkill
- ai-orchestratorSkill
- ai-prototypeSkill
- ai-prSkill
- ai-read-docsSkill
- ai-researchSkill
- ai-review-uiSkill
- ai-securitySkill
- ai-stress-testSkill
- ai-test-plannerSkill
- ai-triageSkill
- ai-verifySkill
- ai-visual-recapSkill
- ai-writeSkill
- ai-writing-behaviorSkill
- build-checkSkill
- design-checkSkill
- feature-verifySkill
- full-reviewSkill
- perf-auditSkill
- review-routerSkill
- second-opinionSkill
- security-auditSkill
- spec-extractSkill
- verify-featureSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Read .claude/review/CONVENTIONS.md first — stack detection, scope, severity, the false-positive gate, and the report format.
- Distinctive: line 94
Do not report style the linter owns, formatting, or subjective preferences.
- Very specific: line 98
Check what the project actually has first (per CONVENTIONS.md §1).
- Distinctive: line 108
Read every changed file completely, plus the files it imports from and the files that call it.
- Very specific: line 122
Follow the output contract in CONVENTIONS.md.
- Distinctive: line 125
Every finding needs a Fix that names the specific change — "move the allocation above the early return at line 30 so the deferred close …
- Distinctive: line 137
Read by: the human, full-review Dies: with the reviewed diff Next: ai-verify
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code audit
Find defects that will actually bite.
Read .claude/review/CONVENTIONS.md first — stack detection, scope, severity,
the false-positive gate, and the report format. The installed-version rule is
the single most important constraint here: verify against the installed source
before calling any framework or library API misuse. Most false positives in a
review like this come from reviewing the code as if it were an older version of
its framework.
Security is out of scope — that is security-audit. Accessibility is
a11y-audit, performance is perf-audit. Overlap is fine; do not go hunting
outside your lane.
What to look for
Ordered by how often each actually causes damage. Read files fully — the bug is usually in the interaction between two functions, not inside one.
1. Correctness
Logic that produces a wrong result: off-by-one and boundary conditions, inverted
or short-circuiting conditionals, null/nil/undefined reaching a dereference,
zero-values hitting a truthiness check that meant "absent" (0, "", empty
collection, false), index and slice assumptions, integer division and rounding,
timezone and DST handling, float comparison, mutation of shared or aliased state,
and the classic mutate-while-iterating.
2. Async, concurrency, and ordering Whatever this language's concurrency model is, the failure modes rhyme: operations awaited in the wrong order or not awaited at all; a result used before it is ready; two paths racing on shared state with no synchronization; a lock held across a suspension point or acquired in inconsistent order (deadlock); cancellation that leaves work half-done; retries that are not idempotent; a callback that closes over a value it expects to still be current and is not.
3. Resource and lifecycle management
Anything acquired must be released on every path including the error path:
file handles, sockets, DB connections and transactions, locks, subscriptions,
timers, listeners, watchers, background tasks. Look for a close/unsubscribe/
cancel that exists on the happy path only. In UI frameworks this is the
component-teardown path; in servers it is the request-error path.
4. Type safety and data modeling
Escape hatches that hide a real mismatch: unchecked casts and assertions, any
or its equivalent leaking through an untyped boundary, non-null assertions on
values that can genuinely be null, suppression comments with no stated reason,
optional fields treated as guaranteed. Then the deeper version: types that
model impossible states as valid — an object where two fields must agree and
nothing enforces it, a status enum that permits combinations the domain forbids.
5. Error handling Errors swallowed silently, or logged and then execution continues with bad state. Failures with no user-visible or caller-visible outcome. Catch blocks so broad they hide unrelated bugs. Thrown or returned values that are not the language's error type. Missing loading and error states for async work. Error paths that themselves can fail. Partial writes with no rollback.
6. API and contract changes A signature, return shape, status code, event payload, or DB column changed without updating every caller — check the callers, don't assume. Behavior changes that are technically compatible but break a documented promise. Defaults changed underneath existing users. Migrations that are not backwards compatible with the currently deployed code.
7. Framework-specific semantics Load the checks that match the stack you detected, and verify each against the installed version before reporting:
- Component UI frameworks — stale closures over props/state; missing or dishonest dependency arrays; effects that should have been event handlers or derived values; missing cleanup; unstable list keys over reorderable data; state updates assumed to apply synchronously; derived state duplicated into local state and then desynced.
- Server frameworks — handler signatures, middleware ordering, request lifecycle, what runs per-request versus once at boot, and any server/client or trusted/untrusted module boundary the framework defines.
- ORMs and data layers — lazy loading outside a session, N+1 access patterns, transaction boundaries that do not cover the whole unit of work, and implicit connection reuse across concurrent tasks.
8. Maintainability — only where the cost is concrete Duplicated logic that must be changed in lockstep (name both sites). Dead code and unused exports. Functions doing several unrelated things at a level of abstraction their name does not suggest. Names that mislead about behavior. Magic values repeated across files.
Do not report style the linter owns, formatting, or subjective preferences. "I would have structured this differently" is not a finding.
9. Test coverage
Check what the project actually has first (per CONVENTIONS.md §1). If a test
framework is configured, treat missing coverage of genuinely risky new logic —
non-obvious branching, data transforms, parsing, money, dates — as a finding, and
name the specific case that is untested. If no framework is configured, do not
fabricate failures for missing tests: note it once in Not covered and, if the
change is load-bearing, recommend adding a test setup. One note, not one per file.
Method
- Detect the stack and resolve scope per
CONVENTIONS.md. - Read every changed file completely, plus the files it imports from and the files that call it. A diff read in isolation hides most real bugs.
- Collect candidate findings while reading — do not judge yet.
- Verify pass. For each candidate, go back to the code and try to disprove it. Check the caller's guarantees, the type, the guard clause you skimmed. If it depends on framework or library behavior, check the installed source now. Drop what does not survive.
- Write the report.
Step 4 is the one that determines whether this review is worth reading. Do not skip it, and do not compress it into "looks right".
Report
Follow the output contract in CONVENTIONS.md. Write to
.claude/reviews/code-audit-<stamp>.md.
Every finding needs a Fix that names the specific change — "move the allocation above the early return at line 30 so the deferred close always runs", not "improve the resource handling". If the right fix is genuinely a judgment call between two approaches, give both and say which you would pick and why.
Order findings by severity, then by blast radius. Do not pad the report to look
thorough — the Checked and clean section is where you demonstrate coverage.
Lifecycle
Lane: full Writes: the code audit report Read by: the human, full-review Dies: with the reviewed diff Next: ai-verify
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

