skills/forge-reflect/SKILL.md
Review current changes with a lean review flow. Works on a PR, branch diff, or uncommitted changes. Tiny low-risk diffs stay inline; larger or riskier changes use fresh-context review. Use when the user wants to self-review before committing, pushing, or requesting peer review.
npx skillsauth add mgratzer/forge forge-reflectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Self-review current changes before committing, pushing, or requesting peer review.
No primary argument required — automatically detects what to review. Optional: -- <additional context> for review focus guidance.
Detect the review scope by checking, in order:
1. PR for current branch:
gh pr view --json number,title,url 2>/dev/null
If a PR exists, note its number and URL for the report.
2. Branch diff vs default branch:
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
CURRENT_BRANCH=$(git branch --show-current)
If on a branch different from default with commits ahead, use $DEFAULT_BRANCH...HEAD.
3. Uncommitted changes (staged + unstaged):
git diff --name-only # unstaged
git diff --name-only --cached # staged
If there are uncommitted changes, review those.
Use the first scope that has changes. If nothing to review, tell the user.
Collect the full diff and changed file list for the detected scope:
# PR or branch diff
git fetch origin
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
git diff origin/$DEFAULT_BRANCH...HEAD
git diff --name-only origin/$DEFAULT_BRANCH...HEAD
# Uncommitted changes (staged + unstaged combined)
git diff HEAD
git diff --name-only HEAD
Follow the review-delegation process: collect materials, prefer one inline review pass for tiny low-risk diffs, otherwise run one fresh-context review pass by default, add a second pass only when risk justifies it, and aggregate findings.
Expected output: Deduplicated findings grouped by file with severity tags (P0/P1/P2).
Run the project's lint, format, type check, and test commands. Fix issues and commit fixes.
Aggregate findings from all review passes (Step 2) with quality gate results (Step 3) into the summary format below. Deduplicate any findings flagged by multiple passes — keep the highest severity.
Present each deferred improvement to the user and ask whether to fix now or defer as a follow-up issue.
Bias hard toward fix now. Recommend deferral only when the finding is truly out of scope, materially expands the PR, or needs separate design/review.
For each item, recommend one of:
State your recommendation and let the user decide. Then:
## Reflection Summary
**Scope:** <PR #N | branch <name> vs <default> | uncommitted changes>
### Findings
#### <file>
- [P0/P1/P2] <finding>
### Deferred Items
- Fixed: <what was addressed>
- Created #<num>: <title>
- (or: None identified)
### Quality Gates
- Lint: ✓/✗
- Format: ✓/✗
- Types: ✓/✗
- Tests: ✓/✗
(Use severity tags: P0, P1, P2. Omit P3 — see [review rubric](../_shared/review-rubric.md).)
After review: Use forge-address-pr-feedback to address reviewer feedback.
Single invocation: Use forge-ship to implement and review in one step.
/forge-reflect
/forge-reflect -- pay extra attention to migration safety and missing regression tests
tools
End-to-end implementation and self-review in a single invocation. Implements from an Issue, plan file, or free-text description, then runs a lean fresh-context review. Use when the user wants to implement and review without manual handoff between skills.
development
Shape a vague idea into a clear plan through codebase investigation and convergent one-at-a-time questioning. Use when the user has a rough idea or problem that needs specifying before issue creation.
development
Set up or update a project's context infrastructure for agentic engineering — AGENTS.md as lean hot memory, docs/ as earned warm memory, with signal-to-noise scoring for existing guidance. Use when starting a new project, retrofitting an existing codebase, or auditing current guidance quality.
databases
⚠️ Renamed to forge-reflect. This stub exists for migration — remove it and install forge-reflect instead.