finish-branch
Skill2 starsChanged 29 days agoMITView on GitHub
Decides how a finished branch or worktree is integrated (merge locally, push + PR, keep) through the vendored superpowers finishing-a-development-branch procedure, with ytstack's branch, worktree and task-summary state injected. Use when the slice or milestone work on a branch is done and verified, or when the user says finish the branch, merge this, open the PR, wrap up the worktree. Not before verification-before-completion passed and not for closing a task (summarize-task).
8 other projects use a version of this.
Adopted by
Most recently taken up by
- LARi-UQAC/ResearchToolstheir own version, first seen Nov 8, 2026
- kazemcodes/skill-treetheir own version, first seen Nov 8, 2026
- sergvss/agents-best-teamstheir own version, first seen Nov 1, 2026
- slowernet/dietpowerstheir own version, first seen Oct 4, 2026
- Chrike/coding-agent-skillstheir own version, first seen Aug 4, 2026
- jnsfhrmnn/jf-agentic-coding-starter-kittheir own version, first seen Jul 18, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- LARi-UQAC/ResearchTools★ 14same name
- ariadoss/superskills★ 12same name
- KhaledSaeed18/dotclaude★ 5same name
- sergvss/agents-best-teams★ 2same name
- Chrike/coding-agent-skills★ 1same name
- jnsfhrmnn/jf-agentic-coding-starter-kit★ 1same name
- kazemcodes/skill-tree★ 1same name
- slowernet/dietpowers★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- check-consistencySkill
- adopt-brownfieldSkill
- atomic-designSkill
- code-reviewSkill
- deutschland-stack-apiSkill
- document-releaseSkill
- european-alternatives-apiSkill
- grillSkill
- handoff-sessionSkill
- init-projectSkill
- minimal-codeSkill
- office-hoursSkill
- oss-projectSkill
- plan-ceo-reviewSkill
- plan-eng-reviewSkill
- plan-milestoneSkill
- plan-taskSkill
- quick-taskSkill
- reassess-roadmapSkill
- reconcileSkill
- resume-sessionSkill
- retroSkill
- shipSkill
- slice-milestoneSkill
- software-craftsmanshipSkill
- spawn-milestone-teamSkill
- summarize-taskSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-ytstackSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 70
After option 1 or 2, suggest ytstack:reassess-roadmap when the slice is complete, ytstack:retro when the milestone is complete, …
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ytstack:finish-branch
Thin wrapper around the vendored superpowers finishing-a-development-branch skill (vendor/superpowers/skills/finishing-a-development-branch/SKILL.md). Injects the branch, worktree flag and the slice's summary state, inlines the vendored procedure verbatim, and adds the ytstack rule that .ytstack artifacts are never deleted by the cleanup.
ytstack context (resolved at render time)
# ytstack resolver (M016): checkout = where this shell runs, via the shared lib.
_LIB="${CLAUDE_SKILL_DIR}/../../hooks/lib/git-ctx.sh"
if [ -f "$_LIB" ]; then
. "$_LIB"; yt_git_ctx "$PWD"; yt_resolve_yt_dir >/dev/null
_PROJECT_DIR="$YT_TOPLEVEL"; _YT_DIR="$YT_DIR"; _YT_SCOPE="$YT_SCOPE"; _IS_GIT="$YT_IS_GIT"; _PROJECT_KEY="$YT_REPO_KEY"; _IS_LINKED="$YT_IS_LINKED"
else
# Host did not substitute CLAUDE_SKILL_DIR (e.g. Codex adapter): project scope only.
_IS_GIT=$([ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ] && echo yes || echo no)
_PROJECT_DIR=$(git rev-parse --show-toplevel 2>/dev/null || pwd -P)
_YT_DIR=""; _YT_SCOPE=none; _PROJECT_KEY=""; _IS_LINKED=no
[ -d "$_PROJECT_DIR/.ytstack" ] && { _YT_DIR="$_PROJECT_DIR/.ytstack"; _YT_SCOPE=project; }
fi
cd "$_PROJECT_DIR" 2>/dev/null || true
_PROJECT_SLUG=$(basename "$_PROJECT_DIR")
_BRANCH=$(git branch --show-current 2>/dev/null || echo unknown)
_M=none; _S=none; _T=none
if [ -n "$_YT_DIR" ] && [ -f "$_YT_DIR/STATE.md" ]; then
_M=$(sed -n 's/^current_milestone: *//p' "$_YT_DIR/STATE.md" | head -1)
_S=$(sed -n 's/^active_slice: *//p' "$_YT_DIR/STATE.md" | head -1)
_T=$(sed -n 's/^active_task: *//p' "$_YT_DIR/STATE.md" | head -1)
fi
# Slice summary state: every task in the slice plan needs a non-draft summary before a branch is "done".
_OPEN_TASKS=""; _DRAFT_SUMMARIES=0
if [ -n "$_YT_DIR" ] && [ -f "$_YT_DIR/$_M-$_S-PLAN.md" ]; then
for t in $(grep -oE '^- \[.\] T[0-9][0-9] --' "$_YT_DIR/$_M-$_S-PLAN.md" | grep -oE 'T[0-9][0-9]'); do
f="$_YT_DIR/$_M-$_S-$t-SUMMARY.md"
if [ ! -f "$f" ]; then _OPEN_TASKS="$_OPEN_TASKS $t"
elif grep -q '^closed: draft' "$f"; then _OPEN_TASKS="$_OPEN_TASKS $t"; _DRAFT_SUMMARIES=$((_DRAFT_SUMMARIES+1)); fi
done
fi
echo "HAS_YTSTACK: $([ -n "$_YT_DIR" ] && echo yes || echo no)"
echo "IS_GIT: $_IS_GIT"
echo "IS_LINKED_WORKTREE: $_IS_LINKED"
echo "BRANCH: $_BRANCH"
echo "ACTIVE: $_M-$_S-$_T"
echo "OPEN_TASKS: ${_OPEN_TASKS:-none}"
echo "DRAFT_SUMMARIES: $_DRAFT_SUMMARIES"ytstack invocation notes
You are invoked inside a ytstack project at the end of a branch's work. OPEN_TASKS lists tasks of the active slice without a real summary (missing or still closed: draft); IS_LINKED_WORKTREE says whether this checkout is a linked worktree (the vendored Step 2 detects the same thing from git; both must agree).
HARD-GATE: if IS_GIT=no, abort with "not a git checkout". If OPEN_TASKS is not none, stop before the vendored menu and say which tasks still need ytstack:summarize-task (a draft stub is not a summary). The integration menu comes after the slice is closed on paper, not just in code.
ytstack rules that override nothing in the vendored text but add to it:
- The vendored Step 1 test run is the project's full suite; if the active task plan names a verification command, run that too.
- Cleanup (vendored Step 6) never touches
.ytstack/: if the worktree holds uncommitted.ytstackfiles, option 1 ("commit them") is the only ytstack-sanctioned choice; leftovers are forytstack:reconcile, never for deletion here. - The vendored "discard" path is out of scope for ytstack projects unless the user types
discard; never offer it. - After option 1 or 2, suggest
ytstack:reassess-roadmapwhen the slice is complete,ytstack:retrowhen the milestone is complete,ytstack:shipwhen the user wants the release flow.
Vendored procedure (inlined verbatim)
cat "${CLAUDE_SKILL_DIR}/../../vendor/superpowers/skills/finishing-a-development-branch/SKILL.md"Namespace note (ytstack)
The text above is upstream superpowers content (v7.0.2) rendered inside ytstack. Read superpowers:<skill> as ytstack:<skill> and invoke the ytstack-namespaced skill via the Skill tool. Relative links resolve under vendor/superpowers/skills/finishing-a-development-branch/ in the ytstack plugin directory (${CLAUDE_SKILL_DIR}/../../vendor/superpowers/skills/finishing-a-development-branch/). "Superpowers created this worktree" (vendored Step 6) also covers worktrees created by ytstack:spawn-milestone-team under .claude/worktrees/; the refusal rule (never --force) applies unchanged.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

