github-code-review

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

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill github-code-review-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-code-review
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/github/github-code-review
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill github-code-review-chenhui-x

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, which is slow and error-prone. 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. - Full PR Review Workflow: Fetch PR metadata, check out the PR branch locally, run tests and linters, then submit an atomic review with inline comments via gh CLI or the GitHub REST API. - Structured Feedback Format: Present findings as Critical, Warnings, Suggestions, and Looks Good sections, with a reusable output template for PR summary comments. - Use Case: A teammate asks you to review PR #123. The Skill checks out the branch, runs the test suite, flags a SQL injection in src/auth.py, and posts a REQUEST_CHANGES review with inline comments and a summary comment. ## Quick Start Ask the agent to review PR number 123 on the current repository and post inline comments for any issues found.

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 an approve, request-changes, or comment review with inline comments.

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 comment body. Alternatively, submit multiple comments atomically through the pulls/{number}/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 a .env file or git credentials.

How do I check my changes for secrets before pushing to GitHub?

Run git diff main...HEAD piped through grep with patterns like password, secret, api_key, or token to catch credentials. Also scan for debug statements, TODO markers, and merge conflict markers before committing.

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.