code-review-staged

Review staged git changes and generate a six-section code review with a commit message.

1|Updated Mar 12, 2019
One-click install
npx skills add https://github.com/jie-meng/toolscripts --skill code-review-staged
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-review-staged
Source: https://github.com/jie-meng/toolscripts/tree/main/ai/skills/code-review-staged
Command: npx skills add https://github.com/jie-meng/toolscripts --skill code-review-staged

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a focused, context-aware code review for changes that have been added to the git staging area, eliminating ambiguity about which edits will be committed and producing a concise, standards-compliant commit message ready for the clipboard.

Core Features & Use Cases

  • Six-section structured review: tech stack inference, change overview, code quality evaluation, risk analysis, incremental suggestions, and an auto-generated single-line commit message.
  • Staged-only scope: analyzes only git staged changes (git diff --cached) and explicitly ignores unstaged edits.
  • Context-aware reads: optionally reads 1–3 related files (headers, definitions, tests) to validate changes without scanning the whole repo.
  • Clipboard support: copies the generated commit message to the clipboard using pbcopy on macOS or pyperclip as a fallback.
  • Language-sensitive output: automatically emits the review in Chinese if the user input contains Chinese characters, otherwise in English; commit message always in English.

Quick Start

Use the skill to review the repository's staged changes and produce a structured review plus one concise English commit message copied to the clipboard.

Frequently Asked Questions about code-review-staged

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review staged git changes before committing?

You can review staged git changes by analyzing git diff --cached output, which captures only staged files while ignoring unstaged edits, and optionally reading 1-3 related files for context to validate the modifications.

Can I automatically generate a commit message from staged diff?

Yes, generating a commit message from staged diff produces a concise single-line English message based on the analyzed changes and copies it to the clipboard using pbcopy on macOS or pyperclip as a fallback.

Does the code review include risk analysis and code quality evaluation?

Code review includes risk analysis and code quality evaluation as part of a structured six-section report covering tech stack inference, change overview, code quality, risk analysis, incremental suggestions, and an auto-generated commit message.

How to perform a context-aware code review without scanning the whole repository?

Perform context-aware code review by targeting only staged changes and reading 1-3 related files like headers, definitions, or tests to validate modifications, avoiding a full repository scan while maintaining accurate analysis.

What is ignored when reviewing staged changes in git?

Unstaged changes are ignored when reviewing staged changes in git, ensuring the review scope strictly matches what will be committed by applying only to files added to the git staging area via git diff --cached.

Do I need pbcopy or pyperclip to copy the generated commit message?

You do not strictly need pbcopy or pyperclip, but clipboard support uses pbcopy on macOS or pyperclip as a fallback to automatically copy the generated single-line English commit message when available.