code-review

Automates pre-commit code review with diff-based security scanning, baseline-aware tests, and iterative fix loops.

1.4k|129|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/shiwenwen/hope-agent --skill code-review-shiwenwen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-review
Source: https://github.com/shiwenwen/hope-agent/tree/main/skills/code-review
Command: npx skills add https://github.com/shiwenwen/hope-agent --skill code-review-shiwenwen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents risky or low-quality code from being committed by running a pre-commit verification pipeline that combines security scanning, baseline-aware checks, and an independent reviewer loop.

Core Features & Use Cases

  • Static security scan on the diff: Flags likely hardcoded secrets and common injection patterns from added lines before anything is committed.

  • Baseline-aware quality gates: Compares test and lint outcomes against the state before your changes to avoid failing on pre-existing issues.

  • Independent reviewer subagent + auto-fix loop: Sends only the diff and scan results to a fresh reviewer for fail-closed verdicts, then optionally runs up to two targeted fix-and-reverify cycles.

  • Use Case: After changing multiple files in a git repo (for example, implementing a feature that touches both backend logic and tests), run this to catch security regressions and ensure new failures are addressed before pushing or opening a PR.

Quick Start

Run the code-review verification after making changes and before committing by telling the AI to verify your staged diff for a safe, baseline-aware quality gate.

Frequently Asked Questions about code-review

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

FAQPage Schema
How do I run a pre-commit security scan on my staged git diff?

A pre-commit security scan flags hardcoded secrets and injection patterns from added lines in your staged diff. It treats any reviewer detection of security issues as blocking, applying fail-closed behavior before you commit or push.

How do I prevent pre-existing test failures from blocking my new code changes?

Baseline-aware quality gates compare test and lint outcomes against the state before your changes. This prevents failing on pre-existing issues and ensures only new failures introduced by your diff are flagged as blocking.

Does the pre-commit review process support auto-fixing detected code issues?

The review process optionally performs a bounded auto-fix cycle. After an independent reviewer subagent detects issues, it runs up to two targeted fix-and-reverify cycles to automatically resolve flagged problems before committing.

Can I use this code review verification across different programming languages?

The verification applies after code changes in git repositories across common languages like Rust, Python, JavaScript/TypeScript, Go, Java, and more. It runs diff-based static scanning and baseline-aware tests regardless of the language.

What is the best way to verify code safety before opening a pull request?

The best way to verify code safety before opening a PR is running a pre-commit verification pipeline. It combines diff-based static scanning, baseline-aware tests, and an independent reviewer confirmation loop to catch security regressions.