From claude-resources
Creates new branch from current, empty start commit, draft GitHub PR targeting invocation branch, then implements changes. For PR-first workflows, GitHub issues, nested PRs, or 'dev as pr' requests.
npx claudepluginhub takazudo/claude-resources[-haiku|-so|-op] [-co|--codex] [-gco|--github-copilot] [-gcoc|--github-copilot-cheap] [-a|--auto] [--make-issue|--issue] [-s|--stay] [-l|--review-loop] [-v|--verify-ui] [-nor|--no-review] [--noi] [-noi|--no-raise-issues] [issue-url-or-number] [branch-name] [base-branch]This skill uses the workspace's default tool permissions.
Start a development workflow by creating a branch and draft PR before implementation — or create a PR from existing work on the current branch.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
Start a development workflow by creating a branch and draft PR before implementation — or create a PR from existing work on the current branch.
The new PR's base MUST be the current (invocation) branch, NOT the repository's default branch.
As the very first action in this skill, record the current branch:
INVOCATION_BRANCH=$(git branch --show-current)
Every gh pr create call in this skill must pass --base "$INVOCATION_BRANCH" (or a user-specified base) — NEVER omit --base, because gh pr create defaults to the repo's default branch (usually main), which is almost always wrong here.
Concrete example (this is the bug this rule prevents):
Current branch: topic/foo-bar
User runs: /x-as-pr do blah blah...
CORRECT: new branch topic/moo-mew → PR targets topic/foo-bar
WRONG: new branch topic/moo-mew → PR targets main ← DO NOT DO THIS
This applies regardless of:
main "seems more natural" as the baseIf the user wants the PR to target a different branch, they pass it explicitly via base:<name> or as a trailing arg. If not specified, the answer is ALWAYS $INVOCATION_BRANCH.
(See Step 3 "Determine Target (Base) Branch" for the full mechanism, and the Scenarios table under "Default Behavior" for every case.)
This skill orchestrates long-running autonomous work (branch setup, implementation, review, PR management). When invoked, behave as if Auto Mode is active — regardless of session mode:
Parse $ARGUMENTS to extract:
--make-issue or --issue flag: If present, create a GitHub issue before starting (see "Issue Creation Mode" below)-s or --stay flag: If present, stay on the current branch instead of creating a new one (see "Stay Mode" below). Opt-in only — never auto-detected.-l or --review-loop flag: If present, replace the final review step with /review-loop 5 --aggressive instead of /deep-review (see "Review Loop Mode" below)-v or --verify-ui flag: If present, run /verify-ui after review fixes to verify frontend changes visually (see "Verify UI Mode" below)--noi, --noissue, or --noissues flag: Only meaningful with --review-loop. Suppresses GitHub issue creation for review findings. Without this flag, review-loop creates issues for considerable findings by default-nor or --no-review flag: Skip the post-implementation review entirely (no /deep-review, no /review-loop, no fix-delegation Agent). Just do the implementation, then proceed straight to verify-ui (if -v was passed), push, CI watch, and PR revision. See "No Review Mode" below-noi or --no-raise-issues flag: Suppress raising GitHub issues for unrelated problems found during coding or reviewing. See "Raising Issues for Unrelated Findings" below-haiku / --haiku, -so / --sonnet, -op / --opus): Claude model used for subagents spawned during the workflow (notably the fix-delegation Agent after review) and passed through to /deep-review / /review-loop. Pick at most one. Default: -op (Opus). See "Claude Model Mode" below.-co or --codex flag: If present, use codex-based alternatives for reviews, doc writing, and research. See "Codex Mode" below. Can combine with -gco / -gcoc (multiple backends run in parallel for reviews / 2nd-opinions).-gco or --github-copilot flag: If present, use GitHub Copilot for reviews and research. See "GitHub Copilot Mode" below. Can combine with -co and/or -gcoc.-gcoc or --github-copilot-cheap flag: Same as -gco but forces the free gpt-4.1 model (skips the Premium opus attempt). See "GitHub Copilot Cheap Mode" below. Can combine with -co and/or -gco.-a or --auto flag: If present, automatically run /pr-complete -c -w after the workflow completes. See "Auto-Complete Mode" belowhttps://github.com/owner/repo/issues/123) or number (123 or #123)branch: or a slash-containing name like topic/foo)base: or from:)When a GitHub issue URL or number is provided, treat it as an implementation request — read the issue and implement what it describes. The issue title/body ARE the implementation instructions.
If ambiguous, ask the user to clarify.
Unless --stay / -s is explicitly passed by the user, this skill ALWAYS creates a new branch from the current (invocation) branch and opens a new PR targeting the current branch. This is the default and only behavior. It applies regardless of:
CRITICAL — never auto-detect stay behavior. Do NOT decide to commit on the current branch just because:
If the user wants stay behavior, they MUST type --stay or -s explicitly. There is no inference from context.
| Current branch | User invocation | Result |
|---|---|---|
main | /x-as-pr foo | New branch topic/foo → PR targets main |
topic/foo (has PR → main) | /x-as-pr bar | New branch topic/bar → nested PR targets topic/foo |
topic/foo (has PR → main) | /x-as-pr -s bar | Stay on topic/foo, commit there, extend existing PR |
topic/foo (has commits, no PR) | /x-as-pr bar | New branch topic/bar → PR targets topic/foo |
topic/foo (has commits, no PR) | /x-as-pr -s | Stay on topic/foo, create PR from current work |
-s / --stay)When -s or --stay is explicitly passed by the user, stay on the current branch instead of creating a new one. This avoids deep nesting when running /x-as-pr multiple times in sequence, and is the way to create a PR from work already committed on the current branch.
Typical scenarios:
/x-as-pr creates topic/foo-impl → main, PR merged. Need more tweaks, still on topic/foo-impl → run /x-as-pr -s to stay and extend.topic/bar but forgot to start via /x-as-pr. Run /x-as-pr -s to create a PR from the existing commits.How it works:
TARGET_BRANCH (for PR base):gh pr view --json baseRefName -q '.baseRefName'TARGET_BRANCH and create a new draft PR--make-issue / --issue)When --make-issue or --issue is present in $ARGUMENTS:
Read the remaining arguments and conversation context to understand what the user wants to implement.
If the description is unclear, ask the user to clarify before creating the issue.
The issue serves as a spec tracker — it should clearly communicate what is being implemented and why. Write a concise but informative summary: enough for someone unfamiliar with the task to understand the scope. Not too detailed (that's for the PR), not too brief (that's useless).
gh issue create \
--title "<concise description of what's being done>" \
--body "$(cat <<'EOF'
## Summary
<2-4 sentences explaining what this implementation does and why. What problem does it solve? What's the approach?>
## Plan
- <step-by-step plan of what will be done>
## Notes
- Created via `/x-as-pr --make-issue`
EOF
)"
Record the created issue number as ISSUE_NUM. From here, proceed with the normal workflow using this issue.
If the user provides additional clarification after the issue is created, update the issue body:
gh issue edit <ISSUE_NUM> --body "<updated body with clarifications>"
When a GitHub issue is linked (either passed as argument or created via --make-issue), update the issue body to serve as a spec tracker. This prevents losing track of steps and clearly communicates the implementation scope.
When creating an issue (--make-issue) or linking an existing one, ensure the issue body contains (use gh issue edit to update if needed):
### TODO
- [ ] Create branch and draft PR
- [ ] Implementation
- [ ] Deep review (`/deep-review`)
- [ ] Push changes to remote
- [ ] CI watch (if CI configured)
- [ ] PR revision (`/pr-revise`)
gh issue edit to update - [ ] to - [x]gh issue view <ISSUE_NUM>
This re-read step is critical — it prevents losing track of remaining steps during long workflows with many interactions. Always check the TODO list to determine "What's next?" before proceeding.
When a GitHub issue is linked (either passed as argument or created via --make-issue), comment on the issue at key milestones to create a progress log. Use the issue number stored as ISSUE_NUM.
| Milestone | Comment content |
|---|---|
| PR created | "Draft PR created: <PR_URL>" |
| Implementation started | "Starting implementation. Plan: <brief plan>" |
| Significant progress | "Progress: <what was done so far>" |
| Plan changed | "Plan update: <what changed and why>" |
| Problem encountered | "Issue encountered: <description of problem and how it was resolved or workaround>" |
| Implementation complete | "Implementation complete. Changes: <summary of what was done>" |
gh issue comment <ISSUE_NUM> --body "<comment>"
When creating any PR (gh pr create), check for parent references and prepend a header to the PR body. This identifies what the PR belongs to.
Determine references:
Parent issue: Use ISSUE_NUM if set (from linked issue or --make-issue)
Parent PR: Check if TARGET_BRANCH has an open PR:
PARENT_PR_NUM=$(gh pr list --head "$TARGET_BRANCH" --json number -q '.[0].number' 2>/dev/null)
If either exists, prepend this header to the very start of the PR body (before ## Summary):
- issues
- <REPO_URL>/issues/<ISSUE_NUM>
- parent PR
- <REPO_URL>/pull/<PARENT_PR_NUM>
---
gh repo view --json url -q '.url' to get REPO_URL- issues if no issue, omit - parent PR if no parent PR/pr-revise), always preserve the reference header at the top — do not remove or replace itBefore starting implementation, when the abstract concept of the task is understood:
/codex-2nd — send the plan to codex for a second opinion/codex-2nd again with the updated plan (up to 3 iterations total)This step is advisory. If codex is unresponsive or provides no useful feedback, proceed with the original plan.
-haiku / -so / -op)Pick at most one. Default: -op (Opus).
When a model flag is passed (or left at default), it governs:
model: field of the fresh fix-delegation Agent spawned after review (see "Delegating Review Fixes to a Fresh Agent" below)./deep-review / /review-loop so their Claude reviewers run at the same model./light-review self-check — though if no model flag was explicitly passed, /light-review falls to its own default (-gcoc).Multiple model flags → last one wins (documented, not an error).
Model flags are orthogonal to -co / -gco / -gcoc. They can coexist — e.g. -so -gco means Sonnet for Claude subagents and /gco-review as the review backend.
-co / --codex)When -co or --codex is passed, the following substitutions apply throughout the entire workflow:
| Default tool | Codex replacement | Used for |
|---|---|---|
/deep-review | /codex-review | Post-implementation code review |
/review-loop N --aggressive | /codex-review (run once) | Review loop mode review step |
| Agent tool (web search, research) | /codex-research | Any web search or codebase research during planning/implementation |
| Agent tool (doc writing) | /codex-writer | Writing documentation, README, or other text content |
How it affects the workflow:
/deep-review or /review-loop, invoke /codex-review. If -l/--review-loop is also passed, still invoke /codex-review once (not multiple rounds — codex review is already thorough)./codex-research over the Agent tool or WebSearch./codex-writer over writing directly.All other workflow steps (branch creation, PR, CI watch, etc.) remain unchanged.
-gco / --github-copilot)When -gco or --github-copilot is passed, the following substitutions apply throughout the entire workflow:
| Default tool | GCO replacement | Used for |
|---|---|---|
/deep-review | /gco-review | Post-implementation code review |
/review-loop N --aggressive | /gco-review (run once) | Review loop mode review step |
/codex-2nd (planning phase) | /gco-2nd | Second opinion on plans |
| Agent tool (web search, research) | /gco-research | Any web search or codebase research during planning/implementation |
How it affects the workflow:
/deep-review or /review-loop, invoke /gco-review. If -l/--review-loop is also passed, still invoke /gco-review once (not multiple rounds). /gco-review silently falls back to Claude Code reviewers if Copilot is rate-limited — no special handling needed here./codex-2nd, invoke /gco-2nd. If Copilot is rate-limited, /gco-2nd silently skips./gco-research over the Agent tool or WebSearch.All other workflow steps (branch creation, PR, CI watch, etc.) remain unchanged.
-gcoc / --github-copilot-cheap)Same as -gco / --github-copilot above, but forces the free gpt-4.1 model (skips the Premium opus attempt). Use this when Premium quota is exhausted or when the task is simple enough that gpt-4.1 feedback is sufficient. Mutually exclusive with -co and -gco.
When -gcoc or --github-copilot-cheap is passed, the following substitutions apply throughout the entire workflow:
| Default tool | GCOC replacement | Used for |
|---|---|---|
/deep-review | /gcoc-review | Post-implementation code review |
/review-loop N --aggressive | /gcoc-review (run once) | Review loop mode review step |
/codex-2nd (planning phase) | /gcoc-2nd | Second opinion on plans |
| Agent tool (web search, research) | /gcoc-research | Any web search or codebase research during planning/implementation |
How it affects the workflow:
/deep-review or /review-loop, invoke /gcoc-review. If -l/--review-loop is also passed, still invoke /gcoc-review once (not multiple rounds). /gcoc-review silently falls back to Claude Code reviewers if Copilot is rate-limited — no special handling needed here./codex-2nd, invoke /gcoc-2nd. If Copilot is rate-limited, /gcoc-2nd silently skips./gcoc-research over the Agent tool or WebSearch.All other workflow steps (branch creation, PR, CI watch, etc.) remain unchanged.
This is the only default workflow. (See "Stay Mode" above for the opt-in --stay / -s variant.)
# If GitHub URL
gh issue view <issue-num> --repo <owner/repo>
# If issue number
gh issue view <issue-num>
Use the issue title and body as context for branch naming and implementation. The issue content IS the implementation request — implement what the issue describes.
Record the issue number as ISSUE_NUM for progress logging.
Immediately after reading a pre-existing issue passed by the user, post a claim comment so other Claude Code sessions don't start parallel work on the same topic:
gh issue comment "$ISSUE_NUM" --body "🤖 Starting work on this issue in a Claude Code session (\`/x-as-pr\`). To avoid conflicts, please check the latest comments before starting another session on this issue."
When to post:
When to skip:
--make-issue / --issue was used (the issue was just created by this session — no conflict risk)This claim happens before any branch creation or implementation work. Its sole purpose is to mark the issue as "in progress" so concurrent sessions can see someone is already on it.
If user specified a branch name, use it directly.
Otherwise, derive {SLUG} (max 40 chars, lowercase, hyphens) from the issue title or implementation description, then:
| Condition | Branch name pattern |
|---|---|
| Has issue | issue-#<ISSUE_NO>/<SLUG> |
| Documentation updates | doc/<SLUG> |
| Other | topic/<SLUG> |
INVOCATION_BRANCH (the branch that was checked out when the command was invoked)Record this as TARGET_BRANCH.
Example: If invoked on topic/foobar, the new branch targets topic/foobar by default, not the repository's default branch.
# Create and switch to new branch from TARGET_BRANCH
git checkout -b <BRANCH_NAME> <TARGET_BRANCH>
# Create empty start commit
git commit --allow-empty -m "= start <SLUG> dev ="
# Push to remote (only the initial empty commit — this is the only push until implementation is complete)
git push -u origin <BRANCH_NAME>
# Create draft PR against TARGET_BRANCH
# !! PR TARGET CHECK !! — <TARGET_BRANCH> MUST be INVOCATION_BRANCH (recorded at the start),
# not the repo default branch. If you about to pass `--base main` on a session that was
# invoked from `topic/foo`, STOP — that is the bug the top-of-file rule prohibits.
gh pr create \
--base <TARGET_BRANCH> \
--title "<PR_TITLE>" \
--body "$(cat <<'EOF'
## Summary
<brief description based on issue or instructions>
## Changes
- (in progress)
## Test Plan
- (to be determined)
EOF
)" \
--draft
The PR title should be descriptive based on the issue or instructions provided.
IMPORTANT: DO NOT push during implementation. All commits stay local until the post-implementation phase. This saves CI resources by avoiding CI runs on every intermediate commit. Only push once at the end after deep review is complete.
If the user provided implementation instructions (either via issue or direct text), begin the implementation work immediately. Commit frequently but do NOT push.
If no instructions were provided, report the PR URL and wait for further direction.
/x-as-pr 42
-> Fetch, on main
-> Read issue #42 "Add dark mode support"
-> Branch: issue-#42/add-dark-mode-support
-> Base: main
-> Empty commit, push, draft PR
-> Start implementing based on issue
/x-as-pr branch:feature/new-auth base:develop
-> Fetch, on develop
-> Branch: feature/new-auth
-> Base: develop
-> Empty commit, push, draft PR
/x-as-pr add pagination to the user list page
-> Fetch, on main
-> Branch: topic/add-pagination-user-list
-> Base: main
-> Empty commit, push, draft PR
-> Start implementing pagination
/x-as-pr add search to the sidebar
-> Fetch, on topic/foobar (even if it has its own PR)
-> Branch: topic/add-search-sidebar (new)
-> Base: topic/foobar (INVOCATION_BRANCH)
-> Empty commit, push, draft PR targeting topic/foobar (nested PR-on-PR)
-> Start implementing search
/x-as-pr -s more tweaks to search
-> Fetch, on topic/add-search-sidebar (has existing PR → main)
-> Stay on current branch, reuse existing PR
-> Start implementing
/x-as-pr --stay
-> Fetch, on topic/add-search-feature with 3 commits ahead, no PR
-> Stay on current branch
-> Push branch, create draft PR targeting main with summary from actual commits
-> Report PR URL
/x-as-pr https://github.com/owner/repo/issues/42
-> Fetch issue #42 "Add dark mode support"
-> Issue body describes what to implement → treat as implementation instructions
-> Branch: issue-#42/add-dark-mode-support, base: main
-> Empty commit, push, draft PR
-> Comment on issue #42: "Draft PR created: <URL>. Starting implementation."
-> Implement the issue
-> Comment on issue #42: "Implementation complete. Changes: ..."
/x-as-pr --make-issue add a search feature to the sidebar
-> Create GitHub issue "Add search feature to sidebar" with plan
-> Branch: issue-#99/add-search-sidebar, base: main
-> Empty commit, push, draft PR
-> Comment on issue #99: "Draft PR created: <URL>"
-> Implement, commenting on issue for progress
During coding and reviewing, you may discover problems that are unrelated to the original topic — e.g., pre-existing bugs, code smells in adjacent files, outdated dependencies, or inconsistencies in code that was not part of the task. By default, always raise these as separate GitHub issues so they are tracked and not lost.
gh issue create \
--title "<concise description of the unrelated problem>" \
--body "$(cat <<'EOF'
## Found during
PR: <PR_URL> (or branch: <BRANCH_NAME>)
## Description
<what the problem is, where it is, and why it matters>
## Suggested fix
<brief suggestion if obvious, otherwise omit>
---
*Discovered during `/x-as-pr` workflow — not related to the original task.*
EOF
)"
--no-raise-issues / -noiWhen -noi or --no-raise-issues is passed, do NOT raise GitHub issues for unrelated findings. Simply ignore them and focus only on the original task. This is useful when you want a lean workflow without side-effect issues.
-nor / --no-review)When -nor or --no-review is passed, skip the entire post-implementation review step — no /deep-review, no /review-loop, no fix-delegation Agent. Just do the implementation, then proceed straight to the remaining post-implementation steps (verify-ui if -v was passed, push, CI watch, PR revision, session report).
Effect on the workflow:
-l / --review-loop → ignored (no review at all overrides "more rigorous review")-v / --verify-ui → still honored (verify-ui is independent of code review)Use when:
This is an explicit opt-in — never assume --no-review from context.
After implementation is complete (in either mode), evaluate whether to run an automatic code review:
-nor / --no-review was NOT passed (if it was, skip this entire section — see "No Review Mode" above)AskUserQuestion was used during implementation)When all conditions are met, run the review:
-l / --review-loop was passed: Invoke /review-loop 5 --aggressive --issues instead of /deep-review. If --noi / --noissue / --noissues was also passed, omit the --issues flag (i.e., invoke /review-loop 5 --aggressive). This runs 5 rounds of aggressive review-fix cycles for thorough quality improvement./deep-review to perform a standard code quality review.Tell the user: "Implementation went smoothly — running deep review on the changes." (or "running review-loop" if --review-loop is active).
After the review produces findings that require code changes, delegate the fixes to a fresh Agent instead of fixing in the current (token-heavy) context. This resets the token budget so the finalization phase stays lightweight.
If the review found no actionable issues, skip this — proceed directly to the next post-implementation step.
If fixes are needed:
Create a fix issue capturing all findings:
FIX_ISSUE_URL=$(gh issue create \
--title "Review fixes: <SLUG>" \
--body "$(cat <<'EOF'
## Review Findings to Fix
<all review findings — file paths, line numbers, what to fix and why>
## Context
- Branch: `<BRANCH_NAME>`
- PR: <PR_URL>
## Instructions
Fix all issues listed above. Commit locally — do NOT push.
EOF
)")
FIX_ISSUE_NUM=$(echo "$FIX_ISSUE_URL" | grep -o '[0-9]*$')
Spawn a fresh Agent to handle the fixes:
Agent tool:
description: "Fix review findings"
model: <resolved Claude model flag; default "opus">
prompt: "You are on branch <BRANCH_NAME> in <repo-path>.
Read GitHub issue #<FIX_ISSUE_NUM> with `gh issue view <FIX_ISSUE_NUM>`.
Fix all issues described there.
Commit fixes locally — do NOT push.
After committing, run `/light-review <forwarded backend flags>` as a self-check
and address any high-priority findings it flags.
When done, close the issue with a summary of what was fixed."
mode: "bypassPermissions"
model: from the resolved Claude model flag (default "opus"). Skip the model: field if you want to inherit the manager's model — pick one convention and stick with it./light-review: pass whichever of -co / -gco / -gcoc were on the original invocation. If none were passed, omit them — /light-review falls to its own default (-gcoc).git log --oneline -5)Do NOT run deep review if:
-nor / --no-review was passed (see "No Review Mode" above)--stay used to just create a PR from existing commits with no additional instructions)Only run this step if -v / --verify-ui was passed.
After the review step (whether /deep-review or /review-loop) is complete and fixes are committed:
/verify-ui to verify that frontend/CSS/layout changes were actually applied correctly/verify-ui reveals issues, fix them and commit locally (do NOT push yet)This step ensures that visual/UI changes are not just code-correct but render correctly in the browser. Skip if the changes are purely backend or non-visual.
After deep review is complete (or skipped), push all commits to remote in one batch. This is the first push since the initial empty commit — saving CI resources.
git push origin <BRANCH_NAME>
This single push triggers CI once with the complete implementation, rather than on every intermediate commit.
Only perform this step if the project has CI configured. Check with gh pr checks <PR_NUMBER> — if no checks exist, skip to PR Revision.
Invoke /watch-ci <PR_NUMBER> to monitor CI. The /watch-ci skill handles polling, notifications, and failure investigation internally.
gh run view <run-id> --log-failedIf the task is intentionally CI-breaking, skip CI verification and inform the user.
After implementation, deep review, push, and CI watch are complete (or skipped), update the PR to reflect the full implementation.
Run /pr-revise when implementation was performed. The PR was created at the start with placeholder or initial content, and the implementation may have gone beyond the original scope.
Invoke /pr-revise to analyze the full diff and update the PR title and description to accurately reflect all changes made.
Do NOT run PR revision if:
--stay from already-committed work and has an already-accurate description (the body was derived from actual commits/diff)After all post-implementation steps are complete, generate a structured session report. This report serves two purposes: (1) a log for future Claude Code sessions to reference via /logrefer, and (2) a GitHub issue comment for human visibility.
Write a markdown report summarizing:
/deep-review was run)$HOME/.claude/scripts/save-file.js "{logdir}/{timestamp}-x-as-pr-{slug}.md" "<report content>"
Where {slug} is derived from the branch name or PR title (e.g., add-dark-mode-support).
If a GitHub issue is linked (ISSUE_NUM is set), post the report as an issue comment:
gh issue comment "$ISSUE_NUM" --body "<report content>"
Only run this step when a GitHub issue is linked (ISSUE_NUM is set — either passed as argument or created via --make-issue). Skip if no issue is linked.
After the session report, verify that the original requirements have been fully implemented:
gh issue view "$ISSUE_NUM"
Read the initial issue body and any early comments (especially the first 1-2 comments) to extract the original requirements. These represent what the user actually asked for.
Check every requirement, acceptance criterion, and bullet point from the issue against what was actually implemented. Be thorough — check the code, not just commit messages.
If all requirements are met: Proceed to STOP. Add a comment on the issue confirming all requirements are satisfied:
gh issue comment "$ISSUE_NUM" --body "All original requirements verified as implemented."
If requirements are missing: Do NOT stop. Instead:
Comment on the issue listing the missing requirements:
gh issue comment "$ISSUE_NUM" --body "### Requirements gap found\n\nMissing: <list of missing items>\n\nContinuing implementation..."
Continue the development loop — implement the missing parts, commit locally (push-forbid), then re-run the post-implementation steps (review, verify-ui if applicable, push, CI watch, PR revision, session report)
Re-run this verification step after the additional implementation is complete
Repeat until all original requirements are satisfied
This creates a self-correcting loop that ensures nothing from the original spec is missed, even in long workflows where context can drift.
-a / --auto)Only run this step if -a or --auto was passed. Otherwise, skip to STOP below.
After requirements verification passes (or after the session report if no issue is linked), automatically invoke /pr-complete -c -w to:
--merge --delete-branch)-c)-w)This is intended for safe-to-merge, fully automated workflows. If CI fails or the PR cannot be merged, /pr-complete will handle the error reporting.
After /pr-complete succeeds, checkout the merged target branch and pull:
# Determine the target branch the PR was merged into
TARGET_BRANCH=$(gh pr view <PR_NUMBER> --json baseRefName -q '.baseRefName')
# Checkout and pull the target branch
git checkout "$TARGET_BRANCH"
git pull origin "$TARGET_BRANCH"
This leaves the user on the up-to-date target branch (e.g., main) after a fully automated workflow.
Only run this step when the tracking issue was created by this workflow (--make-issue was used). Skip if the issue was provided by the user (they may want it to remain open for other purposes).
After requirements verification passes (or auto-complete finishes), close the tracking issue:
gh issue close "$ISSUE_NUM" --comment "Workflow complete. PR: <PR_URL>"
The tracking issue is a workflow log — it has served its purpose. If any problems were discovered during the workflow that need follow-up, they should have been raised as separate issues (not left as open items on the tracking issue).
After the tracking issue is closed (or skipped), the workflow is DONE. Report the PR URL and stop.
CRITICAL RULES:
-a / --auto was used and the PR was merged: You are already on the target branch (e.g., main) after the auto-complete checkout+pull. Stay there.<BRANCH_NAME>. Do NOT checkout main, the parent branch, or any other branch. The user expects to remain on the working branch when the workflow finishes.