Finishing A Development Branch logo

Finishing A Development Branch

CommunityPopular
GanyuanRan
finishing-a-development-branch

Use when verified work needs integration or cleanup of an existing task-created branch/worktree, or the user explicitly requests merge, PR, or branch lifecycle handling.

Overview

PublisherGanyuanRan
RepositoryAegis
Skill namefinishing-a-development-branch
Stars
1.2K
Forks
52
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by GanyuanRan on GitHub. Read the source before you install it.

Installation

Install the Finishing A Development Branch AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GanyuanRan/Aegis.git /tmp/Aegis
mkdir -p .claude/skills
cp -r /tmp/Aegis/skills/finishing-a-development-branch .claude/skills/finishing-a-development-branch
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Finishing A Development Branch in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Finishing A Development Branch on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Finishing A Development Branch is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Finishing a Development Branch

Overview

Integration choice and checkout lifetime are separate. Verify first, mutate only task-owned resources, then prove what was removed or retained.

Core principle: fresh evidence -> authorized integration -> ownership-aware cleanup -> Git/path readback.

Announce at start: explain which branch/worktree lifecycle is being closed.

Step 1: Environment and Ownership Detection

Read the task's TaskStartSnapshot and current repository state. Record:

  • root, HEAD, branch/detached state, upstream divergence, and active Git ops;
  • staged/unstaged/untracked paths and the task-owned delta;
  • git worktree list --porcelain;
  • branch/worktree creator, task ownership, base branch, and cleanup trigger.

Stop on conflicts, detached state, failed verification, dirty/untracked state in a cleanup target, or unknown ownership. Do not infer the base from the names main or master; use task records, repository authority, or explicit user direction. Never auto-stash, reset, clean, pull, rebase, amend, force-push, or bypass hooks.

If no task-created branch/worktree exists and integration was not requested, skip this workflow: report the local task commit plus Task clean and Repository clean; do not invent merge/PR ceremony.

Step 2: Fresh Verification

Run the smallest current-authority test set that proves the completed task. If it fails, preserve all work and return to diagnosis. Do not present the branch as ready.

Step 3: Choose the Authorized Outcome

When a task branch actually needs disposition, present only applicable choices:

  1. merge into the recorded base locally;
  2. push and create/update a PR;
  3. keep the branch for later integration;
  4. discard the exact task-owned branch/worktree.

Push, PR, remote deletion, release, and force operations require explicit user authorization. Discard requires a fresh, exact typed confirmation naming branch, worktree path, and commits/delta to lose. Generic agreement is insufficient.

Step 4: Execute Without Hidden Mutation

Local merge

Verify the target checkout is safe, switch to the recorded base, merge without an implicit pull, and rerun verification on the merged result. If integration or verification fails, preserve both histories and stop.

Push or PR

Push only the authorized task branch and create/update the PR with summary and fresh test evidence. PR creation does not itself prove merge and does not require the temporary worktree to remain.

Keep branch

Retain the branch. Remove a clean task-created temporary worktree by default; retain it only for an explicit ongoing-checkout need and report why.

Discard

After exact confirmation, remove only the named clean task-owned worktree, then the named branch. If either differs from the confirmation, stop and ask again.

Step 5: Prove Integration Before Branch Deletion

Use evidence matching the merge strategy:

  • merge/fast-forward: prove the task tip is an ancestor of the recorded base;
  • squash/rebase: use fresh PR merge metadata plus strategy-appropriate patch equivalence (git cherry for rebased commits; stable patch-id or bounded changed-path/tree comparison for squashes), not an ancestor-only test;
  • unmerged/open PR: keep the branch unless discard was exactly confirmed.

Never delete a branch merely because a PR was opened or a similarly named commit exists.

Step 6: Cleanup in Dependency Order

For a clean task-owned resource:

  1. move to another safe registered checkout; never remove the current working directory;
  2. remove/unregister the worktree first with git worktree remove <exact-path>;
  3. read back git worktree list --porcelain;
  4. verify the exact path no longer exists;
  5. only then delete an integrated or exactly confirmed branch;
  6. read back branch refs, HEAD, and repository status.

Do not use routine --force, global git worktree prune, wildcard deletion, or cleanup of resources absent from the task ownership record. On Windows, Git may unregister a worktree while its directory remains locked: re-check registration and the exact resolved path, remove only a proven task-owned clean residual when safe, otherwise retain it and report the lock/path. Never widen deletion scope.

Final Git Receipt

Report:

  • current branch and commit SHA/message, or the reason no commit exists;
  • Task clean: yes|no and Repository clean: yes|no independently;
  • branch/worktree created, removed, or retained, with evidence/reason;
  • integration evidence and any remaining user action.

Task clean means no uncommitted task-owned delta remains. Repository clean means no staged, unstaged, or untracked repository state remains.

This is a local Git receipt, not authoritative completion or merge truth beyond the evidence read back.

Integration

Called only when branch/worktree integration or explicit lifecycle handling is in scope. Pairs with using-git-worktrees and verification-before-completion.

Frequently asked questions

What does the Finishing A Development Branch AI skill do?

Use when verified work needs integration or cleanup of an existing task-created branch/worktree, or the user explicitly requests merge, PR, or branch lifecycle handling.

Why use Finishing A Development Branch on TypingMind?

Because you install it once and use it with any model. Finishing A Development Branch is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Finishing A Development Branch in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/GanyuanRan/Aegis/tree/main/skills/finishing-a-development-branch. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Finishing A Development Branch?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Finishing A Development Branch?

As many as you like. As long as a model supports skills, you can use Finishing A Development Branch with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Finishing A Development Branch AI skill free?

Yes. It is published on GitHub by GanyuanRan under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