Back to skills
SKILL.md
Agy Review
ASecurityRead-only code review & fix loop inside Claude Code using headless Antigravity CLI (`agy --mode plan`) as reviewer while Claude Code fixes. Use for Antigravity review, `agy review`, or auto-review and fix changes with `agy`; not inside Antigravity IDE.
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Works with
Security analysis
100/100npx -y skills add hothiennhan021/ai-review-skills --skill agy-review --agent claude-codeAre you the author of Agy Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hothiennhan021-agy-review)---
name: agy-review
description: >-
Read-only code review & fix loop inside Claude Code using headless Antigravity
CLI (`agy --mode plan`) as reviewer while Claude Code fixes. Use for
Antigravity review, `agy review`, or auto-review and fix changes with `agy`;
not inside Antigravity IDE.
---
# Antigravity (`agy`) Lean Review Loop v3 (`agy-review`)
Use `agy` strictly as a **schema-constrained, read-only external reviewer** (`--mode plan --disable-slash-commands`). **Claude Code** owns all edits and local checks (never pass `--mode auto`, `--mode accept-edits`, or `--dangerously-skip-permissions`).
## 1. Mandatory Headless `agy` Rules (`MAX_ROUNDS = 3`)
1. **Flags & Non-Empty `stdin` Guard**: Go's `flag` parser stops at `-p`; omit `-p` when piping `stdin`, and **assert non-whitespace input** first so `agy` never enters interactive TUI.
2. **Strict Schema + `.structured_output`**: Pass `--output-format json --json-schema <file>` (`"additionalProperties": false` + full `"required"`), assert `.status == "SUCCESS"`, and read **`.structured_output`**.
3. **Static-Prefix & Severity Stop**: Order `[Static Rules] -> [EOF Ledger] -> [Diff Slice]`. Fix valid `[P0]`/`[P1]` (plus safe `[P2]` in touched files) in one batch, verify locally, and **STOP immediately** once `0` valid `[P0]`/`[P1]` remain (`--effort low` on final check).
## 2. Workflow
- **Step 0**: Auto-detect uncommitted, `--base <branch>`, `<SHA>`, or `<default>...HEAD` (stop if diff is empty); exclude `.ai-workflow/` in `.git/info/exclude`.
- **Step 1A (Windows PS 5.1 via `ai-flow.ps1`)**:
```powershell
$af = if (Test-Path -LiteralPath "$env:USERPROFILE\.gemini\config\ai-flow.ps1") { "$env:USERPROFILE\.gemini\config\ai-flow.ps1" } else { "D:\ai-review-skills\scripts\ai-flow.ps1" }
& $af -Action slice-diff -Round $r
& $af -Action pack -Header "Read-only review of DIFF_SLICE.md (never edit files). Respect FIXED/REJECTED ledger items." -TailFile .ai-workflow/DIFF_SLICE.md -OutFile .ai-workflow/AGY_IN.md
& $af -Action ask-agy -Effort medium -InFile .ai-workflow/AGY_IN.md -OutFile .ai-workflow/AGY_FINDINGS.json
```
- **Step 1B (Standalone Bash / Cross-Platform)**:
```bash
AGY_BIN=$(command -v agy || echo "$LOCALAPPDATA/agy/bin/agy.exe")
mkdir -p .ai-workflow
printf '%s' '{"type":"object","properties":{"ok":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"s":{"type":"string","enum":["P0","P1","P2"]},"f":{"type":"string"},"w":{"type":"string"},"x":{"type":"string"}},"required":["id","s","f","w","x"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}' > .ai-workflow/strict-schema.json
grep -q '[^[:space:]]' .ai-workflow/AGY_IN.md || { echo "Empty AGY_IN.md"; exit 1; }
"$AGY_BIN" --mode plan --disable-slash-commands --effort medium --output-format json --json-schema .ai-workflow/strict-schema.json < .ai-workflow/AGY_IN.md > .ai-workflow/agy-raw.json 2> .ai-workflow/agy.err
# Verify .status == "SUCCESS" and read .structured_output.{ok, items}
```
- **Step 2 (Triage & Fix)**: Inspect surrounding code; stop if `ok == true` or `0` valid `[P0]`/`[P1]` remain; else batch-fix, verify build/tests/lint pass, and repeat while `r < 3`.
**Report**: (1) Stop status & rounds, (2) Fixes applied, (3) Rejections, (4) Passing checks.
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.