github-code-review

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing code changes before pushing or evaluating open pull requests requires manually reading diffs, checking for common issues, and posting structured feedback on GitHub, which is repetitive and easy to do inconsistently. ## Core Features & Use Cases - Local Pre-Push Review: Inspects staged or branch diffs with plain git, scanning for debug statements, secrets, merge conflict markers, and oversized files before anything is pushed. - Full PR Review Workflow: Fetches PR metadata, checks out the PR branch locally, runs tests and linters, then applies a structured checklist covering correctness, security, quality, testing, performance, and documentation. - GitHub Feedback Posting: Submits formal reviews (approve, request changes, comment) with inline line-level comments and a summary comment using either the gh CLI or curl with the GitHub REST API. - Use Case: A teammate asks you to review PR #123. The skill checks out the branch, reads the diff, runs the test suite, finds a SQL injection and a plaintext password issue, then posts a REQUEST_CHANGES review with inline comments and a structured summary. ## Quick Start Review pull request 123 in this repository and post inline comments with your findings 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, 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 post inline review comments on a GitHub PR?

Get the head commit SHA from the PR, then POST to /repos/{owner}/{repo}/pulls/{number}/comments with the file path, line number, and body. With gh, use gh api or gh pr review to submit comments as part of a formal review.

gh CLI vs GitHub REST API for pull request reviews?

The gh CLI is shorter for common actions like gh pr review --approve, while curl with the REST API works without gh installed and supports atomic multi-comment reviews in one request. Both require a valid GitHub token.

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 diff --staged, plus grep checks for debug statements, secrets, and conflict markers. No API token or network access is needed for pre-push review.

What should a code review checklist cover?

A thorough checklist covers correctness and edge cases, security issues like injection and hardcoded secrets, code quality and duplication, test coverage, performance problems like N+1 queries, and documentation of public APIs.

When should I request changes instead of approving a PR?

Request changes when the review finds any critical or warning-level issue such as security vulnerabilities or missing input validation. Approve when only minor suggestions remain, and use comment-only reviews for drafts or uncertain cases.