github-code-review

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

Updated May 4, 2026
One-click install
npx skills add https://github.com/Junkfooooood/hermes-governance --skill github-code-review-junkfooooood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-code-review
Source: https://github.com/Junkfooooood/hermes-governance/tree/main/skills/github/github-code-review
Command: npx skills add https://github.com/Junkfooooood/hermes-governance --skill github-code-review-junkfooooood

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 tedious and error-prone when done manually. ## Core Features & Use Cases - Local Pre-Push Review: Analyze staged or branch diffs with plain git, scanning for debug statements, secrets, merge conflict markers, and oversized files. - Full PR Review Workflow: Fetch PR metadata, check out the PR branch locally, run tests and linters, then submit formal reviews (approve, request changes, or comment) with inline comments via gh CLI or curl REST calls. - Structured Feedback Output: Present findings in a consistent Critical / Warnings / Suggestions / Looks Good format, both as PR summary comments and inline review annotations. - Use Case: A teammate asks you to review PR #123. The skill checks out the branch, runs the test suite, applies a six-category review checklist, and posts an atomic review with severity-tagged inline comments plus a summary comment. ## Quick Start Review pull request 123 in this repository and post inline comments for any issues you find.

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 run git diff main...HEAD to inspect changes. Submit feedback with gh pr review 123 --approve or --request-changes, or post inline comments via the GitHub REST API.

How to add inline comments on a GitHub PR using the API?

POST to /repos/{owner}/{repo}/pulls/{number}/comments with the body, file path, commit_id of the PR head SHA, line number, and side. You can also batch multiple comments into one atomic review 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 pre-push reviews need only git diff commands, with no API access required at all.

What should I check when reviewing code before pushing?

Run git diff main...HEAD and scan for leftover debug statements, TODOs, 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?

Approve when there are no critical or warning-level issues, only minor suggestions. Request changes when any critical issue (security vulnerabilities, data loss risk) or warning (bugs, missing error handling) exists. Use comment-only reviews for draft PRs or uncertain findings.