agentleFS
juancruzmunozalbelojuancruzmunozalbelo/swarmclaw/.claude/skills/pr-review/SKILL.md

pr-review

Skill1 starsChanged 9 months agoMITView on GitHub

Review a GitHub PR using GitHub Copilot CLI locally. No external API needed - uses your Copilot subscription.

  • Installs packages

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use clack-cli-patterns, drag-to-reorder 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.
  • openchamberSkill

    clack-cli-patterns

    Use when creating or modifying OpenChamber CLI commands, prompts, terminal output, non-TTY behavior, `--quiet`, or `--json` behavior.

    Also in 3 projects that use this

  • openchamberSkill

    drag-to-reorder

    Use when implementing or modifying OpenChamber sortable or drag-to-reorder behavior, especially `@dnd-kit`, touch/mobile interactions, variable-width items, or wrapping layouts.

    Also in 3 projects that use this

  • jtenniswoodSkill

    expert-reset

    Reimagine this repository from first principles using the current product and user experience as the target. Use when the user says "/expert-reset", asks how the project should be rebuilt if starting again, wants bold architecture or component-structure recommendations, or wants a research-only reset plan unconstrained by current implementation details.

    Also in 3 projects that use this

  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • +7 more from openchamber

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 180 edited versions we read keep these.

  • 4

    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:

    Make sure you have Copilot enabled:

    line 20
  2. Distinctive:

    If you prefer, you can use the VS Code extension:

    line 108
  3. Distinctive:

    Use Copilot Chat: "@copilot review this PR"

    line 111
  4. Distinctive:

    No additional API costs

    line 117

“Common” is measured: kept by at least 6 in 10 of the 180 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 Review with GitHub Copilot CLI

This skill reviews a GitHub Pull Request using GitHub Copilot CLI directly on your Mac. No external API needed.

Prerequisites

1. Install GitHub CLI

brew install gh

2. Enable Copilot

Make sure you have Copilot enabled:

gh copilot --version

3. Authenticate

gh auth login

Usage

Review a PR

# Review PR by number
/review-pr 123

# Review current branch PR
/review-pr

How It Works

The script:

  1. Gets the PR diff using gh pr diff
  2. Sends it to gh copilot for review
  3. Posts the review as a comment on the PR

Implementation

Create ~/.claude/scripts/review-pr.sh:

#!/bin/bash
set -e

PR_NUMBER="${1:-}"

if [ -z "$PR_NUMBER" ]; then
  PR_NUMBER=$(gh pr view --json number -q '.number' 2>/dev/null || echo "")
fi

if [ -z "$PR_NUMBER" ]; then
  echo "Error: No PR number provided"
  exit 1
fi

echo "Getting PR #$PR_NUMBER info..."

# Get PR details
PR_TITLE=$(gh pr view $PR_NUMBER --json title -q '.title')
PR_URL=$(gh pr view $PR_NUMBER --json url -q '.url')

echo "Getting PR diff..."

# Get diff (limit to 50k chars for Copilot)
PR_DIFF=$(gh pr diff $PR_NUMBER --patch | head -c 50000)

echo "Asking Copilot to review..."

# Use gh copilot to review
REVIEW=$(gh copilot suggest -t "You are a senior software engineer reviewing a pull request. Review the following diff and provide feedback about bugs, security issues, code quality, and suggestions. Be concise but specific. Use markdown format." -- \
  "Please review this PR diff:

**PR #$PR_NUMBER**: $PR_TITLE
**URL**: $PR_URL

\`\`\`diff
$PR_DIFF
\`\`\`

Provide a thorough code review." 2>&1)

# Post as PR comment
echo "$REVIEW" | gh pr comment $PR_NUMBER --body-file -

echo "Review posted to PR #$PR_NUMBER"

Make executable:

chmod +x ~/.claude/scripts/review-pr.sh

Alternative: Using GitHub Copilot in VS Code

If you prefer, you can use the VS Code extension:

  1. Open the PR in VS Code (with GitHub Pull Requests extension)
  2. Use Copilot Chat: "@copilot review this PR"
  3. Copy the review and post as comment

Notes

  • Uses your existing Copilot subscription (Pro/Business/Pro+)
  • No additional API costs
  • Runs locally on your Mac
  • May take a moment to process large PRs

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.