Install
openclaw skills install @klesenchang/gstack-review-skillGarry Tan's gstack-inspired multi-perspective code review for OpenClaw. Triggered when user asks to review code, run /review, review a PR/branch/changes, or wants a thorough code review with business, engineering, and QA perspectives. Analyzes git diffs, runs tests, checks code quality, and provides actionable feedback from three viewpoints: CEO (product value), Engineering (architecture), QA (correctness).
openclaw skills install @klesenchang/gstack-review-skillWhen asked to review code, follow this three-perspective framework. Run all steps systematically.
Priority order for review scope:
git diff HEAD) — if working directory is dirty# Check working tree status
git status --short
# Get uncommitted changes
git diff HEAD
# Get committed changes on current branch vs origin/main
BRANCH=$(git branch --show-current 2>/dev/null || git rev-parse --abbrev-ref HEAD 2>/dev/null)
MAIN_BRANCH=$(git main-branch 2>/dev/null || echo "main")
git log ${MAIN_BRANCH}..${BRANCH} --oneline 2>/dev/null | head -20
git diff ${MAIN_BRANCH}..${BRANCH} 2>/dev/null | head -500
# List changed files
git diff --name-only ${MAIN_BRANCH}..${BRANCH} 2>/dev/null
Before reviewing, collect:
# Project type and language
ls *.json *.toml *.yaml *.gradle *.xml Makefile package.json 2>/dev/null | head -5
cat package.json 2>/dev/null | grep '"name"\|"scripts"' | head -5
# Run tests (silently, capture exit code)
TEST_OUTPUT=$(npm test 2>&1 || pytest 2>&1 || cargo test 2>&1 || true)
TEST_EXIT=$?
# Type check / lint
LINT_OUTPUT=$(npm run lint 2>&1 || npx tsc --noEmit 2>&1 || true)
# Build check
BUILD_OUTPUT=$(npm run build 2>&1 || cargo build 2>&1 || true)
BUILD_EXIT=$?
For each changed file, read the full content to understand context. Don't just look at the diff — read the surrounding code.
For each file in the diff:
1. Read the full file (not just changed lines — context matters)
2. Identify what the code actually does vs. what the diff claims
3. Note any files that are only binary/generated (skip detailed review)
Ask: Does this code serve the business and users?
Review from a product-thinking perspective:
Key question: "If I had to explain this change to the CEO in 30 seconds, would they be excited or confused?"
Ask: Is this code sound, maintainable, and safe?
Code quality signals:
temp2_final_v3 patterns.Ask: Would this pass a senior engineer's gut check for correctness?
Present a structured review with three clearly labeled sections.
# Code Review: [BRANCH_NAME] — [DATE]
═══════════════════════════════════════════════
## Summary
[One paragraph: what changed and why. If this were a commit message, is it a good one?]
**Files changed:** N files | **Lines:** +N -N
**Tests:** [PASS/FAIL/NONE] | **Build:** [PASS/FAIL/NONE] | **Lint:** [PASS/FAIL/NONE]
---
## 🏛️ CEO / Product Review
[Bulleted findings. Flag concerns in 🔴, praise good decisions in ✅]
**Verdict:** [Clear statement — ship it, rework it, or discuss with the team]
---
## ⚙️ Engineering Review
[Bulleted findings. Group by category: Architecture, Security, Performance, Code Quality]
**Verdict:** [Clear statement]
---
## 🧪 QA / Testing Review
[Bulleted findings. Group by: Coverage, Edge Cases, Correctness]
**Verdict:** [Clear statement]
---
## Action Items
- [ ] [Priority] [Specific actionable item — who should fix it and how]
- [ ] [Priority] ...
**Overall:** ✅ APPROVED TO SHIP / ⚠️ REVISIONS NEEDED / ❌ BLOCKED
═══════════════════════════════════════════════
new Map() with new WeakMap() on line 42 to avoid memory leaks in the closure."Escalate to human review for:
Inspired by Garry Tan's gstack (github.com/garrytan/gstack) — ported for OpenClaw.