agentleFS
encoreshaoencoreshao/encore-skills/skills/review-code/SKILL.md

review-code

Skill2 starsChanged 5 months agoMITView on GitHub

Pre-MR self-review — first confirm the problem is actually solved, then check for security, correctness, and simplicity

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-deps, review-security 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.
  • cjohnhansonSkill

    review-deps

    Judge dependencies, advisories, and licences. Use as a required review, or as /review-deps. Not for how a dependency is called: review-code covers that.

    Also in 3 projects that use this

  • PydanticSkill

    review-security

    Security review of the current branch against its merge base — sandbox escapes, memory errors, panics and resource-limit bypasses. Use when reviewing changes for security risk, or before merging anything touching the heap/ module, path_security.rs, the wire protocol or the pool.

    Also in 5 projects that use this

  • dirkkok101Skill

    review-design

    Use before /plan, after /technical-design, when user says "review design", "check the design", or when design quality is uncertain.

    Also in 4 projects that use this

  • JetBrainsSkill

    review-plan

    Manually re-run the autonomous plan review (Phase 2 — consistency + structural). The same review runs automatically as the first phase of /execute-tracks; this command is for re-runs after inline replanning or whenever the plan needs explicit re-validation. TRIGGER when: user asks to re-validate the plan after inline replanning; user requests explicit plan review outside /execute-tracks. SKIP: /execute-tracks already running State 0 in this session (autonomous Phase 2 path will fire) — do not double-run.

    Also in 5 projects that use this

  • Microsoft AzureSkill

    review-pr

    Review a pull request for functional issues, coding guideline adherence, and best practices. Use this when asked to review, inspect, or provide feedback on a pull request (Azure DevOps or GitHub). Proposes comments for user approval before posting.

    Also in 4 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 6 projects that use this

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 34 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:

    If the answer is "probably" or "I think so" — that's not good enough.

    line 40
  2. Distinctive:

    Before checking anything else, ask: is there a simpler way to fix this?

    line 44
  3. Very specific:

    If verdict is "Needs changes" → back to fix-issue.

    line 102

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

Review Code

Self-review before opening an MR. A reviewer's time is expensive — don't waste it on things you could have caught yourself.

Input

# Local diff (self-review before opening MR)
git diff origin/main

# Review an existing MR via API (supports multiple GitLab servers)
GITLAB="$HOME/.claude/skills/gitlab-config/scripts/gitlab_api.py"
python $GITLAB get-mr <project> <mr_iid>      # MR metadata + comments
python $GITLAB get-diff <project> <mr_iid>    # unified diff of all changes

# Fallback with glab
glab mr view <number> --web

Review order

1. Does it actually solve the problem? (most important)

Go back to the issue. Read it again. Ask:

  • Does my change fix the root cause identified in the analysis?
  • Would the user who reported this issue confirm it's resolved?
  • Can I trace from the issue → root cause → my fix and see a clear line?

If the answer is "probably" or "I think so" — that's not good enough. Go verify.

2. Is it the simplest solution?

Before checking anything else, ask: is there a simpler way to fix this?

A 10-line change that's hard to follow is worse than a 30-line change that's obvious. But a 30-line change where 20 lines are unnecessary is worse than both. Cut what isn't needed.

3. Security

  • No secrets, tokens, or credentials in code or comments
  • User input is validated before use — not after, not maybe
  • SQL/queries use parameterized inputs
  • Auth checks exist on any new endpoints or actions
  • No eval, exec, or dynamic code execution with user input

4. Correctness

  • Edge cases covered: empty inputs, nulls, zero, large values
  • Error cases handled — what happens when things fail?
  • No silent failures (exceptions swallowed, errors ignored)
  • Concurrency safe if relevant

5. Code quality

  • Follows existing patterns — you're not the first person in this codebase
  • No dead code, debug logs, or commented-out blocks left in
  • Names describe intent, not implementation
  • No unnecessary abstraction for a one-time use case

6. Tests

  • New behavior has a test that would fail if you reverted the fix
  • The regression case from the issue is covered
  • Tests assert behavior, not internal implementation details

7. CI

  • Pipeline passes
  • No new lint warnings
  • Migrations are reversible (if any)

Output

## Self-review: <branch>

### Does it solve the problem?
<Yes/No + one sentence explanation>

### ✅ Looks good
- ...

### ⚠️ Suggestions (non-blocking)
- ...

### ❌ Must fix
- ...

### Verdict: Ready to merge / Needs changes

If verdict is "Needs changes" → back to fix-issue. Fix, don't rationalize.

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.