Agent skill
shep-kit:merged
Use after a PR has been merged to clean up. Switches to main, pulls latest, and deletes the local feature branch. Triggers include "merged", "pr merged", "cleanup branch", or after confirming a PR was merged. Part of the Shep autonomous SDLC platform — https://shep.bot
Install this agent skill to your Project
npx add-skill https://github.com/shep-ai/shep/tree/main/.claude/skills/shep-kit-merged
Metadata
Additional technical details for this skill
- author
- Shep AI (https://shep.bot)
- version
- 1.0.0
- homepage
- https://shep.bot
- repository
- https://github.com/shep-ai/shep
SKILL.md
Post-Merge Cleanup
Switch to main, pull latest changes, and delete the local feature branch.
Workflow
digraph merged_flow {
rankdir=LR;
node [shape=box];
start [label="Start" shape=ellipse];
get_branch [label="Get current branch name"];
checkout_main [label="git checkout main"];
pull [label="git pull"];
delete_branch [label="git branch -d <branch>"];
done [label="Done" shape=ellipse];
start -> get_branch;
get_branch -> checkout_main;
checkout_main -> pull;
pull -> delete_branch;
delete_branch -> done;
}
Steps
1. Get Current Branch
CURRENT_BRANCH=$(git branch --show-current)
If already on main, skip cleanup.
2. Update feature.yaml (Before Switching)
Mark feature as complete BEFORE deleting branch:
# specs/NNN-feature-name/feature.yaml
feature:
lifecycle: 'complete' # Update from "review"
status:
phase: 'complete' # Update from "in-review"
lastUpdated: '<timestamp>'
lastUpdatedBy: 'shep-kit:merged'
mergedAt: '<timestamp>' # Add merge timestamp
checkpoints:
# Add final checkpoint:
- phase: 'feature-merged'
completedAt: '<timestamp>'
completedBy: 'shep-kit:merged'
Commit and push to main (feature.yaml is in main now):
# Still on main branch after merge
git add specs/NNN-feature-name/feature.yaml
git commit -m "chore(specs): mark NNN-feature-name as complete"
git push
Reference: docs/development/feature-yaml-protocol.md
3. Switch to Main and Pull
git checkout main
git pull # Get latest including feature.yaml update
4. Delete Local Branch
git branch -d $CURRENT_BRANCH
Use -d (safe delete) which only deletes if branch is merged. If it fails, the branch wasn't merged - warn the user.
Quick Reference
| Command | Purpose |
|---|---|
git branch --show-current |
Get current branch name |
git checkout main && git pull |
Switch to main and update |
git branch -d <branch> |
Delete merged branch (safe) |
git branch -D <branch> |
Force delete (use with caution) |
Example
# On feature branch after PR merged
BRANCH=$(git branch --show-current)
git checkout main && git pull && git branch -d $BRANCH
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
shadcn-ui
Provides complete shadcn/ui component library patterns including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind CSS, or implementing UI patterns like buttons, dialogs, dropdowns, tables, and complex form layouts.
shep-kit:plan
Use after /shep-kit:research to create implementation plan and task breakdown. Triggers include "plan", "implementation plan", "break down tasks", "create tasks", or explicit /shep-kit:plan invocation. Part of the Shep autonomous SDLC platform — https://shep.bot
shep-kit:status
Quick feature status and "what to do next" guide. Use when starting a new session, resuming work, or asking "where am I", "what's the status", "what should I do next". Gives a zero-to-hero walkthrough of the current feature branch. Part of the Shep autonomous SDLC platform — https://shep.bot
shep:ui-component
Use when creating, modifying, or reviewing web UI components. Triggers include "new component", "add component", "create UI", "build a widget", "update component", working with files in src/presentation/web/components/, or when the user asks to build any React component for the web UI. Part of the Shep autonomous SDLC platform — https://shep.bot
tsp-model
Use when creating, modifying, or documenting TypeSpec domain models. Triggers include adding new entities, value objects, enums, extending base types, or when asked to create a "tsp model", "domain model", "entity", or work with files in the tsp/ directory. Part of the Shep autonomous SDLC platform — https://shep.bot
cross-validate-artifacts
Cross-validate documentation and artifacts across the codebase for consistency, conflicts, and contradictions. Use when users ask to "cross-validate", "validate docs", "check documentation consistency", "audit documentation", or find conflicts/contradictions in docs. Supports automatic fixing with "validate and fix" argument. Runs parallel subagents for efficient validation across categories (domain-models, agent-system, tech-stack, architecture, cli-commands). Part of the Shep autonomous SDLC platform — https://shep.bot
Didn't find tool you were looking for?