github-code-review

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

Updated May 13, 2026
One-click install
npx skills add https://github.com/superfhp/lumi-agent-body --skill github-code-review-superfhp
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-code-review
Source: https://github.com/superfhp/lumi-agent-body/tree/main/skills/github/github-code-review
Command: npx skills add https://github.com/superfhp/lumi-agent-body --skill github-code-review-superfhp

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 diffs, 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 files. - PR Review via gh or REST: Fetch PR details, check out PR branches locally, run tests, and submit formal reviews (approve, request changes, comment) with inline comments. - Structured Feedback Format: Present findings in a Critical / Warnings / Suggestions / Looks Good severity structure, with a reusable output template. - Use Case: A teammate opens PR #123 touching authentication code. Check out the branch, run the test suite, apply the security checklist, and post an atomic review with inline comments flagging a SQL injection and a plaintext password issue. ## 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 review or the GitHub REST API to submit inline comments and a formal review verdict.

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

Post to /repos/{owner}/{repo}/pulls/{number}/comments with the body, file path, head commit SHA, line number, and side. Alternatively submit multiple comments atomically via the /reviews endpoint with an event of APPROVE, REQUEST_CHANGES, or COMMENT.

Can I review code without the gh CLI installed?▼

Yes, all PR interactions work with plain git plus curl against the GitHub REST API using a GITHUB_TOKEN. Local diff review needs only git, and the token can be read from ~/.git-credentials or an environment file.

What should I check when reviewing code before pushing?▼

Run git diff main...HEAD and scan for leftover debug statements, hardcoded secrets, merge conflict markers, and accidentally staged large files. Then apply a checklist covering correctness, security, code quality, testing, performance, and documentation.

When should I request changes versus approve a pull request?▼

Request changes when any critical or warning-level issue exists, such as security vulnerabilities or missing error handling. Approve when only minor suggestions remain, and use a plain comment review for draft PRs or uncertain findings.