From 25a4dc0822f1273764f73152164a43d26929f45b Mon Sep 17 00:00:00 2001 From: "Ivan Milosavljevic (TheJavaGuy)" Date: Sun, 1 Mar 2026 14:13:10 +0100 Subject: [PATCH] add cleanup-branch skill for post-PR branch cleanup (closes #42) --- .claude/skills/cleanup-branch/SKILL.md | 21 +++++++++++++++++++++ LEARNINGS.md | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 .claude/skills/cleanup-branch/SKILL.md diff --git a/.claude/skills/cleanup-branch/SKILL.md b/.claude/skills/cleanup-branch/SKILL.md new file mode 100644 index 0000000..543fa3b --- /dev/null +++ b/.claude/skills/cleanup-branch/SKILL.md @@ -0,0 +1,21 @@ +--- +name: cleanup-branch +description: Switches to master, pulls latest changes, and deletes the branch you were on. Safe to use after a PR is merged. +disable-model-invocation: true +allowed-tools: Bash +--- + +Run the following commands in order: + +```bash +# Capture current branch name before switching +BRANCH=$(git rev-parse --abbrev-ref HEAD) + +# Switch to master and pull +git checkout master && git pull + +# Delete the feature branch (-D handles branches already merged via remote) +[ "$BRANCH" != "master" ] && git branch -D "$BRANCH" && echo "Deleted branch: $BRANCH" +``` + +Report the branch that was deleted and the current state of master (latest commit). diff --git a/LEARNINGS.md b/LEARNINGS.md index e73ccd9..1004796 100644 --- a/LEARNINGS.md +++ b/LEARNINGS.md @@ -81,6 +81,12 @@ return faker.bothify(pattern, true); **Solution**: Write the body to a temp file and use `--body-file /tmp/issue-body.md` instead of `--body "$(cat ...)"`. +### 7. Skills with `disable-model-invocation: true` cannot be called via the Skill tool + +**Problem**: Invoking a skill that has `disable-model-invocation: true` via the Skill tool raises an error and wastes a round-trip. + +**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. + --- *Last updated: 2026-03-01*