agentleFS
0xUrsanomics0xUrsanomics/utopia-os/skills/code-review/SKILL.md

code-review

Skill2 starsChanged 23 days agoMITView on GitHub

Staff engineer code review for scripts, tools, and infrastructure changes

  • Pipes a download into a shell
  • Reads credentials

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use close-spec, design-with-images 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.
  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 5 projects that use this

  • dzhngSkill

    design-with-images

    Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.

    Also in 5 projects that use this

  • PydanticSkill

    add-new-model

    Add support for a newly-released language or image generation model in pydantic-ai (e.g. openai:gpt-5.6, anthropic:claude-sonnet-5, openai:gpt-image-2). Use when a provider ships a new model id and you need to wire literals, profile flags, adapters, and tests to recognize it. Handles SDK-lag, gateway list conventions, capability probing, and direct image-model geometry.

    Also in 9 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 5 projects that use this

  • Microsoft AzureSkill

    azsdk-common-apiview-feedback-resolution

    Analyze and resolve APIView review feedback on Azure SDK PRs. **UTILITY SKILL**. USE FOR: APIView comments, API review feedback, SDK API surface changes. DO NOT USE FOR: general code review, non-APIView feedback. INVOKES: azure-sdk-mcp:azsdk_apiview_get_comments, azure-sdk-mcp:azsdk_customized_code_update, azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback, azure-sdk-mcp:azsdk_run_typespec_validation, azure-sdk-mcp:azsdk_package_generate_code.

    Also in 6 projects that use this

  • Microsoft AzureSkill

    azsdk-common-generate-sdk-locally

    Generate and finalize Azure SDKs locally from TypeSpec, including build, checks, tests, changelog, metadata, and version updates by default. WHEN: "generate SDK locally", "build SDK", "run SDK tests", "run CI checks", "validate package", "run checks", "update changelog", "fix SDK build errors", "resolve SDK generation errors", "customize TypeSpec", "rename SDK client", "rename SDK model", "hide operation from SDK", "fix analyzer errors", "resolve customization drift", "create subclient", "update metadata", "update version". INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version.

    Also in 6 projects that use this

  • +4 more from dzhng
  • +2 more from Azure

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 184 edited versions we read keep these.

  • 11

    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
  1. Distinctive:

    Ship a verdict: every review ends with one of: APPROVE / APPROVE-with-fixes / REJECT / NEEDS-REWORK.

    line 16
  2. Distinctive:

    Test before declaring shipped: if the code wasn't smoke-tested, that's a finding, not a footnote.

    line 19
  3. Distinctive:

    If the user pastes external code (not from current session), treat it as a black-box review.

    line 25
  4. Very specific:

    After writing anything in scripts/

    line 38
  5. Distinctive:

    Before touching a production daemon

    line 39
  6. Very specific:

    No hardcoded credentials, API keys, or tokens.

    line 52
  7. Distinctive:

    No command injection in shell/subprocess calls (shell=False, shlex.quote, arg arrays)

    line 54
  8. Distinctive:

    No repo dependencies <7 days old (hard rule, no exceptions)

    line 57
  9. Distinctive:

    No style nitpicks unless readability suffers

    line 99
  10. Distinctive:

    No feature suggestions. review what exists, not what could

    line 100
  11. Distinctive:

    No blocking on minor issues.

    line 101
  12. Very specific:

    No reviewing vendored code (node_modules, venv, .venv, generated)

    line 102
  13. Distinctive:

    No restating what the code does.

    line 107
  14. Distinctive:

    Every finding must name a line, function, or file.

    line 108

“Common” is measured: kept by at least 6 in 10 of the 184 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 Review. Staff Engineer Audit

Staff-level review. Scripts, tools, MCP servers, infra. No hand-holding, no nitpicks. find real problems, ship real verdicts.

