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
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Shep Kit:Merged when an AI agent needs a reusable SKILL.md workflow for this job: 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
When not to use it
Skip Shep Kit:Merged when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/shep-kitmerged # Save SKILL.md to ~/.claude/skills/shep-kitmerged/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/shep-kitmerged/SKILL.md. For a shared project, commit the folder at .claude/skills/shep-kitmerged/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Shep Kit:Merged skill for this task: Use Shep Kit:Merged when this documented workflow matches the task. Confirm any required inputs or files before making changes.
What supports this recommendation?
71/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 77/100
- Practical detail
- 68/100
- Source evidence
- 62/100
- Source signals
- 72/100
Model compatibility evidence
- claudeinferred
The skill text mentions Claude or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# Post-Merge Cleanup
Switch to main, pull latest changes, and delete the local feature branch.
## Workflow
```dot 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
```bash 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:**
```yaml # 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):**
```bash # 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](../../docs/development/feature-yaml-protocol.md)
### 3. Switch to Main and Pull
```bash git checkout main git pull # Get latest including feature.yaml update ```
### 4. Delete Local Branch
```bash 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
```bash # On feature branch after PR merged BRANCH=$(git branch --show-current) git checkout main && git pull && git branch -d $BRANCH ```
Intended uses
- Use Shep Kit:Merged when this documented workflow matches the task.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.