一键导入
review
Run a structural pre-landing code review in OpenCode, write a durable local report, and optionally apply low-risk fixes when explicitly requested.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run a structural pre-landing code review in OpenCode, write a durable local report, and optionally apply low-risk fixes when explicitly requested.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Check local gstack setup health, detect stale build/setup state, and write a bounded upgrade-readiness report.
Interrogate an idea like a bounded YC-style office hours session and write a durable local memo.
Review recent local repository history and write a bounded engineering retrospective.
Prepare a local authenticated browser session for OpenCode QA and design workflows using gstack browse cookie import flows.
Audit a local rendered page with browser evidence, write a bounded design report, and optionally apply local UI fixes when explicitly requested.
Update a small, factual set of project docs from local changes and write a durable summary without committing or using GitHub APIs.
| name | review |
| description | Run a structural pre-landing code review in OpenCode, write a durable local report, and optionally apply low-risk fixes when explicitly requested. |
| compatibility | opencode |
| metadata | {"host":"opencode","migration_phase":"3","mode":"report-first"} |
This is the OpenCode-native /review slice for gstack. It reviews the current branch diff against a local base branch, looks for structural issues that tests often miss, and writes a report.
In this v1 slice:
review/checklist.md.gstack/review-reports/By default this workflow is report-first. If the request explicitly says to fix obvious issues, you must apply bounded local fixes for the highest-confidence low-risk findings and re-run the smallest relevant verification. Do not push, comment on PRs, or call external review services.
do not modify code or report only, stay report-onlyPrefer local-only refs in this order:
if git show-ref --verify --quiet refs/remotes/origin/main; then echo origin/main;
elif git show-ref --verify --quiet refs/remotes/origin/master; then echo origin/master;
elif git show-ref --verify --quiet refs/heads/main; then echo main;
elif git show-ref --verify --quiet refs/heads/master; then echo master;
else echo NO_BASE; fi
If the result is NO_BASE, report that review cannot continue because no usable base branch was found.
If the current branch is already the base branch, or git diff <base> --stat is empty, report that there is nothing to review and stop.
Read and use:
review/checklist.mdWrite outputs here:
.gstack/review-reports/review-{slug}.mdIf the user gives an explicit output file path, honor it.
Use review/checklist.md as the source of truth, but keep the first OpenCode slice focused on these categories:
You may include additional high-confidence findings, but do not pad the report with weak or speculative items.
git branch --show-currentgit diff <base> --stat.gstack/review-reports/ if neededreview/checklist.mdUse commands like:
git branch --show-current
git diff <base> --stat
git diff <base>
If the user requested a specific output file, use that exact path. Otherwise write .gstack/review-reports/review-{slug}.md.
Review the diff in two passes.
Look for direct structural risks in the changed lines.
When the diff introduces a new enum value, status string, tier, or sibling constant, read code outside the diff to verify every consumer handles it.
That means:
case, allowlist, filter, and display path handles the new valueThis category is not diff-only. It requires follow-through outside the hunk.
Only enter this path when the user explicitly asks for fixes.
Do not perform broad refactors, speculative rewrites, or external side effects.
Write a durable report to .gstack/review-reports/.
Use this structure:
Pre-Landing Review: N issues (X critical, Y informational)
- [CRITICAL] path/to/file.rb:12 - problem
Evidence: what you observed in the diff or follow-through read
Recommended fix: short concrete fix
Every finding must include:
file:lineIf fixes were applied, append a Fixes Applied section with the changed files and verification performed.
If there are no issues, write Pre-Landing Review: No issues found. and include the reviewed base branch plus diff summary.
If review cannot proceed because there is no base branch or no diff, still write a short report file with that outcome.