agentleFS
me-workspaceme-workspace/orchestrator-operational-agent-skills/code-review-hardening/SKILL.md

code-review-hardening

Skill1 starsChanged 45 days agoMITView on GitHub

Use this skill whenever asked to review code - a diff, PR, branch, file, or "cek kode ini" - for bugs, security issues, or quality. Triggers include "review", "audit kode", "ada bug?", "aman gak?", "sebelum merge", or any request to assess code before deploy. Covers correctness, security (OWASP-style), performance, and maintainability. Do NOT use for writing new features or for infra/server audits (use secure-deploy-ops for deploy checks).

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check in this order (most common real-world first):

    line 19
  2. Distinctive:

    AuthN/AuthZ: every new endpoint - who can call it?

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 Review & Hardening

Review in two passes, verify before reporting, rank by severity. Never pad the report with style nits when real defects exist.

Pass 1 - Correctness

For each changed function/path, ask:

  1. Inputs: what happens on empty, null, zero, negative, huge, unicode, duplicate input?
  2. State: race conditions, re-entrancy, idempotency (retries, double-submit, webhook replays)?
  3. Errors: are failures swallowed? Does a partial failure leave inconsistent state (DB written, external call failed)?
  4. Boundaries: off-by-one, timezone/locale, float money math, pagination edges.
  5. Contracts: does the change break callers? Grep for all call sites before claiming safe.

Pass 2 - Security

Check in this order (most common real-world first):

  1. Injection: SQL (string-built queries), command (exec/spawn with user input), path traversal (../), template injection.
  2. AuthN/AuthZ: every new endpoint - who can call it? IDOR (object id from user without ownership check). Admin-only actions gated server-side, not just in UI.
  3. Secrets: keys/tokens hardcoded, logged, or committed. .env in repo.
  4. Payment/webhook: signature verification, amount taken from server not client, replay protection.
  5. Data exposure: verbose errors to client, PII in logs, mass-assignment.
  6. Dependencies: new packages - typosquatting, unmaintained, install scripts.

Verify before reporting

A finding is only reportable if you can state a concrete failure scenario: input/state → wrong output/exploit. Trace the actual code path; if you cannot construct the scenario, mark it "perlu konfirmasi" or drop it. False positives destroy trust in the review.

Report format

## Temuan (urut severity)
1. [CRITICAL|HIGH|MEDIUM|LOW] file:line - satu kalimat defect.
   Skenario gagal: <input/state konkret → akibat>.
   Saran fix: <minimal, spesifik>.
  • CRITICAL: exploitable remotely / data loss / money movement.
  • HIGH: wrong results or exploit needing some preconditions.
  • MEDIUM: robustness gap likely hit eventually.
  • LOW: maintainability/perf polish.

End with a one-line verdict: layak merge / merge dengan syarat / jangan merge. If zero findings survive verification, say so plainly - do not invent findings.

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.