# Local Review

> Local code review loop that iterates through review, fix, commit cycles without pushing

- Skill: `omninode-ai/local-review` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add omninode-ai/local-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/omninode-ai/local-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: OmniNode-ai (https://skillmd.com/u/omninode-ai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/omninode-ai/local-review

---


# Local Review

**Announce at start:** "I'm using the local-review skill."

## Usage

```
/local-review
/local-review --uncommitted
/local-review --since HEAD~3
/local-review --max-iterations 5 --required-clean-runs 2
/local-review --no-fix
/local-review --dry-run
```

## Execution

### Step 1 — Parse arguments

- `--uncommitted` → review only unstaged/staged changes
- `--since` → base ref for diff (default: auto-detected from branch)
- `--max-iterations` → cap on review-fix cycles (default: 10)
- `--required-clean-runs` → consecutive clean passes needed (default: 2)
- `--no-fix` → report issues only, no code changes
- `--no-commit` → fix but don't commit (leave staged)
- `--dry-run` → log decisions only; do not write edits or commits

### Step 2 — Initialize FSM

```bash
onex run-node node_local_review \
  --input '{"uncommitted": false, "since": null, "max_iterations": 3, "required_clean_runs": 2, "no_fix": false, "no_commit": false, "dry_run": false}' \
  --timeout 300
```

On non-zero exit, a `SkillRoutingError` JSON envelope is returned — surface it directly, do not produce prose.

Outputs `ModelLocalReviewState` JSON with initial phase.

### Step 3 — Execute review loop

Repeat until N consecutive clean passes or max iterations reached:

1. **REVIEW**: Inspect changed files (ruff, mypy, tests, CLAUDE.md conventions, aislop patterns)
2. **FIX**: Apply fixes for each finding (unless `--no-fix`)
3. **COMMIT**: Stage and commit fixes with `fix(review): <description>` (unless `--no-commit`)
4. **CHECK_CLEAN**: Re-run review on committed changes; count consecutive clean passes

→ DONE when `consecutive_clean >= required_clean_runs`
→ FAILED if circuit breaker (3 consecutive phase failures) trips

### Step 4 — Report

Write `ModelSkillResult` to `$ONEX_STATE_DIR/skill-results/{context_id}/local-review.json`.
Display: iterations run, issues found/fixed, final clean status, any remaining nits.

## Architecture

```
SKILL.md   -> thin shell (this file)
node       -> omnimarket/src/omnimarket/nodes/node_local_review/ (FSM logic)
contract   -> node_local_review/contract.yaml
```

