agentleFS
danygigueredanygiguere/audit-skills/.agents/skills/audit/SKILL.md

audit

Skill7 starsChanged 2 days agoMITView on GitHub

Full security, correctness, and operability audit of code. Use when reviewing a diff, endpoint, or feature for vulnerabilities or bugs without a specific topic in mind — security review, audit, code review for safety, "check this for issues".

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use delight, teach-impeccable and 10 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.
  • HK-hubSkill

    delight

    Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.

    Also in 31 projects that use this

  • HK-hubSkill

    teach-impeccable

    One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.

    Also in 18 projects that use this

  • zwy123zwySkill

    normalize

    将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。

    Also in 18 projects that use this

  • ww-w-aiSkill

    pm-discovery

    PM Agent Team - Automated product discovery, strategy, and PRD generation. Runs PM analysis workflow to produce comprehensive PRD before PDCA Plan phase.

    Also in 3 projects that use this

  • ww-w-aiSkill

    qa-phase

    Run QA tests at various levels (L1-L5) for features under PDCA management. Integrates with MCP tools to execute structured test plans.

    Also in 3 projects that use this

  • +7 more from HK-hub

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 173 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Load: only the checklist files matching that behavior, from the map below.

    line 18
  2. Very specific:

    Fix only on request: never change code during an audit.

    line 31
  3. Distinctive:

    Do not manufacture findings for topics that don't apply (e.g., CSRF on a token-authenticated API, tenant isolation in a single-tenant app).

    line 39

“Common” is measured: kept by at least 6 in 10 of the 173 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

Audit procedure

The audit target is whatever the user specified; if nothing was specified, default to the current diff (uncommitted changes, or the branch's changes against the default branch). If there is no diff either, ask what to audit rather than picking a scope yourself.

  1. Identify what the code under audit does. Trace the data flow: what inputs arrive, what is looked up, what is written, what is rendered or returned, what runs async. If the target is larger than a diff — a module, service, or whole repo — load references/methodology/scope.md first and follow its inventory, ranking, and budget procedure.
  2. Load only the checklist files matching that behavior, from the map below.
  3. Check each invariant in the loaded files against the code.
  4. Verify before reporting: load references/methodology/verify.md and run every candidate through it — name the attacker and the victim, hunt for existing mitigations in the surrounding code (middleware, base classes, decorators, callers), and when auditing a diff, anchor each finding to the lines that introduce or enable it. A candidate survives only if you cannot refute it with cited evidence.
  5. Report each finding with: severity (assigned per references/methodology/severity.md), file:line, the violated invariant, and a one-line fix direction. Say explicitly which checklists were applied and came back clean.
  6. Fix only on request: never change code during an audit. When the user asks for remediation, check the finding's checklist: if it ends with a ## Remediation section, load the playbook it names under references/remediation/ and choose among its patterns; otherwise apply the fixed shape from the checklist's ## Example section. Either way, make the smallest change that restores the invariant, match the surrounding code's conventions, and add a test demonstrating the fix.

Do not manufacture findings for topics that don't apply (e.g., CSRF on a token-authenticated API, tenant isolation in a single-tenant app).

What to load

Paths relative to this skill's directory. Load every row that matches; skip the rest.

The code…Read
Gates actions by role, permission, or ownershipreferences/access-data-security/authorization.md
Handles login, logout, reset, tokens, sessionsreferences/access-data-security/authn-session.md
Verifies JWTs, API keys, signed URLs, or webhook signaturesreferences/access-data-security/token-validation.md
Fetches/mutates a resource by an ID from the requestreferences/access-data-security/idor.md + references/access-data-security/authorization.md
Serializes models, formats errors, writes logsreferences/access-data-security/data-exposure.md
Hashes, encrypts, generates or compares secretsreferences/access-data-security/crypto-data-protection.md
Renders user data into HTML/JS/URLs/headers/emailsreferences/access-data-security/output-encoding.md
Touches data or caches in a multi-tenant appreferences/access-data-security/tenant-isolation.md
Changes state with cookie/session-based authreferences/access-data-security/csrf.md
Binds request payloads onto models/entitiesreferences/access-data-security/mass-assignment.md
Builds queries/commands/templates/paths from inputreferences/input-api-dependency/injection.md
Deserializes untrusted bytes (sessions, caches, queues, uploads)references/input-api-dependency/deserialization.md
Configures CORS, headers, cookies, debug, envreferences/input-api-dependency/config.md
Touches API keys, credentials, tokensreferences/input-api-dependency/secrets.md
Validates (or should validate) request inputreferences/input-api-dependency/api-contract-validation.md
Accepts, stores, processes, or serves filesreferences/input-api-dependency/file-handling.md
Makes network requests to user-influenced URLsreferences/input-api-dependency/ssrf.md
Adds validators, regexes, allowlists, or parsingreferences/input-api-dependency/parser-differentials.md
Adds or upgrades packages; edits manifests, lockfiles, Dockerfiles, or CI workflowsreferences/input-api-dependency/dependencies.md
Writes to multiple tables/stores/systems at oncereferences/correctness/atomicity.md
Handles payments, webhooks, retries, emailsreferences/correctness/idempotency.md
Runs jobs, scheduled tasks, or queue consumersreferences/correctness/background-work.md
Shares mutable state, caches, countersreferences/correctness/state-management.md
Reads or writes assuming a query matches exactly one rowreferences/correctness/cardinality.md
Computes money, totals, taxes, splits, or roundingreferences/correctness/numeric-precision.md
Stores or computes timestamps, durations, timeouts, expiryreferences/correctness/time-clock.md
Catches/throws errors, maps errors to HTTP statusesreferences/correctness/exception-handling.md
Creates promises, futures, tasks, or publishersreferences/correctness/discarded-async.md
Loads related data inside a loop over a collectionreferences/operability/nplus1.md
Adds endpoints/jobs, handles errorsreferences/operability/observability.md
Changes database schemareferences/operability/migration-safety.md + references/operability/schema-design.md
Does work proportional to input or data size (incl. IN lists, bulk statements)references/operability/resource-limits.md
Searches, joins, dedupes, or sorts collections in memoryreferences/operability/algorithmic-complexity.md
Runs async/await, event-loop, or coroutine codereferences/operability/blocking-io-async.md
Is meant to scale out / run as multiple replicasreferences/operability/statelessness.md
Caches values, responses, or computed resultsreferences/operability/caching.md
— Scoping a target larger than a diff (step 1)references/methodology/scope.md
— Verifying candidate findings (step 4, always)references/methodology/verify.md
— Rating finding severity (step 5, always)references/methodology/severity.md
— Fixing confirmed findingsreferences/remediation/authz-patterns.md, references/remediation/async-patterns.md, references/remediation/observability-patterns.md

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.