open-code-review-delegate
Was er macht
Dieses Tool hilft dir, Programmcode zu überprüfen. Es erkennt, welche Teile des Codes geprüft werden müssen und welche Regeln gelten. Die detaillierte Analyse überlässt es der Intelligenz des Haupt-Agenten. Es ist nützlich, wenn der Haupt-Agent die Überprüfung übernehmen soll.
Wann du ihn nutzt
- ✓Wenn du möchtest, dass der KI-Haupt-Agent den Code analysiert.
- ✓Um Änderungen in bestimmtem Code oder einer Gruppe von Dateien zu prüfen.
- ✓Wenn du verschiedene Code-Versionen zur Überprüfung vergleichst.
Link zum Skill
https://github.com/alibaba/open-code-review/blob/main/plugins/open-code-review/skills/open-code-review-delegate/SKILL.mdKopiere 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
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Überprüfe den Code für mich, mit Fokus auf Sicherheit und Performance.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Zuerst ermittelt das Tool die Dateien, die überprüft werden sollen, sowie die passenden Regeln. Dann holt es die Unterschiede (was sich geändert hat) zwischen den Code-Versionen. Schließlich nutzt der Haupt-Agent diese Informationen für die Überprüfung.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Open Code Review — Delegation Mode
This Codex plugin skill intentionally mirrors the canonical skill at
skills/open-code-review-delegate/SKILL.md. Keep both files synchronized when
updating OCR delegation instructions; a symlink is avoided because plugin
installs may only materialize the plugin subtree.
A skill for performing AI code review where OCR provides deterministic engineering (file filtering, rule resolution) and the host agent performs the actual review using its own intelligence and tools.
Workflow
Step 1: Preview — Determine What to Review
ocr delegate preview --format json [--from <ref> --to <ref>] [--commit <hash>] [--exclude <patterns>]
This outputs:
- mode (workspace / range / commit)
- from / to / commit / merge_base — ref metadata for constructing git commands
- Reviewable file list — paths, status, insertions/deletions
- Excluded files — with exclusion reason
Common invocations:
| Scenario | Command |
|---|---|
| Workspace changes | ocr delegate preview |
| Branch comparison | ocr delegate preview --from main --to feature |
| Single commit | ocr delegate preview -c abc123 |
Step 2: Get Rules for Files
ocr delegate rule --format json <path1> <path2> ...
Pass the reviewable file paths from Step 1. Output is grouped by rule content — files sharing the same rule appear under one group, avoiding repetition.
Step 3: Get Diffs
Choose the diff command using the mode and refs from Step 1. Use git --no-pager for every Git call during the review.
The diff commands disable external diff programs, text conversion, and color to produce plain patches.
Range mode (merge_base provided in preview output):
git --no-pager diff --no-ext-diff --no-textconv --no-color <merge_base>..<to> -- "<path>"
Commit mode:
git --no-pager show --no-ext-diff --no-textconv --no-color <commit> -- "<path>"
Workspace mode:
# Tracked files
git --no-pager diff --no-ext-diff --no-textconv --no-color HEAD -- "<path>"
# New untracked files — read directly (entire file is new code)
cat "<path>"
To read context:
git --no-pager log --no-color --oneline -- "<path>"
git --no-pager blame --no-textconv -- "<path>"
git --no-pager show --no-ext-diff --no-textconv --no-color "<ref>:<path>"
For large diffs, add --output="<absolute-diff-file>" to the command for the selected mode. Choose a unique absolute path outside the repository and create its parent directory. Use the same path in file-reading tool calls:
git --no-pager diff --no-ext-diff --no-textconv --no-color --output="<absolute-diff-file>" <merge_base>..<to> -- "<path>"
After Git exits with code 0, read and review the entire file in chunks, then remove it. If Git fails or times out, retry or record skipped with the error. Check unexpectedly empty output against a fresh preview.
Step 4: Review Each File
Create a checklist containing every reviewable_files entry. For each reviewable file:
Use (path, status) as the checklist identity. Workspace mode can report the same path twice when a staged deletion is followed by an untracked recreation.
- Get its diff (Step 3)
- Consult its Rule Group (from Step 2) for the review checklist
- Conduct a thorough review, using appropriate context tools as needed
- Mark the file
reviewed, orskippedwith a concrete reason
For large changes, review in bounded batches grouped by shared rules and diff size. Do not stop after finding the first high-severity issue.
Step 5: Format Output
Each comment must follow this structure:
| Field | Type | Required | Description |
|---|---|---|---|
| path | string | yes | Relative file path |
| content | string | yes | Review comment describing the issue |
| start_line | integer | no | Start line in the new file |
| end_line | integer | no | End line in the new file |
| category | enum | no | bug, security, performance, maintainability, test, style, documentation, other |
| severity | enum | no | critical, high, medium, low |
Step 6: Classify and Report
Before reporting, verify that every previewed file is accounted for. Include total_files, reviewed_files, skipped_files, and coverage_rate in the summary. A skipped file must include its reason.
Group findings by severity:
- Critical/High: Bugs, security issues, data loss risks — always report
…
Häufige Fragen
Was bedeutet 'Delegation'?
Es bedeutet, dass das Tool die eigentliche Analyse an den Haupt-Agenten weitergibt. Es sorgt nur dafür, dass die nötigen Informationen für diese Analyse geordnet und vorbereitet werden.
Brauche ich Programmierkenntnisse, um das zu nutzen?
Nein, das Tool ist für eine einfache Nutzung gemacht. Du musst nur angeben, was überprüft werden soll.
Was sind 'Regeln'?
Das sind Richtlinien oder Standards, an die sich der Code halten sollte, zum Beispiel bewährte Methoden für Sicherheit oder Programmierstil.
Details
Originalbeschreibung des Autors
Delegation mode for open-code-review (OCR). Instead of OCR calling an LLM endpoint, this skill instructs the host agent to perform the code review itself, using OCR only for deterministic engineering: file selection and rule resolution. Use when the host agent should drive the review with its own LLM capabilities.
repo: alibaba/open-code-review
Beliebtheit
- GitHub-Sterne
- 47k
- Platz im Ranking
- #6315
- Lizenz
- Apache-2.0
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
Ähnliche Skills
test-driven-development
311kBringt deinem Agenten bei, vor jedem Feature oder Fix zuerst einen fehlschlagenden Test zu schreiben, ihn fehlschlagen zu sehen und dann den kleinsten passenden Code zu schreiben.
verification-before-completion
311kBringt deinem Agenten bei, echte Prüfungen auszuführen und ihre Ausgabe zu lesen, bevor er behauptet, eine Aufgabe, ein Fix oder ein Build sei fertig oder bestehe.
migrate-to-shoehorn
310kErsetzt riskante Typumwandlungen in deinen Testdateien durch die Bibliothek shoehorn, damit Tests mit unvollständigen Daten arbeiten und trotzdem die Typprüfung bestehen.