Peer

From bendrucker/claude · View interactive version

Peer is an AI agent skill from the GitHub repository bendrucker/claude. Review a pull request when requested by a peer. Use when reviewing PRs, providing code review feedback, or analyzing proposed changes. Supports GitHub and GitLab. Pass --triage to summarize a PR and estimate its review effort without reviewing it.

How to use this skill

Skill file

Peer Review

Help me review this PR: $ARGUMENTS

The review is done when I have approved a mapped set of comments (or an approval with none) and it is posted as one batch.

Context

Your own login as the reviewer (see tone.md for how to address each party). The platform that doesn't apply reads unavailable.

Triage Mode

With --triage, stay read-only and judge scope from the PR body, diff stat, and files touched. Report two things and stop:

Guardrails

Workflow

  1. Research: gather context and identify participants (see research.md).
  2. Context: private repos use corporate defaults, public repos use open-source. Check with gh api repos/OWNER/REPO --jq .visibility or glab api projects/ENCODED_PATH | jq .visibility. Ask me if ambiguous.
  3. Review the changed files and existing comments.
  4. Delegate: run code-review, except on trivial PRs (docs-only, dep bumps). It reads the local diff, so gh pr checkout first. Before invoking, summarize the diff (rough line count, files, sensitive areas) and PR-body signals, propose an effort level, and confirm it via AskUserQuestion.
  5. Think on two separate axes, so a clean diff does not mask a missed requirement: requirement fulfillment (requirements.md) and code quality (priorities.md, smells.md), folding in code-review findings.
  6. Map: write proposed comments to a JSON file (id, path, start_line, end_line, side, comment_type, content), then map them to platform positions. Skip when approving with no comments.

```bash

bun ${CLAUDE_SKILL_DIR}/scripts/mapping.ts map --platform <github|gitlab> \

--comments <path> --diff <path> --commit <head-sha>

```

GitLab also needs --base and --start from the MR diff_refs. The output is { payloads, dropped }. A dropped comment anchors outside a diff hunk (GitHub rejects it with 422 "Line could not be resolved"), so show it to me and re-anchor it.

  1. Post: show me the mapped set, then on my go post one batch with Approve, Comment, or Request Changes by severity. GitHub uses a pending review, GitLab draft notes published together.

See tone.md for comment style.

Effort Scale

Service Support

For GitLab, load gitlab:merge-request for submission and publish draft notes with glab mr note draft publish <iid> --yes, which takes an optional -m summary and --reviewer-state requested_changes.

Post comments through mcp__github, gh, or glab. On follow-up, resolve addressed threads natively: review-threads.ts on GitHub, the resolve flow in gitlab:merge-request on GitLab.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.