github-code-review

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

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill github-code-review-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-code-review
Source: https://github.com/Chia1104/agent-air/tree/main/skills/hermes/github/github-code-review
Command: npx skills add https://github.com/Chia1104/agent-air --skill github-code-review-chia1104

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 git diffs, GitHub API calls, and structured feedback formatting, which is repetitive and error-prone when done manually. ## Core Features & Use Cases - Pre-Push Local Review: Analyze staged or branch diffs with plain git, scanning for debug statements, secrets, conflict markers, and oversized files before pushing. - End-to-End PR Review: Fetch PR metadata, check out the PR branch locally, run tests and linters, then submit a formal review (approve, request changes, or comment) with inline comments. - Dual Tooling Support: Every PR-level operation works with either the gh CLI or plain git plus curl against the GitHub REST API, with automatic token fallback from environment or git credentials. - Use Case: A teammate asks you to review PR #123. The skill checks out the branch, reads the diff with full file context, runs the test suite, applies a correctness/security/testing checklist, and posts an atomic review with severity-tagged inline comments plus a summary comment. ## Quick Start Review PR #123 in this repository and post inline comments with a summary of any critical 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/N/head:pr-N and check it out, then inspect the diff against the base branch. Submit feedback using gh pr review or a POST to the GitHub reviews API endpoint with inline comments.

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. For multiple comments, submit them atomically through the /reviews endpoint with an event of APPROVE, REQUEST_CHANGES, or COMMENT.

Can I review code without the gh CLI installed?▼

Yes, all PR operations work with plain git plus curl against the GitHub REST API using a GITHUB_TOKEN. The token can come from the environment, a .env file, or git credentials, and local diff reviews need no API access at all.

What should I check in a code review before pushing?▼

Run git diff main...HEAD to see the full change set, then scan for leftover debug statements, hardcoded secrets, merge conflict markers, and accidentally staged large files. 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.