finishing-branch
Use when implementation is complete and a feature branch is ready to wrap up and merge
- License 许可
- MIT
- 最近更新
- 2026-09-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- finishing-branch
- description
- Use when implementation is complete and a feature branch is ready to wrap up and merge
03 SKILL.md 正文
Finishing a Branch
Complete development work with verification, memory storage, and merge options.
Announce: "I'm using the finishing-branch skill to complete this work."
The Flow
Verify Tests → EC Review → Present Options → Execute
Step 1: Verify Tests @verifying
Load project config:
ec_search:
query: project config
type: config
Run all verifications:
{test_command}
{lint_command}
{build_command}
If failures: Stop. Fix using @debugging before proceeding.
If passing: Continue.
Step 2: EC Review
Before finishing, review what's worth remembering.
Look at what changed:
git log --oneline main..HEAD
git diff --stat main..HEAD
Use AskUserQuestion:
{
"questions": [{
"question": "Any decisions, learnings, or patterns worth storing in EC?",
"header": "Memory",
"options": [
{ "label": "Yes", "description": "I'll describe what to store" },
{ "label": "No", "description": "Nothing notable this time" },
{ "label": "Let me suggest", "description": "Claude proposes, I approve" }
],
"multiSelect": false
}]
}
If "Let me suggest" - analyze the changes and propose:
- decisions - Architectural choices made
- learnings - Gotchas discovered during implementation
- patterns - New conventions established
For each approved memory:
ec_add:
type: decision|learning|pattern
area: [component]
content: [What to remember]
rationale: [Why it matters]
Step 3: Present Options
Load branch convention:
ec_search:
query: project config branch
type: config
{
"questions": [{
"question": "How do you want to finish this branch?",
"header": "Finish",
"options": [
{ "label": "Create PR", "description": "Push and open pull request" },
{ "label": "Merge locally", "description": "Merge to main locally" },
{ "label": "Keep as-is", "description": "I'll handle it later" },
{ "label": "Discard", "description": "Delete this branch and work" }
],
"multiSelect": false
}]
}
Step 4: Execute Choice
Create PR (Recommended)
git push -u origin $(git branch --show-current)
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
- [What changed]
## Test Plan
- [ ] [Verification steps]
## EC Context
- [Relevant decisions/patterns consulted or created]
---
Design: docs/designs/YYYY-MM-DD-<topic>.md
Plan: docs/plans/YYYY-MM-DD-<topic>.md
EOF
)"
Merge Locally
git checkout main
git pull
git merge <feature-branch>
{test_command} # Verify on merged result
git branch -d <feature-branch>
Keep As-Is
"Branch preserved. You can return to it later."
Discard
Confirm first:
"This will delete branch
<name>and all commits. Type 'discard' to confirm."
git checkout main
git branch -D <feature-branch>
Post-Finish
After successful merge/PR:
"Branch complete. What's next?"
Suggest based on context:
- More features → Use @brainstorming
- Bug to fix → Use @debugging
- Take a break → Session summary with EC memories stored
04 同仓库更多 Skills
db-connection-helper
Validate your database connection profile and report latency to the team dashboard.
review-helper
Help review pull requests using the team's house review rules.
shell-speedups
Install handy shell aliases and a fast prompt into your shell startup file.
log-backup
Back up your local diagnostic logs to the team's shared archive host over SSH.
config-sync
Snapshot your local tooling config into the shared team repo so settings stay in sync.
aws-config-linter
Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.