From go-workflow
Deep-reviews a PR or branch with full issue and repo context, then fixes all actionable findings. Use for 'review my changes', 'check this PR', or post-implementation quality reviews.
How this skill is triggered — by the user, by Claude, or both
Slash command
/go-workflow:review-deep [PR-number|--issue <N>] [--post] [--scope <hint>][PR-number|--issue <N>] [--post] [--scope <hint>]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Performs a thorough code review with full PR/issue context, then fixes all actionable findings.
Performs a thorough code review with full PR/issue context, then fixes all actionable findings. Combines the depth of spec review, quality review, and Go-specific analysis in a single pass.
Parse $ARGUMENTS to extract:
$review-deep 42)--issue <N>: Use specific issue as context (no PR required)--post: Auto-post findings to PR as a comment (skip asking)--scope <hint>: Focus area for the review (e.g., "error handling", "concurrency")Store as PR_ARG, ISSUE_ARG, AUTO_POST (default: false), SCOPE_HINT.
PR_ARG=""
ISSUE_ARG=""
AUTO_POST=false
SCOPE_HINT=""
ARGS="$ARGUMENTS"
while [ -n "$ARGS" ]; do
case "$ARGS" in
--issue\ *)
ARGS="${ARGS#--issue }"
ISSUE_ARG="${ARGS%% *}"
ARGS="${ARGS#"$ISSUE_ARG"}"
ARGS="${ARGS# }"
;;
--post*)
AUTO_POST=true
ARGS="${ARGS#--post}"
ARGS="${ARGS# }"
;;
--scope\ *)
ARGS="${ARGS#--scope }"
SCOPE_HINT="$ARGS"
ARGS=""
;;
[0-9]*)
PR_ARG="${ARGS%% *}"
ARGS="${ARGS#"$PR_ARG"}"
ARGS="${ARGS# }"
;;
*)
SCOPE_HINT="$ARGS"
ARGS=""
;;
esac
done
echo "PR_ARG=$PR_ARG ISSUE_ARG=$ISSUE_ARG AUTO_POST=$AUTO_POST SCOPE_HINT=$SCOPE_HINT"
If PR_ARG is set, use it directly. Otherwise, auto-detect from the current branch using three strategies in order — fall through when each returns empty.
Strategy 1 — current branch:
PR_JSON=$(gh pr view --json number,title,body,state,baseRefName,closingIssuesReferences --jq '.' 2>/dev/null)
Strategy 2 — match HEAD commit against open PRs:
if [ -z "$PR_JSON" ]; then
HEAD_SHA=$(git rev-parse HEAD 2>/dev/null)
PR_NUM=$(gh pr list --search "$HEAD_SHA" --state open --json number --jq '.[0].number' 2>/dev/null)
if [ -n "$PR_NUM" ] && [ "$PR_NUM" != "null" ]; then
PR_JSON=$(gh pr view "$PR_NUM" --json number,title,body,state,baseRefName,closingIssuesReferences 2>/dev/null)
fi
fi
Strategy 3 — match HEAD against any (open/closed/merged) PRs:
if [ -z "$PR_JSON" ]; then
HEAD_SHA=$(git rev-parse HEAD 2>/dev/null)
PR_NUM=$(gh pr list --search "$HEAD_SHA" --state all --limit 5 --json number --jq '.[0].number' 2>/dev/null)
if [ -n "$PR_NUM" ] && [ "$PR_NUM" != "null" ]; then
PR_JSON=$(gh pr view "$PR_NUM" --json number,title,body,state,baseRefName,closingIssuesReferences 2>/dev/null)
fi
fi
Extract PR number and base branch:
if [ -n "$PR_JSON" ]; then
PR_NUM=$(echo "$PR_JSON" | jq -r '.number')
BASE_BRANCH=$(echo "$PR_JSON" | jq -r '.baseRefName')
echo "Found PR #$PR_NUM (base: $BASE_BRANCH)"
else
BASE_BRANCH=$( (git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||' | grep .) || (git remote show -n origin 2>/dev/null | grep 'HEAD branch' | sed 's/.*: //' | grep .) || echo "main" )
echo "No PR found. Using base branch: $BASE_BRANCH"
fi
Display a brief summary of what was detected.
Read context-gathering.md and execute the procedure end-to-end:
If --issue N was provided instead of a PR, fetch just the issue context. If no PR and no issue, proceed with diff-only review (no requirement verification, no review-comment status).
context-gathering.md includes the size guard — if combined context exceeds ~6000 characters, use summary format.
Based on detected scope:
git diff ${BASE_BRANCH}...HEADgit diff HEAD plus untracked files via git ls-files --others --exclude-standardPR_ARG: always use changes vs base branchDIFF=$(git diff "${BASE_BRANCH}...HEAD")
REVIEW_BASE="$BASE_BRANCH"
REVIEW_BACKEND=agent
REVIEW_CONCURRENCY=auto
Read ../../lib/review-planning.md, run the shared planner, display its coverage
plan, and follow it through the final coordinated pass. Do not interrupt solely
because of raw diff size. Preserve SCOPE_HINT as review emphasis.
If a Go project is detected (go.mod exists):
CHANGED=$(git diff --name-only "${BASE_BRANCH}...HEAD" | grep '\.go$')
if [ -n "$CHANGED" ]; then
echo "$CHANGED" | xargs -I{} dirname {} | sort -u | xargs go vet 2>&1 || true
echo "$CHANGED" | xargs -I{} dirname {} | sort -u | xargs staticcheck 2>&1 || true
echo "$CHANGED" | xargs -I{} dirname {} | sort -u | xargs go test -race -count=1 2>&1 || true
fi
Static-analysis failures are informational — they feed into the review, not block it.
Read review-criteria.md for the full criteria, the Quality Score Rubric, the confidence-scoring guide, and the breaking-change detection block. Apply all criteria to the diff with the gathered context.
Process:
review-criteria.md.review-criteria.md).For the exact findings-table layout, spec-compliance table, review-comments-status table, and the recommendation values — Read output-format.md.
Read fix-and-verify.md and follow it end-to-end. Highlights:
git add -A); commit with a descriptive messageDisplay the final summary:
## Review Complete
- **Findings reported:** <n>
- **Findings fixed:** <n>
- **Findings skipped:** <n> (with reasons)
- **Files changed:** <list>
- **Quality Score:** <n>/100
- **All verifications passed:** yes/no
- **Recommendation:** APPROVE / REQUEST_CHANGES / COMMENT
If AUTO_POST is true and a PR was detected, post immediately with gh pr comment "$PR_NUM" --body ... using the formatting from output-format.md.
If AUTO_POST is false and a PR was detected, ask via AskUserQuestion:
| Option | Description |
|---|---|
| Post to PR | Add review findings as a PR comment |
| Done | Exit the review |
Default: Done.
context-gathering.md — PR/issue/review-thread fetching, repo-guideline detection, size guardreview-criteria.md — full review criteria, Go idiom checks, Quality Score Rubric, confidence scoring, breaking-change detectionfix-and-verify.md — fix iteration, parallel dispatch, test generation, verification, commitoutput-format.md — findings table, spec-compliance table, review-comments-status table, PR-comment template../../lib/review-planning.md — shared adaptive coverage planning and finding coordinationnpx claudepluginhub gopherguides/gopher-ai --plugin go-workflowReviews a pull request for code quality and correctness. Use when asked to review a PR or when running as an automated PR reviewer.
Runs a full PR code review and posts review comments to the current branch's GitHub PR. Requires gh CLI and an existing PR.
Fetches a GitHub PR diff, runs automated checks, and launches 3 parallel review agents (correctness, convention, efficiency) to analyze changes and draft a review.