Zum Inhalt springen
Skillpedia
Tests260k · #622

requesting-code-review

Was er macht

Dieser Skill lässt deinen Agenten Code-Änderungen prüfen, bevor sie committet oder hochgeladen werden. Er ist für Entwickler gedacht, die einen zweiten Blick und automatische Prüfungen wollen, bevor ihre Arbeit in ein Projekt geht.

Wann du ihn nutzt

  • ✓Wenn du in einem git-Repository Code-Änderungen committen, hochladen oder ausliefern willst.
  • ✓Wenn du ein Feature oder einen Bugfix abgeschlossen hast, der mehrere Dateien betrifft, und ihn prüfen lassen willst.
  • ✓Wenn du willst, dass dein Agent deine Änderungen auf fest eingebettete Geheimnisse und Qualitätsprobleme prüft.

Link zum Skill

https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/requesting-code-review/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/requesting-code-review/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Prüfe vor meinem Commit meine bereitgestellten Änderungen auf Sicherheitsprobleme und Qualitätsmängel und behebe alles Einfache.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Skill liest den bereitgestellten Diff, durchsucht die hinzugefügten Zeilen nach riskanten Mustern wie fest eingebetteten Geheimnissen, führt Qualitätsprüfungen aus und lässt einen frischen Prüf-Agenten die Arbeit kontrollieren. Danach kann er die gefundenen Probleme beheben.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Pre-Commit Code Verification

Automated verification pipeline before code lands. Static scans, baseline-aware quality gates, an independent reviewer subagent, and an auto-fix loop.

Core principle: No agent should verify its own work. Fresh context finds what you miss.

When to Use

  • After implementing a feature or bug fix, before git commit or git push
  • When user says "commit", "push", "ship", "done", "verify", or "review before merge"
  • After completing a task with 2+ file edits in a git repo
  • After each task in subagent-driven-development (the two-stage review)

Skip for: documentation-only changes, pure config tweaks, or when user says "skip verification".

This skill vs github: This skill verifies YOUR changes before committing. github reviews OTHER people's PRs on GitHub with inline comments.

Step 1 — Get the diff

git diff --cached

If empty, try git diff then git diff HEAD~1 HEAD.

If git diff --cached is empty but git diff shows changes, tell the user to git add <files> first. If still empty, run git status — nothing to verify.

If the diff exceeds 15,000 characters, split by file:

git diff --name-only
git diff HEAD -- specific_file.py

Step 2 — Static security scan

Scan added lines only. Any match is a security concern fed into Step 5.

# Hardcoded secrets
git diff --cached | grep "^+" | grep -iE "(api_key|secret|password|token|passwd)\s*=\s*['\"][^'\"]{6,}['\"]"

# Shell injection
git diff --cached | grep "^+" | grep -E "os\.system\(|subprocess.*shell=True"

# Dangerous eval/exec
git diff --cached | grep "^+" | grep -E "\beval\(|\bexec\("

# Unsafe deserialization
git diff --cached | grep "^+" | grep -E "pickle\.loads?\("

# SQL injection (string formatting in queries)
git diff --cached | grep "^+" | grep -E "execute\(f\"|\.format\(.*SELECT|\.format\(.*INSERT"

Step 3 — Baseline tests and linting

Detect the project language and run the appropriate tools. Capture the failure count BEFORE your changes as baseline_failures (stash changes, run, pop). Only NEW failures introduced by your changes block the commit.

Test frameworks (auto-detect by project files):

# Python (pytest)
python -m pytest --tb=no -q 2>&1 | tail -5

# Node (npm test)
npm test -- --passWithNoTests 2>&1 | tail -5

# Rust
cargo test 2>&1 | tail -5

# Go
go test ./... 2>&1 | tail -5

Linting and type checking (run only if installed):

# Python
which ruff && ruff check . 2>&1 | tail -10
which mypy && mypy . --ignore-missing-imports 2>&1 | tail -10

# Node
which npx && npx eslint . 2>&1 | tail -10
which npx && npx tsc --noEmit 2>&1 | tail -10

# Rust
cargo clippy -- -D warnings 2>&1 | tail -10

# Go
which go && go vet ./... 2>&1 | tail -10

Baseline comparison: If baseline was clean and your changes introduce failures, that's a regression. If baseline already had failures, only count NEW ones.

Step 4 — Self-review checklist

Quick scan before dispatching the reviewer:

  • No hardcoded secrets, API keys, or credentials
  • Input validation on user-provided data
  • SQL queries use parameterized statements
  • File operations validate paths (no traversal)
  • External calls have error handling (try/catch)
  • No debug print/console.log left behind
  • No commented-out code
  • New code has tests (if test suite exists)

Step 5 — Independent reviewer subagent

Interactive sessions only. In a one-shot run (hermes chat -q, --oneshot, a benchmark harness) there is no one to hand the verdict to and a fresh subagent re-pays the whole system prompt plus a repo re-read: skip Steps 5 and 7, apply the Step 4 checklist to the diff yourself, run the tests, and go to Step 8.

Call delegate_task directly — it is NOT available inside execute_code or scripts.

The reviewer gets ONLY the diff and static scan results. No shared context with the implementer. Fail-closed: unparseable response = fail.

delegate_task(
    goal="""You are an independent code reviewer. You have no context about how
these changes were made. Review the git diff and return ONLY valid JSON.

FAIL-CLOSED RULES:
- security_concerns non-empty -> passed must be false
- logic_errors non-empty -> passed must be false
- Cannot parse diff -> passed must be false
- Only set passed=true when BOTH lists are empty

SECURITY (auto-FAIL): hardcoded secrets, backdoors, data exfiltration,
shell injection, SQL injection, path traversal, eval(
Häufige Fragen

Wann kann ich ihn überspringen?

Der Skill sagt, man kann ihn bei reinen Dokumentationsänderungen oder kleinen Konfigurationsanpassungen überspringen oder wenn du es verlangst.

Warum einen separaten Prüfer?

Der Skill sagt, kein Agent sollte seine eigene Arbeit prüfen. Ein frischer Kontext findet Probleme, die der Autor übersehen kann.

Prüft er Pull Requests anderer Personen?

Nein. Der Skill sagt, der Skill github übernimmt die Prüfung fremder Pull Requests.

Details

Originalbeschreibung des Autors

Pre-commit review: security scan, quality gates, auto-fix.

repo: NousResearch/hermes-agent

Beliebtheit

GitHub-Sterne
260k
Platz im Ranking
#622
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills