savinofiore/lexi/code-review
Claude Code and agent skill by savinofiore/lexi
- community
Checking that the SKILL.md file is still in the repository.
Hybrid Jev + Claude code review. review.py has TypeSafe's Jev judge the diff on closed questions (generic risk and code quality, plus the project's own conventions from .lexi/review.json) and computes the verdict in code (BLOCK, SECURITY REVIEW, CONVENTIONS, QUALITY, NITS, MERGE); Claude takes the handoff, locates fired rules, verifies uncertain checks, delegates triggers and, after a fix, reruns Jev to measure the deltas. lexi's bug and feature flows call it after the last GREEN. Use for "/jev:code-review", "review the diff", "can I merge?", "is this code ok?", "does it follow our conventions?", a PR number, a git ref or a .diff/.patch file.
Install
npx vskill@latest install savinofiore/lexi/code-reviewSKILL.md
The same SKILL.md was published earlier as savinofiore/lexi/code-review.
code-review — hybrid Jev + Claude protocol
Division of labour, fixed:
| Who | Does | Does not | |
|---|---|---|---|
| Jev | answers every closed question with calibrated probabilities, one call, ~1–2 s | write prose, know where, see the codebase | |
| `review.py` | applies policy.json: verdict, exit code, handoff | hold questions or thresholds | |
| Claude | locates (path:line), verifies uncertain checks, delegates, proposes the minimal fix, reruns Jev to measure | read the diff to decide the verdict, rewrite it, edit without confirmation |
REVIEW below is python3 "${CLAUDE_SKILL_DIR}/../../jev/review/review.py". Run it from the project root.
1. Run Jev (always --json, save the output)
$SCRATCH is your scratchpad directory, or mktemp -d.
| Skill argument | <source> | |
|---|---|---|
none, dirty tree (git status --porcelain not empty) | --working --title "..." --description "..." taken from the request or the task just finished; missing → ask in one line | |
| none, clean tree, not on the default branch | --git $(git merge-base HEAD <default>), <default> from git symbolic-ref --short refs/remotes/origin/HEAD (fallback main) | |
| none, clean tree, on the default branch | --git HEAD~1 | |
| git ref | --git <ref> | |
.diff/.patch file | --diff <file> | |
PR number (326) | gh pr diff 326 > "$SCRATCH/pr.diff" and gh pr view 326 --json title,body, then --diff "$SCRATCH/pr.diff" --title "<title>" --description "<body>" |
Exit 4 with TYPESAFE_API_KEY not set → explain where it goes (env in the gitignored .claude/settings.local.json, or the shell) and stop; never ask for the key in chat. Other exit 4 (bad .lexi/review.json, network) → quote the error and stop. Empty diff → say so and stop. omitted_files > 0 → say it first: the verdict is on a partial diff, with the rules on suspended_checks not applied.
2. Report the verdict without rewriting it
From the JSON, in this order, adding no judgement of yours:
verdict+fired_rules[].comparisonon one line (QUALITY — deep_nesting 0.92 >= 0.7, too_many_params 0.95 >= 0.7);- notable checks:
probabilities> 0.5, or < 0.5 forhigher_is_betterchecks (adds_tests,docs_only,
description_matches, outside_test_perimeter); scores with their level; choices.primary_concern with confidence;
ms,cost_usd.
3. Handoff
handoff is what Jev passes to you. Three kinds of ask:
ask | When | What Claude does | |
|---|---|---|---|
locate | a rule fired | opens only files, finds the line (path:line) answering question, proposes the minimal fix in one line. Does not apply | |
verify | a critical check in the uncertainty band | opens only files, answers question with one sentence and the line that proves it | |
delegate | escalate_to: "agent:<name>" | launches that agent (Agent tool, subagent_type = name) with files, question, probability; reports its outcome in two lines |
Rules:
- more than 3
locate→ oneExploreagent per check, in parallel, withquestion+files; collect thepath:lines; escalate_to: "skill:<name>"on alocateis the remedy to name in step 4, not to launch on your own;- empty
handoff→ "nothing handed off" in one line, stop; - the verdict stays the policy's: your lines are additions.
--escalateprints the same handoff as a prompt for another session.
Arguments: --fix → skip the confirmation in step 4 (the user already asked to apply). Depth levels (low…max) → ignored: Jev always answers everything at a fixed cost.
4. Confirm
For any verdict other than MERGE: one question (AskUserQuestion), options fix all / pick / none, listing the proposed fixes (check → path:line → fix). No edits without confirmation. For MERGE propose nothing.
5. Fix, then Jev measures
Apply only the confirmed fixes. A fix on a path under .lexi.json → testable goes through lexi's RED→GREEN like any other change: the guard holds it anyway. Then rerun the same source with --compare:
Report compare: verdict before → after and the per-check deltas. Read them like this:
- the fired check dropped below its threshold → the fix worked;
- it stayed high → the fix missed what Jev saw: reread the
question, never lower the threshold; - a new check rose → the fix introduced a problem: say so.
Two rounds at most. Then run the project's gate (.lexi.json → gate).
6. Disagreement → criteria, never thresholds
If you disagree with a number, say so after the verdict as a separate opinion. If the disagreement is systematic (same check, several diffs), propose a change to that check's criteria with the boundary case to add: in .lexi/review.json for a project check (or to override a core check for this project), in the plugin's review/checks.json for everyone. Never move a threshold in policy.json, never touch review.py.
Security
- Security scanPassed, 98 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/code-review/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/savinofiore/lexi/code-review)