github-code-review

Review local git diffs and GitHub pull requests with inline comments via gh or REST API.

1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/specdog/collar --skill github-code-review-specdog
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-code-review
Source: https://github.com/specdog/collar/tree/main/skills/github/github-code-review
Command: npx skills add https://github.com/specdog/collar --skill github-code-review-specdog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Reviewing code changes before pushing or evaluating open pull requests requires juggling diffs, context, and GitHub APIs manually. This Skill provides a structured workflow for inspecting changes, applying a consistent review checklist, and posting inline comments or formal reviews to GitHub. ## Core Features & Use Cases - Local Pre-Push Review: Analyze staged or branch diffs with plain git, scanning for debug statements, secrets, conflict markers, and oversized files. - Pull Request Review: Fetch PR metadata and diffs via gh CLI or curl/REST, check out PR branches locally, and run tests or linters against the changes. - Structured Feedback: Submit formal reviews (approve, request changes, comment) with severity-tagged inline comments and a summary comment using a consistent template. - Use Case: A teammate opens PR #123 touching authentication code. You check out the branch, run the test suite, spot a SQL injection risk, and submit a request-changes review with an inline comment on the exact line. ## Quick Start Review pull request 123 in this repository and post your findings as inline comments and a summary.

Frequently Asked Questions about github-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a GitHub pull request from the command line?▼

Fetch the PR branch with git fetch origin pull/123/head:pr-123 and check it out, then inspect the diff with git diff main...HEAD. Use gh pr view and gh pr diff for metadata, or the GitHub REST API with curl if gh is unavailable.

How to add inline comments to a GitHub PR via API?▼

Post to the pulls/{pr}/comments endpoint with the file path, line number, commit SHA, and side. Alternatively submit a formal review to pulls/{pr}/reviews with an event of APPROVE, REQUEST_CHANGES, or COMMENT plus a comments array.

gh CLI vs curl for GitHub code review tasks?▼

gh provides shortcuts like gh pr checkout and gh pr review for common operations. curl with the REST API offers equivalent functionality and finer control, such as atomic multi-comment reviews, and works when gh is not installed.

Can I review code without GitHub authentication?▼

Yes, local pre-push reviews use plain git commands like git diff main...HEAD and require no API access. Authentication via gh auth or a GITHUB_TOKEN is only needed for PR-level interactions like fetching PR details or posting comments.

What should a code review checklist cover?▼

Check correctness including edge cases and error paths, security issues like hardcoded secrets and injection risks, code quality and naming, test coverage, performance concerns like N+1 queries, and documentation of public APIs.