/apogee:git-flowfrom apogee
Drive the installed git flow binary (AVH Edition) for Git Flow branching: init a repo, start/finish/publish feature and bugfix branches, cut and finish a release with tag and back-merge, ship a hotfix, or open a support branch. Use when asked to run git flow, start or finish a feature/release/hotfix, cut a release, tag a version, or initialize Git Flow. Applies only inside a git repository.
Ships in apogee. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill operates only inside a git repository. Before anything else, check:
!git rev-parse --is-inside-work-tree 2>/dev/null && echo GIT_OK || echo NOT_A_GIT_REPO
If the line above reads NOT_A_GIT_REPO, stop immediately: tell the user
this directory is not a git repository (offer git init -b main, then the initialisation under "Detect first"),
and run none of the commands below.
Drive Git Flow through the installed git flow binary (AVH Edition, resolved from PATH;
git flow version confirms it) — not hand-rolled git merge/tag sequences. The
binary reads branch names and prefixes from local gitflow.* git config and
performs the merge + tag + back-merge + branch-delete steps atomically.
Paths below are relative to the repo root.
Confirm the binary and the repo's configured model before touching branches:
git flow version
git flow config
git status -sb
git flow config is the source of truth for this repo's production branch,
develop branch, and prefixes. If it errors or develop is missing, the repo
is not yet gitflow-initialized. Initialise it with main as the production branch, never AVH's
bare -d default, which picks master on a repo without commits:
prod=main; git show-ref --verify --quiet refs/heads/main || ! git show-ref --verify --quiet refs/heads/master || prod=master
git config gitflow.branch.master "$prod"
git config gitflow.branch.develop develop
git flow init -d
An existing master (and no main) is respected; renaming it is the user's call.
Check for remotes with
git remote. If the output is empty, skippublish,track, and the-p/--pushflags — they need anorigin.
In Apogee projects every unit of work is opened with /apogee:start and closed with
/apogee:finish (feature, bugfix, hotfix, research); releases are cut with /apogee:release.
The raw commands below are what those run: reference material, not something to call directly.
<name> is a slug (PROJ-142-login); <version> is a version (2.4.0).
finish operates on the current branch's type and, by default, merges,
tags (release/hotfix), back-merges, and deletes the branch.
| Action | Command |
|---|---|
Start feature (off develop) | git flow feature start <name> |
Finish feature → develop | git flow feature finish <name> |
| Keep feature branch after finish | git flow feature finish -k <name> |
| Force a merge commit | git flow feature finish --no-ff <name> |
| Switch to a feature | git flow feature checkout <name> |
| List / delete feature | git flow feature list · git flow feature delete <name> |
Start bugfix (off develop) | git flow bugfix start <name> |
Finish bugfix → develop | git flow bugfix finish <name> |
Start release (off develop) | git flow release start <version> |
Finish release (merge main + tag + back-merge) | git flow release finish -m "<msg>" <version> |
| Finish release without a tag | git flow release finish -n -m "<msg>" <version> |
Start hotfix (off main) | git flow hotfix start <version> |
Finish hotfix (merge main + tag + back-merge) | git flow hotfix finish -m "<msg>" <version> |
| Start support branch (off a base) | git flow support start <version> <base> |
| Preview underlying git commands | append --showcommands to any subcommand |
release finish/hotfix finish require a tag message — pass -m "<msg>"
(non-interactive) or they open an editor. support has only start (no finish).
finish. Commit or stash first; finish aborts on a
dirty working tree.finish deletes the branch by default. Pass -k (or --keeplocal) to
keep it; the change is already merged regardless.-n (release: skip tag), -b /
--nobackmerge (skip back-merge into develop).--showcommands prints each underlying
git call so you can confirm the branch pair before it merges.develop and feature//bugfix/ branches are yours to push,
publish, track and delete on the remote without asking. The production branch and tags are
not: no git push origin main, no --tags, no git tag, no git merge while on main.
The hook refuses all of it; don't look for another spelling. No remote → skip publish,
track and -p/--push.main or
develop; always start a feature/bugfix/hotfix/release first. Nothing blocks
you here — the hook that used to DENY this was removed by ADR 0005 because it
duplicated this very line. The rule did not change; only the wall did.git checkout -b feature/..., no
git merge of a gitflow branch, no manual merge into the production branch —
use git flow <type> start|finish so the tag and back-merge happen correctly.release finish / hotfix finish are the operator's. They merge into the production
branch and create the tag; by decision (ADR 0007) an agent never runs them, and the hook denies
them. /apogee:release prepares the branch and prints the three commands for the operator (finish,
push, publish the release).In a beads project (a .beads/ dir at the repo root), a git-flow work branch
maps 1:1 to a br epic — one track == one epic == one feature/bugfix branch.
The link is a convention. Nothing enforces it since ADR 0005 removed the branch gate,
but /apogee:run-plan relies on it to know which epic a branch is finishing:
Name the branch after the epic slug. The epic is created with
br create … --slug <id>; start the branch as git flow feature start <id>
(or bugfix for a bug track) so the branch is feature/<id>.
Record the branch on the epic right after starting it:
br update <epicId> --external-ref <branch> --actor "${BR_ACTOR:-assistant}"
(br never runs git; setting external_ref is a plain metadata write. .beads/ is
local-only in Apogee projects, kept out of git via .git/info/exclude; br sync --flush-only keeps the JSONL current for backups, nothing is committed.)
All steps of the epic (its parent-child children) are implemented and
committed on that one branch, then merged together at git flow feature finish.
Before finish, the epic's steps should all be closed in br — the branch
is the unit that merges, so leaving steps open breaks the 1:1 link.
A PreToolUse hook (plugins/apogee/hooks/git/enforce-git-flow-skill.py) is wired via hooks.json.
git flow release finish / git flow hotfix finish: merges into the production
branch and creates a tag; the operator runs it in a terminal (ADR 0007).git flow feature|bugfix finish tagged APOGEE_RUN_PLAN=1 while the br epic
linked to that branch still has open steps. This applies only to /apogee:run-plan's autonomous
loop, where no human is watching; it fails closed (a br query error refuses the finish).
An interactive finish is not checked at all.main/master (git-flow
config or not): a push whose destination is the production branch in any spelling, a push of
tags, --all/--mirror/force, a merge while the production branch is checked out, git tag <name>. Pushing develop and work branches passes without a question.Everything else this hook used to deny — commits off gitflow branches, manual branch creation, one-branch-at-a-time — is now the Guardrails list above. ADR 0005 has the evidence: those rules were already written here, and duplicating them as hooks bought false positives rather than caught mistakes.
finish creates the tag locally; it does not publish a Release on the hosting platform. After
the tag is pushed, follow these steps to get an actual GitHub/GitLab Release out of it — CI gets
first refusal, gh/glab are the fallback.
Detect host + tool:
git config --get remote.origin.url
github.com in the URL → tool is gh. gitlab in the URL (covers gitlab.com and
self-hosted instances) → tool is glab. Neither → STOP: unsupported host, note that the
release needs to be created by hand if desired.
Detect existing CI auto-publish — if the repo already publishes releases on tag push, don't duplicate it:
.github/workflows/*.yml for a workflow triggered on tag push (on: push: tags: or on: release:) that also creates a release (mentions softprops/action-gh-release,
gh release create, actions/create-release, or a .goreleaser.yml at the repo root)..gitlab-ci.yml for a release: job (GitLab CI's native release keyword).Verify the tag is already on the remote (never push from this step):
git ls-remote --tags origin <tag>
Empty → STOP: "tag not pushed yet — this is pending until git push ... --tags happens."
Check the CLI is installed: command -v gh / command -v glab. Missing → STOP: "install
gh/glab to automate this, or create the release by hand."
Idempotency check — don't recreate or error on a release that already exists:
gh release view <tag>
glab release view <tag>
Exit 0 → a release for this tag already exists. STOP: note it, nothing to do.
Draft the notes, then create the release. If CHANGELOG.md has a ## [<tag>] section,
extract its body and rewrite it into a short, polished release announcement — a lead sentence
summarizing the release's focus, then the highlights organized sensibly. Don't pipe the raw
changelog bullets through verbatim; this is a short writing task, not a file copy. Write the
result to a temp file, then:
gh release create <tag> --notes-file <file> --verify-tag
glab release create <tag> -F <file>
No ## [<tag>] section found → gh release create <tag> --generate-notes --verify-tag
(GitHub generates notes from the commit history via its API); glab has no equivalent flag,
so draft notes the same way from git log <prev-tag>..<tag> --oneline instead.
--verify-tag refuses to invent a new tag from HEAD if the expected tag is somehow missing
on the remote — this step only ever references a tag git flow ... finish already created.
Binary behavior in doubt — validate it in a throwaway sandbox:
bash "${CLAUDE_PLUGIN_ROOT}/skills/git-flow/smoke.sh"
It runs init + a feature round-trip + a release round-trip in a mktemp -d
repo and prints SMOKE OK. Never touches your working tree.
Help/output is in Russian (e.g. «Переключились на ветку…»): the host git
is localized, so git flow status lines and -h text come out localized.
The commands and flags are unchanged; SMOKE OK from the driver is the
source of truth, not the chatter. Force English with LC_ALL=C git flow ….
finish opens vim on a release/hotfix: you omitted -m "<msg>". Re-run
with an explicit message.
Fatal: Not a gitflow-enabled repo yet: initialise as under "Detect first".
The production branch is master, not main, in a repo initialised with bare git flow init -d on zero commits: git branch -m master main && git config gitflow.branch.master main
(and, if it was pushed, git push -u origin main plus deleting the remote master, both the
operator's).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mishagin-dev/apogee --plugin apogee20 skills in this plugin
/ai-clean-roomPersonal black-box clean-room skill: build an independent product that reproduces the functionality of a closed-source reference application using only its public documentation, observed behavior and screenshots, without copying its code, texts, icons, design or name. Manual invocation only (/apogee:ai-clean-room)./brOfficial skill for beads_rust (`br`), a local-first, dependency-aware issue tracker for AI agents. Use when creating issues, triaging backlogs, managing dependencies, finding ready work, updating status, or exporting the local JSONL backup (br sync --flush-only)./cleanupReclaim disk space that agent work leaves behind: linked git worktrees (of the repository and of every submodule), the stale records of worktrees deleted by hand, orphaned worktree directories, and the build directories (Rust target/, DerivedData) that make each copy 5–35 GB. Inventories first with a read-only script, deletes only what the user picks. Use when the disk fills up, when worktrees pile up after parallel agents, or when the user asks to clean up, tidy up or free space, in any language. Offered by the session-start reminder and by /apogee:finish.