code-audit
Skill0 starsChanged 41 days agoMITView on GitHub
Audit codebase for coding standards, duplication, logging hygiene, security, test quality, and dependency freshness
- Reads credentials
31 other projects use a version of this.
Adopted by
Most recently taken up by
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Nov 29, 2026
- mubashirfarooq122/Security-Audit-Claude-Skilltheir own version, first seen Nov 29, 2026
- Hzkun001/hzkunsectheir own version, first seen Nov 22, 2026
- miinhho/skillstheir own version, first seen Nov 16, 2026
- antick/skillstheir own version, first seen Nov 16, 2026
- smarzban/agent-skillstheir own version, first seen Nov 15, 2026
Used with
Projects with it also use database-security, malware-analysis and 3 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
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 versions31 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 31
- zhaoxuya520/reverse-skill-private★ 45ksame name
- zhaoxuya520/reverse-skill★ 45ksame name
- pass-with-high-score/blockads-android★ 2.9ksame 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
- pietz/skills★ 3same name
- robinbril/claude-code-harness★ 3same name
21 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 repositoryOne other file it gives its agents.
- guided-planningSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
6
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 7
Run a comprehensive code quality audit of this project.
- Very specific: line 11
Read the project root to determine language and framework.
- Distinctive: line 13
Test framework and test directory convention
- Very specific: line 23
If $ARGUMENTS is non-empty, tell each agent to restrict its search to that path.
- Distinctive: line 163
After ALL 6 agents return their findings:
- Distinctive: line 198
If there are no findings at a severity level, omit that entire section.
- Distinctive: line 202
After presenting the audit report from Step 3, generate an implementation plan to fix the findings.
- Distinctive: line 211
Add a verification checklist
- Distinctive: line 243
If a category has no findings, omit that table.
“Common” is measured: kept by at least 6 in 10 of the 20 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
Run a comprehensive code quality audit of this project. If the user provided a path argument, scope the audit to that subdirectory only: $ARGUMENTS
Step 1: Auto-detect project context
Read the project root to determine language and framework. Check for files like package.json, Cargo.toml, pyproject.toml, go.mod, pom.xml, build.gradle, *.sln, Gemfile, or similar. Also check for tsconfig.json, .eslintrc*, eslint.config.*, CLAUDE.md, and any linting/formatting config. Identify:
- Primary language(s) and framework(s)
- Test framework and test directory convention
- Source directory convention
- Any project-specific coding standards from CLAUDE.md or linter configs
Store this as a short context string (2-3 sentences). You will pass this to each subagent.
Step 2: Launch 6 parallel audit agents
Launch ALL 6 of the following Task agents in a SINGLE message so they run in parallel. Agents 1-5 MUST use subagent_type: "Explore". Agent 6 MUST use subagent_type: "general-purpose" (it needs Bash to run CLI tools). Each agent receives the project context string from Step 1.
If $ARGUMENTS is non-empty, tell each agent to restrict its search to that path. Otherwise, agents search the full project source (excluding node_modules, dist, build, vendor, .git, and similar output directories).
CRITICAL output constraint for EVERY agent: Return ONLY a structured bullet list of findings. Each finding must follow this exact format:
- [HIGH|MEDIUM|LOW] <short description> — <file:line> (and <file:line> if comparing two locations)Maximum 15 findings per agent. No prose, no preamble, no summary paragraph — just the bullet list. If no issues found, return - No issues found.
Agent 1: Coding Standards & Consistency
You are auditing a <context>.
Check that the codebase follows consistent coding standards and patterns. Look for:
1. NAMING: Inconsistent naming conventions — mixing camelCase/snake_case/PascalCase where the project uses one style. Check variable names, function names, file names, and export names.
2. PATTERNS: Inconsistent application of project patterns — if the project uses a specific pattern (e.g., singleton init, error handling, module structure), find places that deviate from that pattern without justification.
3. ERROR HANDLING: Inconsistent error handling — some functions throw, some return null, some swallow errors silently. Flag functions that handle errors differently from the dominant pattern.
4. STYLE: Inconsistent code style within the same project — e.g., mixing async/await with .then() chains, mixing arrow functions with function declarations for the same purpose, inconsistent import ordering.
Use Glob to find source files, Read to examine them, Grep to find patterns.
Return findings as: - [HIGH|MEDIUM|LOW] description — file:line (and file:line)
Max 15 findings. No prose.Agent 2: Code Duplication
You are auditing a <context>.
Scan source files (NOT test files) for duplication and repeated patterns. Look for:
1. NEAR-IDENTICAL FUNCTIONS: Functions across different files that do essentially the same thing with minor variations (different variable names, slight parameter differences). Compare function signatures and bodies.
2. COPY-PASTED BLOCKS: 3+ lines of similar code appearing in multiple places that could be extracted into a shared helper.
3. REPEATED LOGIC: The same pattern of API calls, data transformations, or error handling repeated across files. E.g., the same try/catch/log pattern, the same data formatting logic, the same validation sequence.
4. DUPLICATED CONSTANTS: Magic strings or numbers repeated in multiple files instead of being defined in one place.
Use Glob to find source files, Read to examine them, Grep to find repeated string literals and similar function names. Focus on the most impactful duplications first.
Return findings as: - [HIGH|MEDIUM|LOW] description — file:line (and file:line)
Max 15 findings. No prose.Agent 3: Logging Hygiene & Debug Artifacts
You are auditing a <context>.
Check for improper logging practices and leftover debug artifacts. Look for:
1. RAW CONSOLE CALLS: Any use of console.log, console.warn, console.error, console.info, console.debug, or language equivalents (print, println, fmt.Println, etc.) in production source code. These should use a proper structured logging library/service instead. Flag every instance.
2. DEBUG LEFTOVERS: Temporary debugging code left in — commented-out console.log/print statements, TODO/FIXME/HACK/XXX comments that reference debugging, temporary variables only used for logging.
3. SENSITIVE DATA IN LOGS: Log statements that might output tokens, passwords, API keys, user data, or full request/response bodies. Check what variables are being passed to log calls.
4. INCONSISTENT LOG LEVELS: If the project does have a logger, check that log levels are used appropriately — errors logged as info, info logged as debug, etc.
Use Grep to search for console.log, console.warn, console.error, console.info, console.debug, print, println, and similar patterns. Read the surrounding context to assess severity.
Return findings as: - [HIGH|MEDIUM|LOW] description — file:line
Max 15 findings. No prose.Agent 4: Security — Secrets & Environment Handling
You are auditing a <context>.
Check for security issues related to secrets, environment variables, and sensitive data handling. Look for:
1. HARDCODED SECRETS: Any hardcoded API keys, tokens, passwords, connection strings, or credentials in source code. Check for strings that look like tokens (long alphanumeric strings), URLs with embedded credentials, and variables named key/secret/token/password with literal values.
2. ENV VALIDATION: Environment variables accessed directly (process.env.X, os.environ, etc.) without validation or type checking. They should go through a validated config layer, not be read ad-hoc throughout the codebase.
3. GITIGNORE GAPS: Check .gitignore for missing entries — .env files, credential files (*.pem, *.key, service-account.json), data directories with potentially sensitive content, IDE configs that may contain project-specific secrets.
4. SECRET EXPOSURE: Secrets that could leak through error messages, stack traces, API responses, or log output. Check error handlers and catch blocks for what they expose.
5. COMMITTED SECRETS: Check if any .env, credential, or key files exist in the repo (not just gitignored but actually present in tracked files).
Use Glob to find config files, .env files, credential files. Grep for patterns like hardcoded tokens, process.env, os.environ. Read .gitignore and compare against actual files.
Return findings as: - [HIGH|MEDIUM|LOW] description — file:line
Max 15 findings. No prose.Agent 5: Test Quality & Coverage
You are auditing a <context>.
Evaluate test quality, coverage gaps, and superfluous tests. Look for:
1. COVERAGE GAPS: Source files or modules that have NO corresponding test file. List each untested source file. Cross-reference by checking if each source file's exports are imported in any test file.
2. SUPERFLUOUS TESTS: Tests that don't actually assert anything meaningful — tests that only check truthiness, tests that are essentially duplicates of other tests with trivially different inputs, tests that mock so heavily they only test the mocks, tests that test language/framework behavior rather than application logic.
3. DUPLICATED TEST SETUP: Identical or near-identical beforeEach/beforeAll/setup blocks across multiple test files that should be extracted into shared test helpers. Repeated mock definitions that could be centralized.
4. FRAGILE TESTS: Tests tightly coupled to implementation details — testing private internals, asserting on exact string output that will break on formatting changes, testing mock call counts instead of behavior.
5. MISSING EDGE CASES: Test files that only test the happy path for functions that have obvious error/edge cases (null inputs, empty arrays, network failures, etc.).
Use Glob to find all test files and all source files. Read test files to assess quality. Grep to check which source exports are referenced in test files.
Return findings as: - [HIGH|MEDIUM|LOW] description — file:line
Max 15 findings. No prose.Agent 6: Dependency Freshness & Security
IMPORTANT: This agent MUST use subagent_type: "general-purpose" (NOT "Explore") because it needs Bash access to run CLI tools.
You are auditing a <context>.
Check dependency freshness, security vulnerabilities, and lockfile health.
The project context tells you which ecosystems are in use. For each detected
ecosystem, run the appropriate checks:
**For Node.js (package.json detected):**
1. Run `npm audit --json 2>/dev/null` — flag critical and high vulnerabilities as HIGH, moderate as MEDIUM
2. Run `npm outdated --json 2>/dev/null` — flag packages 2+ major versions behind as MEDIUM, 1 major as LOW, minor/patch as LOW
3. Verify package-lock.json exists and is committed. If missing, flag as MEDIUM.
**For Python (pyproject.toml or requirements.txt detected):**
1. Run `pip-audit --format=json 2>/dev/null` — flag critical/high as HIGH, moderate as MEDIUM
2. Run `pip list --outdated --format=json 2>/dev/null` — flag packages 2+ major versions behind as MEDIUM, others as LOW
3. Verify lock file (poetry.lock, requirements.txt with pinned versions) exists. If missing, flag as MEDIUM.
**For Rust (Cargo.toml detected):**
1. Run `cargo audit --json 2>/dev/null` — flag critical/high as HIGH, moderate as MEDIUM
2. Run `cargo outdated --root-deps-only 2>/dev/null` — flag 2+ major versions behind as MEDIUM, others as LOW
3. Verify Cargo.lock exists and is committed. If missing, flag as MEDIUM.
**For Go (go.mod detected):**
1. Run `govulncheck ./... 2>/dev/null` — flag vulnerabilities as HIGH
2. Run `go list -m -u all 2>/dev/null` — flag major updates as MEDIUM, minor/patch as LOW
3. Verify go.sum exists and is committed. If missing, flag as MEDIUM.
If a CLI tool is not installed or fails, note it as:
- [LOW] <tool> not available — unable to check <ecosystem> <check type>
Do NOT flag devDependencies outdated versions as MEDIUM or HIGH — cap at LOW.
Do NOT flag pre-release or alpha/beta versions as outdated.
Prioritize HIGH and MEDIUM findings first. Only include LOW (minor/patch outdated) findings if you have remaining slots in the 15-finding cap.
Return findings as: - [HIGH|MEDIUM|LOW] description — package@version (current -> latest)
For lockfile or tooling issues, use a descriptive identifier instead of package@version.
Max 15 findings. No prose.Step 3: Aggregate and report
After ALL 6 agents return their findings:
- Collect all findings into a single list
- Deduplicate: if two agents flagged the same file:line or essentially the same issue, merge them into one finding and note which categories flagged it
- Group by severity: HIGH first, then MEDIUM, then LOW
- Within each severity group, organize by category: Standards, Duplication, Logging, Security, Testing, Dependencies
Output the final report in this exact format:
# Code Audit Report
**Project**: <detected project type>
**Scope**: <full project or scoped path>
**Findings**: <N total> (<H> high, <M> medium, <L> low)
---
## High Priority
### <Category>
- <finding> — `file:line` or `package@version (current -> latest)`
- <finding> — `file:line` or `package@version (current -> latest)`
## Medium Priority
### <Category>
- <finding> — `file:line` or `package@version`
## Low Priority
### <Category>
- <finding> — `file:line` or `package@version`If there are no findings at a severity level, omit that entire section. Do NOT add any recommendations or action items — just the findings.
Step 4: Generate implementation plan
After presenting the audit report from Step 3, generate an implementation plan to fix the findings. Categorize each finding by estimated effort and provide a suggested fix order.
- Take the aggregated findings from Step 3
- Group each finding into one of three effort categories:
- Quick Wins (< 30 min each): simple renames, import reordering, adding missing gitignore entries, removing debug artifacts, updating patch/minor dependency versions
- Medium Effort (30 min - 2 hours each): extracting shared helpers, deduplicating functions, standardizing patterns, adding missing test files, upgrading major dependency versions, fixing missing lockfiles
- Complex (> 2 hours each): architectural refactors, major security fixes, cross-cutting pattern changes, resolving vulnerability chains requiring coordinated dependency upgrades
- For each finding, identify the file(s) involved and write a brief fix description
- Determine a suggested fix order: utilities/shared code first, then refactors, then tests, then cosmetic changes
- Add a verification checklist
Output the implementation plan in this exact format, appended after the audit report:
# Implementation Plan
## Quick Wins (< 30 min each)
| # | Finding | File(s) | Fix |
|---|---------|---------|-----|
| 1 | <finding description> | `file:line` | <brief fix description> |
## Medium Effort (30 min - 2 hours each)
| # | Finding | File(s) | Fix |
|---|---------|---------|-----|
| 1 | <finding description> | `file:line` | <brief fix description> |
## Complex (> 2 hours)
| # | Finding | File(s) | Fix |
|---|---------|---------|-----|
| 1 | <finding description> | `file:line` | <brief fix description> |
## Suggested Fix Order
1. <category>: <rationale>
2. ...
## Verification
- [ ] TypeScript / language compiler reports 0 errors
- [ ] All tests pass
- [ ] New tests cover previously-untested filesIf a category has no findings, omit that table. The user can then discuss the plan and ask you to implement it.
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.

