github-code-review

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

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill github-code-review-jamsdoescode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-code-review
Source: https://github.com/jamsdoescode/Erik-s-Portfolio/tree/main/openclicky/AppResources/OpenClicky/OpenClickyBundledSkills/github-code-review
Command: npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill github-code-review-jamsdoescode

SYSTEM DOCUMENTATION & REQUIREMENTS

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 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 changes. - Pull Request Review: Fetch PR details, check out PR branches locally, run tests and linters, then submit approvals, change requests, or multi-comment reviews via gh CLI or curl. - Structured Feedback: Present findings in a Critical / Warnings / Suggestions / Looks Good format and post summary comments to the PR. - Use Case: A teammate opens PR #123 touching authentication code. You ask the assistant to review it; it checks out the branch, runs the test suite, flags a SQL injection risk inline, and submits a formal Request Changes review. ## Quick Start Review pull request 123 in this repository and post your findings as inline comments and a summary review on GitHub.

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 a token if gh is unavailable.

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

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

gh CLI vs curl for GitHub pull request reviews?

The gh CLI offers shorter commands like gh pr review and handles authentication automatically. Curl with a GITHUB_TOKEN works without gh installed and gives direct control over the REST API payloads, such as multi-comment atomic reviews.

Can I review code changes before pushing without GitHub access?

Yes, local review uses only plain git commands like git diff main...HEAD and git log, with no API or authentication needed. You can scan for debug statements, secrets, and conflict markers entirely offline.

Why does posting an inline PR comment fail with a line number error?

The line field must reference a line in the new version of the file that appears in the diff. For deleted lines, set side to LEFT, and ensure the commit_id matches the PR's current head SHA.