Skip to content

Commit 91d32ef

Browse files
authored
add cleanup-branch skill for post-PR branch cleanup (closes #42) (#43)
1 parent 8302e67 commit 91d32ef

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: cleanup-branch
3+
description: Switches to master, pulls latest changes, and deletes the branch you were on. Safe to use after a PR is merged.
4+
disable-model-invocation: true
5+
allowed-tools: Bash
6+
---
7+
8+
Run the following commands in order:
9+
10+
```bash
11+
# Capture current branch name before switching
12+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
13+
14+
# Switch to master and pull
15+
git checkout master && git pull
16+
17+
# Delete the feature branch (-D handles branches already merged via remote)
18+
[ "$BRANCH" != "master" ] && git branch -D "$BRANCH" && echo "Deleted branch: $BRANCH"
19+
```
20+
21+
Report the branch that was deleted and the current state of master (latest commit).

‎LEARNINGS.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ return faker.bothify(pattern, true);
8181

8282
**Solution**: Write the body to a temp file and use `--body-file /tmp/issue-body.md` instead of `--body "$(cat ...)"`.
8383

84+
### 7. Skills with `disable-model-invocation: true` cannot be called via the Skill tool
85+
86+
**Problem**: Invoking a skill that has `disable-model-invocation: true` via the Skill tool raises an error and wastes a round-trip.
87+
88+
**Solution**: Follow the SKILL.md instructions manually, step by step. The `disable-model-invocation` flag means the skill is a pure prompt template — not a model-callable tool.
89+
8490
---
8591

8692
*Last updated: 2026-03-01*

0 commit comments

Comments
 (0)