/sp-ecc:finishing-a-development-branchfrom sp-ecc
Guides completion of development work by verifying tests, summarizing changes, and presenting structured options for merging, PR creation, keeping, or discarding the branch.
Ships in sp-ecc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Guide completion of development work by presenting clear options and handling chosen workflow.
Core principle: Verify tests → Present options → Execute choice.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
If this branch was created via sp-ecc:subagent-driven-development:
docs/plans/*-pipeline-state.md for this featureCannot finish — pipeline stages incomplete:
- [ ] <list unchecked required stages>
Complete these stages before finishing.
Stop. Don't proceed to Step 1.
If no pipeline-state file exists (non-pipeline usage), skip this step.
Before presenting options, verify tests pass:
# Run project's test suite
npm test / cargo test / pytest / go test ./...
If tests fail:
Tests failing (<N> failures). Must fix before completing:
[Show failures]
Cannot proceed until tests pass.
Stop. Don't proceed to Step 2.
If tests pass: Continue to Step 2.
Prepare a summary of what was implemented:
Ask the user: "Would you like me to extract learned patterns from this session before finishing?"
sp-ecc:extract-patterns to save useful patterns to the instinct systemDo not auto-invoke. Always ask first.
Present exactly these 4 options:
Implementation complete. All tests passing. What would you like to do?
1. Merge locally (merge this branch into main/target branch)
2. Push and create PR (push branch to remote, open pull request)
3. Keep as-is (leave branch for later, continue working)
4. Discard this work (delete branch and revert)
Which option?
Don't add explanation - keep options concise.
# Switch to target branch
git checkout main
# Merge the feature branch
git merge <feature-branch> --no-ff -m "Merge: <summary>"
# Delete the feature branch
git branch -d <feature-branch>
If in a worktree, clean up:
# Remove the worktree
git worktree remove <worktree-path>
If pipeline-state file exists, delete it (pipeline complete).
Report: what was merged, target branch, and cleanup status.
# Push branch to remote
git push -u origin <feature-branch>
# Create PR using gh CLI
gh pr create --title "<summary>" --body "<description>"
If in a worktree, clean up:
# Remove the worktree (branch stays on remote)
git worktree remove <worktree-path>
If pipeline-state file exists, delete it (pipeline complete).
Report: PR URL, branch name, and cleanup status.
Report: "Understood. Branch <branch-name> preserved. Continuing development. Let me know what to work on next."
Don't change anything. Stay in current session context.
Confirm first:
This will delete branch <branch-name> and all uncommitted changes:
Files modified:
- <list of files>
Type 'discard' to confirm.
Wait for exact confirmation.
If confirmed:
# Switch to main
git checkout main
# Delete the branch
git branch -D <feature-branch>
# If in a worktree, remove it
git worktree remove <worktree-path> --force
If pipeline-state file exists, delete it (pipeline discarded).
Report what was cleaned up.
| Option | Action | Git Operations | Worktree Cleanup |
|---|---|---|---|
| 1. Merge locally | Merge into main | merge, branch -d | worktree remove |
| 2. Push & PR | Push, create PR | push -u, gh pr create | worktree remove |
| 3. Keep as-is | Continue working | None | None |
| 4. Discard | Delete branch | checkout main, branch -D | worktree remove --force |
Skipping test verification
Open-ended questions
No confirmation for discard
Never:
Always:
Called by:
Works with:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
56 skills in this plugin
/backend-patternsBackend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes./brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./clarify-firstUse before starting any task. Forces the agent to ask the user for clarification whenever it is confused, missing required information, or about to make assumptions. Prevents silent guessing and ensures requirements are fully understood before executing.npx claudepluginhub faisalalqarni/sp-ecc --plugin sp-eccOther plugins' skills for the same job