/trunk-based:trunk-basedfrom trunk-based
Works in a repo that practises trunk-based development (one trunk, commits straight to main or short-lived branches of a day or two, feature flags, branch by abstraction, late-cut release branches with cherry-picks from trunk, tags on trunk). Use when asked for "trunk-based", "trunk based development", "short-lived branches", "feature flag unfinished work", "branch by abstraction", "release branch cherry-pick", "release from trunk", or "which branching model should we use". Not for git-flow or develop-branch repos (git-flow), HubFlow (hubflow), commit messages or branch names (git-commit), history spelunking (git-history) or GitHub releases (gh-release).
Ships in trunk-based. 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.
One branch, main (the trunk), that everyone integrates into at least daily. Optional short-lived branches. Unfinished work is hidden, not parked on a long-lived branch.
git status first.git-commit skill when it is installed.Use it when the team deploys continuously from one main branch, one version runs in production, branches last hours to a couple of days, unfinished work sits behind flags, and fast CI gates every merge. DORA calls it a required practice for CI.
Suggest a different model when:
git-flow (git-flow-next). Note the sources disagree: trunkbaseddevelopment.com says Git Flow is incompatible with TBD, while git-flow's author says it still fits versioned software. TBD would release such software from trunk tags and release branches instead.[hubflow] config: the hubflow skill.Do not restructure a repo's branching uninvited; suggest.
git config --get-regexp '^(gitflow|hubflow)\.' # any output: git-flow family, not this model
git ls-remote --heads origin | awk '{print $2}' | sed 's#refs/heads/##' | sort
git log --oneline -20 origin/main # linear, small commits or squash merges
git for-each-ref --sort=-committerdate refs/remotes/origin --format='%(committerdate:short) %(refname:short)'
grep -rnE 'develop|release/|hotfix/' .github/workflows .gitlab-ci.yml 2>/dev/null
develop plus release/hotfix branches, [gitflow] config, or weeks-old feature branches: not trunk-based. Say so and defer to git-flow or hubflow when installed; do not impose this skill.main, short-lived branches, CI on main (maybe merge queue), flag libraries in dependencies, cherry picked from commit lines on release/*: trunk-based, proceed.release/* branches never merged back to main is the branch-for-release pattern, not git-flow.More signals: references/detection.md.
Pick the style the repo already uses.
Straight to trunk (small teams, fast thorough builds; pairing counts as review):
git pull --rebase origin main # sync
# run the same build/tests CI runs, locally
git push origin main # ask first
Risks: semantic conflicts that merge cleanly but break the build; teammates pulling a broken commit before CI flags it. Revert a broken trunk commit immediately (git revert <sha>), do not leave it red.
Short-lived branch (the norm at scale):
git switch -c fix-login --no-track origin/main
git pull --rebase origin main # sync often
# full local build/tests, then git push -u origin HEAD and open a PR (ask first); merge the same day; delete the branch
Pick from the repo's practice; see references/release.md for the exact plain-git sequences.
release/X.Y just in time, a few days before the release, from a chosen commit (not necessarily HEAD) or from the release tag. Fix on trunk first, with a test, then git cherry-pick -x to the release branch. Fix on the release branch only when the bug cannot be reproduced on trunk, and then cherry-pick it back to trunk. Never merge the release branch back into trunk. Run the trunk CI pipeline on active release branches. Delete the branch once it is out of production, after tagging the released commit.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin trunk-based