Install
openclaw skills install gstack-reviewPre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust boundary violations, conditional side effects, and other structural is...
openclaw skills install gstack-reviewWhen asking the user a question, format as a structured text block for the message tool:
RECOMMENDATION: Choose [X] because [one-line reason]. Include Completeness: X/10.A) ... B) ... C) ...AI-assisted coding makes marginal cost of completeness near-zero:
gh pr view --json baseRefName -q .baseRefNamegh repo view --json defaultBranchRef -q .defaultBranchRef.namemain.Analyze the current branch's diff against the base branch for structural issues that tests don't catch.
git branch --show-current — if on base branch, output "Nothing to review — you're on the base branch" and stop.git fetch origin <base> --quiet && git diff origin/<base> --stat — if no diff, stop.gh pr view --json body --jq .body 2>/dev/null || true. Read commit messages: git log origin/<base>..HEAD --oneline.git diff origin/<base> --stat and compare files changed against stated intent.Evaluate:
Output before main review:
Scope Check: [CLEAN / DRIFT DETECTED / REQUIREMENTS MISSING]
Intent: <1-line summary of what was requested>
Delivered: <1-line summary of what diff actually does>
[If drift: list each out-of-scope change]
[If missing: list each unaddressed requirement]
Read .claude/skills/review/checklist.md. If cannot be read, STOP and report error.
git fetch origin <base> --quiet
git diff origin/<base>
Apply checklist in two passes:
Enum & Value Completeness requires reading code OUTSIDE the diff. When the diff introduces a new enum value, grep all files referencing sibling values, then check if new value is handled.
Check if diff touches frontend files using native shell:
SCOPE_FRONTEND=false
git fetch origin "<base>" --quiet 2>/dev/null
for ext in ts tsx js jsx vue svelte css scss less sass styl pcss postcss png jpg jpeg gif svg webp ico woff woff2 ttf eot; do
if git diff origin/"<base>" --name-only 2>/dev/null | grep -qiE "\.${ext}$"; then
SCOPE_FRONTEND=true
break
fi
done
If SCOPE_FRONTEND=false: Skip silently.
If SCOPE_FRONTEND=true:
DESIGN.md or design-system.md if exists..claude/skills/review/design-checklist.md. If not found, skip with note.Output: Pre-Landing Review: N issues (X critical, Y informational)
AUTO-FIX or ASK per Fix-First Heuristic in checklist.md.
Apply each fix directly. Output one-line summary per fix:
[AUTO-FIXED] [file:line] Problem → what you did
If ASK items remain, present in ONE question:
If 3 or fewer ASK items, individual questions allowed.
Output what was fixed. If no ASK items, skip question entirely.
Read TODOS.md. Cross-reference PR against open TODOs:
For each .md file in repo root:
Check if Codex CLI is available:
which codex 2>/dev/null && echo "CODEX_AVAILABLE" || echo "CODEX_NOT_AVAILABLE"
If CODEX_NOT_AVAILABLE: skip silently.
If available, send via message tool:
Codex is an independent code review tool from OpenAI. Want an adversarial challenge of this plan?
Options: A) Yes — let Codex critique the plan B) No — proceed without Codex
If user chooses A, use the browser tool to open the plan file and describe the approach. Codex can be invoked via codex exec if installed locally.