Rules & Constraints (detailed task rules)

  1. No hand-holding. assume the reader can write code. Don't explain what a try-except is.
  2. No nitpicks. style preferences, formatter output, unused-imports are not real problems. Skip them.
  3. Real problems only. bugs, security holes, race conditions, broken contracts, false-success paths, complexity that costs more than it saves.
  4. Ship a verdict. every review ends with one of: APPROVE / APPROVE-with-fixes / REJECT / NEEDS-REWORK. No "looks pretty good" hedging.
  5. Cite line numbers. path/file.py:42 format, not "near the top".
  6. Karpathy 4-rule check (from Karpathy's coding guidelines): Think Before Coding / Simplicity First / Surgical Changes / Goal-Driven Execution. Flag violations.
  7. Test before declaring shipped. if the code wasn't smoke-tested, that's a finding, not a footnote.

Conversation context (prior)

Prior conversation: the user just wrote or modified code in the current session. Read the diff (git diff or just the affected file) + the prior turn's stated goal. Don't ask "what should I review?". the conversation has already named the scope.

If the user pastes external code (not from current session), treat it as a black-box review. flag missing context as a finding, don't fabricate intent.

Thinking step-by-step (procedure)

For each piece of code:

  1. Goal check: does the code accomplish the stated goal? If not, that's a REJECT regardless of code quality.
  2. Correctness scan: input validation, off-by-one, race conditions, error-path handling, false-success paths (Edit-tool-style bugs where success-return doesn't prove success).
  3. Security scan (if applicable): credentials in plaintext, command injection, SQL injection, path traversal, unsafe deserialization, missing auth checks.
  4. Complexity check: count abstractions. If abstraction-cost > complexity-saved, flag it. Three similar lines beats a premature abstraction.
  5. Test coverage: was this run end-to-end? Are there fixture tests? Smoke-test evidence?
  6. Issue surfacing in priority order: BLOCKERS first (correctness/security), WARNINGS next (complexity/test gaps), then verdict.

When to Use

  • After writing anything in scripts/
  • Before touching a production daemon
  • New or modified MCP server
  • New tool/automation before first run
  • Explicit: /code-review {file or dir}

Review Checklist

1. Correctness

  • Matches its stated purpose. no drift between docstring and behavior
  • Edge cases: empty input, missing files, network timeouts, malformed JSON, unicode
  • Error paths exercised. does the failure branch actually run, or is it dead code?

2. Security (non-negotiable. per CLAUDE.md security-first rule)

  • No hardcoded credentials, API keys, or tokens. .env only, gitignored.
  • Input validation at system boundaries
  • No command injection in shell/subprocess calls (shell=False, shlex.quote, arg arrays)
  • File operations safe (no path traversal, no writes outside project root)
  • Deps pinned, no CVEs, no packages <1K weekly downloads or >12mo stale
  • No repo dependencies <7 days old (hard rule, no exceptions)
  • No curl | bash, no auto-OAuth send scopes, no SMTP

3. Reliability

  • Idempotent where possible (safe to re-run)
  • Timeouts on all external calls (HTTP, subprocess)
  • Graceful degradation on failure (don't crash the whole system)
  • Logging on error paths

4. Simplicity

  • Flag every line that could be deleted with no behavior change
  • Dead code, unused imports, commented-out blocks. delete, don't leave
  • Over-engineered: a one-shot script doesn't need a class hierarchy
  • Comments only where the WHY is non-obvious. no narration of WHAT

5. Integration

  • Uses existing conventions: memory/, outputs/raw/, .env, refs/ symlinks
  • Fails closed. a broken harvester doesn't poison downstream briefings
  • Reuses existing libs (lib_active_session.sh, vector_brain.py) before rolling new
  • Logs to logs/session.jsonl or logs/errors.jsonl per auto-logging rule

Output Format

Per file reviewed:

📄 {filepath}
  ✅ correctness. {one-liner}
  ⚠️ security. {issue if any}
  ✅ reliability. {one-liner}
  💡 simplicity. {suggestion if any}
  ✅ integration. {one-liner}

  VERDICT: SHIP / FIX FIRST / RETHINK
  {action items if any}

Severity Levels

  • SHIP: good to go, no blocking issues
  • FIX FIRST: has issues that must be fixed before use. List them.
  • RETHINK: fundamentally wrong approach. Explain why and suggest alternative.

What NOT To Do

  • No style nitpicks unless readability suffers
  • No feature suggestions. review what exists, not what could
  • No blocking on minor issues. note and SHIP
  • No reviewing vendored code (node_modules, venv, .venv, generated)

Anti-Slop (hard)

  • No "overall the code looks good" / "great job" / "minor suggestions" openers
  • No "consider" / "perhaps" / "it might be worth". say it or don't
  • No restating what the code does. Reviewer isn't a narrator.
  • Every finding must name a line, function, or file. No vague "some error handling missing."
  • Verdict is one word: SHIP, FIX FIRST, or RETHINK. No qualifiers.

Example Verdict (good)

📄 scripts/your_harvester.py
  ✅ correctness. empty feed handled L42
  ⚠️ security. subprocess.run(cmd, shell=True) L88, inject risk, use args list
  ✅ reliability. 30s timeout on fetch L31
  💡 simplicity. L120-140 dup of lib_active_session.sh logic, import instead
  ✅ integration. writes to outputs/raw/, matches pipeline

  VERDICT: FIX FIRST
  1. Kill shell=True on L88
  2. Dedup L120-140 against lib_active_session.sh

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.