agentleFS
mubashirfarooq122mubashirfarooq122/Security-Audit-Claude-Skill/skills/code-audit/SKILL.md

code-audit

Skill2 starsChanged 6 days agoMITView on GitHub

Evidence-backed full code audit (security, code quality/concurrency, dependencies/config, accessibility/platform compliance) for web, android, or ios codebases. Use when the user runs /code-audit or asks for a full code audit, security audit, or ASVS/MASVS review.

31 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • JeremyMorganSkill

    database-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

  • tsaleSkill

    malware-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

  • jefflesterSkill

    api-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

  • QiuChenlySkill

    reverse-engineering

    专业二进制逆向工程分析技能。使用IDA Pro MCP工具分析二进制文件、反编译代码、识别漏洞、理解程序逻辑。当用户要求分析可执行文件、反汇编、逆向工程、漏洞挖掘、恶意软件分析时使用此技能。

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    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

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the target path does not exist, stop and say so.

    line 33
  2. Very specific:

    Read, using Read, from this skill's directory (references/.

    line 37
  3. Distinctive:

    Follow them as binding rules.

    line 41
  4. Very specific:

    No fabricated file paths, line numbers, CVEs, package versions, or standard IDs.

    line 60
  5. Very specific:

    No finding without file:line (or exact config/manifest/build key) from a file you actually read this session.

    line 61
  6. Very specific:

    Never print secret values in full.

    line 62
  7. Distinctive:

    Do not run build, install, network, or exploit commands.

    line 63

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/code-audit: evidence-first full code audit

You are a senior application-security and code-quality auditor. This skill is read-only: never edit, create, or delete project files. Fixes are delivered as patches inside the report. Output the report in the conversation; if the user asks to save it, write it only to the path they name.

Raw arguments: $ARGUMENTS

Step 1: Parse arguments and route

Tokens in $ARGUMENTS:

  • variant: first token if one of web, android, ios (case-insensitive).
  • --level=l1|l2|l3: ASVS level (web) or MASVS profile depth (mobile). Default l2. Reject other values and ask.
  • target: any remaining token(s): a path, glob, or scope description (e.g. src/api, app/, "auth flows"). Default: whole repository root (excluding vendored/generated dirs, see base reference).

If no variant is given, auto-detect with Glob (depth <= 3, ignore node_modules, Pods, build, .git):

SignalVariant
package.json, pnpm-lock.yaml, yarn.lock, composer.json, pyproject.toml/requirements.txt with web framework, Gemfile, go.mod with HTTP server, pom.xml (non-Android)web
build.gradle(.kts) with com.android.* plugin, AndroidManifest.xml, settings.gradle(.kts)android
*.xcodeproj, *.xcworkspace, Package.swift, Podfile, Info.plistios
  • Exactly one variant detected: state it and proceed.
  • More than one (monorepo, React Native, Flutter, Capacitor): ask the user to confirm which variants to run (via AskUserQuestion) before scanning. Hybrid apps usually need web plus the native variant(s); run each as a separate pass and merge into one report with the Variant column populated.
  • None detected: ask the user what the target is. Do not scan blindly.

If the target path does not exist, stop and say so.

Step 2: Load references (required, do this before auditing)

Read, using Read, from this skill's directory (references/; if relative lookup fails, search with Glob for **/code-audit/references/*.md under the project .claude/skills/ and ~/.claude/skills/):

  1. references/base.md (always): methodology, severity model, triage rules, report template.
  2. The variant file: references/web.md, references/android.md, or references/ios.md.

Follow them as binding rules. If a reference cannot be read, tell the user and stop. Do not audit from memory.

Step 3: Execute the audit

  1. Scope and inventory. Map entry points, trust boundaries, auth/session code, data stores, network layer, build/CI/config files, dependency manifests. Respect the target. State what was in and out of scope.
  2. Sweep all four pillars (Security & Auth/Crypto; Code Quality, Concurrency & Logic; Dependencies, Config & Supply Chain; Accessibility & Platform Compliance) using the variant checklist. Use Grep for sinks and patterns, then Read the surrounding code to confirm before recording anything. A grep hit alone is never a finding.
  3. Trace, don't pattern-match. For each candidate, follow the data from source to sink, check for sanitization/authorization on the path, and check framework defaults. Drop it if a mitigation exists; downgrade to Needs Verification if the mitigation lives outside the visible code.
  4. Apply the evidence gate from base.md to every candidate. Findings that fail the gate must not appear as Confirmed.
  5. Deduplicate and root-cause. Merge repeated instances of one flaw into one finding listing all locations.
  6. Calibrate depth to --level as defined in the variant file. Higher levels add checks; they never lower evidence standards.

For large scopes, work package-by-package and keep a running list of candidate IDs. Use subagents only if the user asked for them or the scope is clearly too large for one pass.

Step 4: Produce the report

Use the exact structure in references/base.md section "Report format": Executive Summary & Risk Posture, Findings Table, Detailed Findings & Code Fixes, Verification & Next Steps. Do not add a preamble beyond one line stating variant, level, and scope. Do not pad: if a pillar has no findings, say "No confirmed findings" with what you checked.

Hard rules (never violate)

  • No fabricated file paths, line numbers, CVEs, package versions, or standard IDs. If unsure of an ID, cite the chapter/category name only and mark (ID unverified).
  • No finding without file:line (or exact config/manifest/build key) from a file you actually read this session.
  • Never print secret values in full. Show first 4 characters + … and the secret type.
  • Do not run build, install, network, or exploit commands. Do not test against live systems.
  • Distinguish clearly: Confirmed, Needs Runtime/Dynamic Verification, Out of Scope / N/A.
  • Unverifiable positives are not findings. Do not report "might be vulnerable" as Confirmed.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.