# gstack Pre-Landing PR Review (review)

> Reviews a PR's diff against the base branch for structural issues tests miss, auto-fixing mechanical findings and asking before others.

- Category: [Code Review](https://www.myskills.tools/en/categories/code-review/)
- Source: Community · Garry Tan
- Repository: https://github.com/garrytan/gstack/tree/main/review (commit ed10791 · v1.0.0)
- SKILL.md: https://github.com/garrytan/gstack/blob/main/review/SKILL.md
- Install command: `npx skills add garrytan/gstack --skill review`
- License: MIT
- Compatible with: Claude Code, Codex, Cursor, Copilot
- Permissions: read-repo ✓, write-files ✓, shell ✓, network ✓
- Status: Scan passed
- A rule scan cannot catch every risk. Read this skill's SKILL.md and check its permissions before installing.
- ⚠ Applies some fixes without asking, may reply to Greptile comments on the PR, and logs telemetry through gstack scripts.

## Core rule

Fix-first, not read-only: AUTO-FIX items are applied directly, ASK items only after approval, and it never commits, pushes or creates PRs.

## Execution Phases

1. **Find base and scope** — Detect the git host and base branch, confirm a diff exists, and check scope drift against TODOS.md, commits and the PR description.
2. **Read checklist and diff** — Read the review checklist and any Greptile comments, get the full diff, and run the diff scans.
3. **Critical pass** — Run the CRITICAL then INFORMATIONAL passes, sweep other call sites for the same pattern, and add specialist, exploratory QA and adversarial reviews.
4. **Fix-first** — Classify findings as AUTO-FIX or ASK, apply the former directly, batch-ask about the latter, and apply approved fixes.
5. **Re-review and record** — Re-review after edits (at most 3 cycles), persist the review result, reply to Greptile comments, and report.

## Permissions (summarised from SKILL.md)

| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Edits code directly for AUTO-FIX items and after approval for ASK items; never commits or pushes. |
| Command execution | Required | Runs git, gh/glab, gstack helper scripts and exploratory QA probes. |
| Network outbound | Required | May use WebSearch to research fixes, read PR data via gh, and reply to Greptile comments. |

## SKILL.md frontmatter (YAML)

```yaml
---
name: review
preamble-tier: 4
version: 1.0.0
description: Review this PR's diff. (gstack)
allowed-tools:
  - Bash
  - Read
  - Edit
  - Write
  - Grep
  - Glob
  - Agent
  - AskUserQuestion
  - WebSearch
triggers:
  - review this pr
  - code review
  - check my diff
  - pre-landing review
---
```

Home: https://www.myskills.tools/en/ · URL: https://www.myskills.tools/en/skills/review/
