From kraftwork-review
Use when implementation is complete and you want to review the branch diff before submitting an MR — uses cursor agent with gpt-5.3-codex to simulate a senior engineer MR review
How this skill is triggered — by the user, by Claude, or both
Slash command
/kraftwork-review:self-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review the current branch's diff against its base branch using a model with zero context of the current conversation. Simulates a senior engineer MR review before you submit.
Review the current branch's diff against its base branch using a model with zero context of the current conversation. Simulates a senior engineer MR review before you submit.
Optional focus area in quotes.
Examples: /self-review, /self-review "focus on error handling"
Verify we're inside a git repo:
git rev-parse --is-inside-work-tree 2>/dev/null && echo "git repo" || echo "not a git repo"
If not a git repo, STOP: "This skill requires a git repository. Run it from inside a worktree."
Get the current branch:
git branch --show-current
If on main or master, STOP: "You're on the main branch. Switch to a feature branch first."
Auto-detect the base branch:
git rev-parse --abbrev-ref @{upstream} 2>/dev/null
If upstream is set, extract the remote branch name (e.g., origin/main → use origin/main). If no upstream, fall back to origin/main.
Store as [BASE].
Verify there are commits to review:
git log [BASE]..HEAD --oneline
If empty, STOP: "No commits found between [BASE] and HEAD. Nothing to review."
Tell the user what you're reviewing:
Reviewing branch
[BRANCH]against[BASE]
Capture the diff stats:
git diff [BASE]...HEAD --stat
Capture commit messages:
git log [BASE]..HEAD --oneline
Capture the full diff:
git diff [BASE]...HEAD
Count diff lines. If over 3000 lines, warn:
This diff is large (~[N] lines). The review may miss details — consider splitting your MR.
Proceed regardless.
Store the diff as [DIFF], stats as [STATS], and commit log as [COMMITS].
Start with the base framing:
You are a senior engineer reviewing a merge request. You have no prior context about this project beyond the diff and commit messages below. Your job is to find what the author missed — not to praise what they got right. Be specific: quote the code, state the issue, explain why it matters.
Append the review instructions:
Review this merge request for:
Correctness & Logic
- Bugs, logic errors, off-by-one mistakes
- Unhandled error paths and failure modes
- Race conditions or concurrency issues
- Security vulnerabilities (injection, auth bypass, data leaks)
Code Quality
- Unclear intent — code a new reader would misunderstand
- Missing validation at system boundaries
- DRY violations — duplicated logic that should be extracted
- YAGNI violations — over-engineering, unnecessary abstractions, speculative features
- Unnecessary comments that restate the code
Change Hygiene
- Commit messages: are they clear and well-scoped?
- Is the change appropriately scoped, or does it mix unrelated concerns?
- Are there test coverage gaps for new/changed behavior?
- Are there leftover debug statements, TODOs, or commented-out code?
Structure your review as:
- Summary — one paragraph on what this MR does and your overall assessment
- Critical issues — must fix before merge
- Suggestions — would improve but not blocking
- Nits — minor style/preference items
If the user provided a focus area, append:
Additionally, pay special attention to: [FOCUS_AREA]
Append the commit log and diff:
Commits
[COMMITS]
Diff
[DIFF]
Store the full prompt as [PROMPT].
cursor agent --model gpt-5.3-codex -p "[PROMPT]"
Capture the full output.
If the command fails or times out, report the error and suggest the user check that cursor CLI is installed and accessible.
Present the output under a clear header:
## Self-Review: [BRANCH] → [BASE]
**Files changed**: [FILE_COUNT] | **Lines**: [INSERTIONS]+/[DELETIONS]- | **Model**: gpt-5.3-codex
---
[cursor agent output]
---
*Review by cursor agent (gpt-5.3-codex) — independent perspective, no shared context.*
npx claudepluginhub filipeestacio/kraftwork --plugin kraftwork-reviewReviews code changes on the current branch using checkpoint transcript context to understand developer intent before auditing the diff. Useful for code review requests and pre-merge audits.
Reviews code changes on the current branch against main. Analyzes recent commits, code quality, test coverage, security, and performance with file-level specifics.
Performs multi-agent code review of current git branch against main: detects bugs via specialist agents, verifies findings, ranks severity, generates persistent report before push/merge.