agentleFS
timdevaitimdevai/proteus/skills/pr-reviewer/SKILL.md

pr-reviewer

Skill1 starsChanged 5 months agoMITView on GitHub

Pre-reviews your PR before you push. Diffs against main, flags risks, checks test coverage delta, suggests reviewers. Trigger phrases: review my PR, pre-pr, before I push, am I ready to push, /pr-review. Auto-activate when user runs git push on a feature branch (PreToolUse hook, optional install). /pr-review — run on current branch. /pr-review push — run review, then push if score ≥75 with no red flags. Self-review catches 60% of "junior" mistakes before another human spends time on it. Pre-push…

  • Reads credentials
  • Commits and pushes

22 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 1

    Distinctive

    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:

    No new tests added but new production code present

    line 32

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

pr-reviewer

Pre-reviews your PR before you push. Diffs against main, flags risks, checks test coverage delta, suggests reviewers.

When to activate

Trigger phrases: review my PR, pre-pr, before I push, am I ready to push, /pr-review.

Auto-activate when user runs git push on a feature branch (PreToolUse hook, optional install).

Process

  1. Determine the base branch (main, master, or whatever GitHub default is)
  2. Compute the diff: git diff <base>...HEAD
  3. Run checks below
  4. Generate a review report with risk score
  5. Suggest fix-before-push items vs nice-to-have

Checks

Risk flags (each = -10 to safety score)

  • Force push detected
  • .env, *.key, *.pem in diff
  • Hardcoded secrets pattern (sk-, Bearer , AKIA, ghp_)
  • 500 line single-commit diff (suggest split)

  • Migration file added but no rollback script
  • New endpoint with no auth check
  • Direct DB call in route handler (bypasses repository pattern, if used)
  • New external dependency added (which one, why, alternatives)

Yellow flags (each = -3)

  • No new tests added but new production code present
  • TODO/FIXME added without ticket reference
  • Console.log / print() / debug statements in diff
  • Commented-out code blocks
  • File renamed without rg-checking for references

Green flags (each = +3)

  • Tests added that cover new code paths
  • ADR linked in PR body
  • Conventional commit messages used
  • Diff < 200 lines
  • README/docs updated alongside code

Output

PR Review: feat/rate-limit-middleware → main
=============================================

Diff stats: 6 files changed, 142 +, 18 -
Safety score: 78/100

✗ Risk (blocks push):
  none

⚠ Yellow flags:
  - 1 TODO added without ticket: middleware/rate_limit.py:45
  - console.log left in: middleware/rate_limit.py:67

✓ Green flags:
  - Tests added (test_rate_limit.py, 4 cases)
  - Diff is 142 lines — focused
  - Conventional commits used

Suggested reviewers: (based on git blame)
  - alice@company.com (touched middleware/ 12 times this quarter)
  - bob@company.com (owns auth module)

Suggested PR body:
  ## What
  Adds IP-based rate limiting to /login.
  ## Why
  Prevents brute-force after 5 failed attempts in 60s.
  ## Test
  pytest tests/test_rate_limit.py
  ## Risk
  Low — fail-open if redis unreachable.

Fix before push:
  1. Remove console.log on line 67
  2. Either delete TODO or link to a ticket

Ready to push? (y / fix-then-push)

Inputs

  • Current branch + base branch
  • Diff
  • git blame for "suggested reviewers" feature

Outputs

  • Review report
  • Suggested PR body
  • Fix list
  • Reviewer suggestions

Slash command

/pr-review — run on current branch. /pr-review push — run review, then push if score ≥75 with no red flags.

Why this skill

Self-review catches 60% of "junior" mistakes before another human spends time on it. Pre-push is the cheapest place to fix anything.

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.