From go-workflow
Verifies GitHub PRs end-to-end with browser automation tests via Chrome DevTools, investigates gaps, fixes review comments, and preps for merge in modes like verify or fix-and-ship.
npx claudepluginhub gopherguides/gopher-ai --plugin go-workflowThis skill is limited to using the following tools:
Extract PR number and mode from `$ARGUMENTS`:
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Extract PR number and mode from $ARGUMENTS:
MODE="verify"
PR_ARG=""
for arg in $ARGUMENTS; do
case "$arg" in
verify|fix-and-verify|investigate|ship-prep|ship|fix-and-ship) MODE="$arg" ;;
*) if echo "$arg" | grep -qE '^[0-9]+$'; then PR_ARG="$arg"; fi ;;
esac
done
echo "MODE=$MODE PR_ARG=$PR_ARG"
PR_NUM="${PR_ARG:-$(gh pr view --json number --jq '.number' 2>/dev/null)}"
if [ -z "$PR_NUM" ]; then
echo "Error: No PR found for current branch and no PR number provided."
echo "Usage: /e2e-verify [PR-number] [verify|fix-and-verify|investigate|ship-prep|ship|fix-and-ship]"
exit 1
fi
echo "Working on PR #$PR_NUM in mode: $MODE"
STATE_FILE=".claude/e2e-verify-${PR_NUM}.loop.local.json"
if [ -f "$STATE_FILE" ]; then
EXISTING_PHASE=$(jq -r '.phase // empty' "$STATE_FILE" 2>/dev/null || true)
if [ -n "$EXISTING_PHASE" ]; then
echo "Re-entry detected (phase: $EXISTING_PHASE) — skipping setup-loop to preserve state."
fi
fi
Only call setup-loop on fresh starts (no state file or empty phase):
if [ -f "$STATE_FILE" ] && [ -n "$(jq -r '.phase // empty' "$STATE_FILE" 2>/dev/null)" ]; then
echo "Re-entry detected — skipping setup-loop."
else
"${CLAUDE_PLUGIN_ROOT}/scripts/setup-loop.sh" "e2e-verify-${PR_NUM}" "VERIFIED" 30 "" \
'{"rebasing":"Resume rebase onto base branch.","building":"Resume build verification.","addressing":"Resume address-review fixes.","investigating":"Resume investigation.","e2e-testing":"Resume E2E tests. Restart dev server if needed.","posting":"Resume posting results to PR.","shipping":"Resume ship workflow."}'
fi
STATE_FILE=".claude/e2e-verify-${PR_NUM}.loop.local.json"
TMP="$STATE_FILE.tmp"
jq --arg mode "$MODE" --arg pr_number "$PR_NUM" --arg build_result "" \
--arg e2e_result "" --argjson pages_tested 0 --arg base_branch "" \
'. + {mode: $mode, pr_number: $pr_number, build_result: $build_result, e2e_result: $e2e_result, pages_tested: $pages_tested, base_branch: $base_branch}' \
"$STATE_FILE" > "$TMP" && mv "$TMP" "$STATE_FILE"
source "${CLAUDE_PLUGIN_ROOT}/lib/loop-state.sh"
if [ -f "$STATE_FILE" ]; then
read_loop_state "$STATE_FILE"
fi
If PHASE is set (non-empty), this is a re-entry. Recover state from persisted fields and skip to the corresponding phase:
rebasing → go to Step 1-2building → go to Step 2addressing → go to Step 3investigating → go to Step 4e2e-testing → go to Step 5posting → go to Step 6shipping → go to Step 7If PHASE is empty, this is a fresh start. Continue to Step 1.
| Mode | Steps Executed | Finish Action |
|---|---|---|
verify (default) | 1-2, 5-6 | Report results |
fix-and-verify | 1-2, 3, 5-6 | Add run-full-ci label, report |
investigate | 1-2, 4, 5-6 | Report findings (no label) |
ship-prep | 1-2, 5-6 | Add run-full-ci label, report |
ship | 1-2, 5-6, 7 | Run /go-workflow:ship |
fix-and-ship | 1-2, 3, 5-6, 7 | Add run-full-ci label → watch CI → /go-workflow:ship |
Set phase to rebasing:
set_loop_phase "$STATE_FILE" "rebasing"
Read rebase-and-build.md for the full rebase and build verification procedure:
After build verification, persist results:
set_loop_phase "$STATE_FILE" "building"
TMP="$STATE_FILE.tmp"
jq --arg build_result "$BUILD_RESULT" --arg base_branch "$BASE_BRANCH" \
'.build_result = $build_result | .base_branch = $base_branch' \
"$STATE_FILE" > "$TMP" && mv "$TMP" "$STATE_FILE"
If build failed: Report failure and stop. Do not proceed to E2E testing with a broken build.
Only for modes: fix-and-verify, fix-and-ship
For all other modes, skip to Step 4 or Step 5.
Set phase to addressing:
set_loop_phase "$STATE_FILE" "addressing"
Read ${CLAUDE_PLUGIN_ROOT}/skills/address-review/SKILL.md and follow Steps 2-11 only:
After addressing review feedback, create a descriptive fix commit and push.
CRITICAL: Since Step 3 modified code, re-run build verification before proceeding to E2E:
go build ./...
go test ./...
golangci-lint run 2>/dev/null || true
Update BUILD_RESULT based on these fresh results. If the build fails after fixes, stop and fix before continuing.
Only for mode: investigate
For all other modes, skip to Step 5.
Set phase to investigating:
set_loop_phase "$STATE_FILE" "investigating"
Read the GitHub issue linked to the PR:
gh pr view "$PR_NUM" --json body,title,url
Review the implementation against requirements:
git diff "origin/${BASE_BRANCH}...HEAD"
Identify gaps between issue requirements and implementation:
Record findings for the PR comment. Do NOT fix anything — only report.
Set phase to e2e-testing:
set_loop_phase "$STATE_FILE" "e2e-testing"
Read e2e-test-execution.md for the full E2E test procedure:
After E2E testing, persist results:
TMP="$STATE_FILE.tmp"
jq --arg e2e_result "$E2E_RESULT" --argjson pages_tested "$PAGES_TESTED" \
'.e2e_result = $e2e_result | .pages_tested = $pages_tested' \
"$STATE_FILE" > "$TMP" && mv "$TMP" "$STATE_FILE"
Set phase to posting:
set_loop_phase "$STATE_FILE" "posting"
Read pr-results-comment.md for structured PR comment posting:
| Mode | Action |
|---|---|
verify | Report results. Output <done>VERIFIED</done> |
fix-and-verify | Add run-full-ci label. Report results. Output <done>VERIFIED</done> |
investigate | Report findings (no label). Output <done>VERIFIED</done> |
ship-prep | Add run-full-ci label. Report results. Output <done>VERIFIED</done> |
ship | Set phase to shipping. Invoke /go-workflow:ship |
fix-and-ship | Add run-full-ci label. Set phase to shipping. Watch CI → invoke /go-workflow:ship --skip-coverage |
For fix-and-ship mode, watch CI before shipping:
set_loop_phase "$STATE_FILE" "shipping"
gh pr edit "$PR_NUM" --add-label "run-full-ci"
for i in 1 2 3; do sleep 10 && gh pr checks "$PR_NUM" --watch && break; done
Then invoke /go-workflow:ship --skip-coverage to avoid re-running coverage and E2E tests that were already done.
Output <done>VERIFIED</done> when ALL of these are true:
fix-and-verify or fix-and-ship mode)When ALL criteria are met, output exactly: <done>VERIFIED</done>
Safety: If 15+ iterations without success, document blockers and ask user.
rebase-and-build.md — Steps 1-2: rebase onto base branch + build verificatione2e-test-execution.md — Step 5: Chrome DevTools MCP E2E testingpr-results-comment.md — Step 6: structured PR comment with results