git-flow
Skill1 starsChanged 9 days agoMITView on GitHub
Use when changes are ready to ship and you need to go from working tree to pull request — staging, reviewing, conventional commit, version bump, and PR. Triggers include "commit and open a PR", "ship this", "create the PR", finishing a feature/fix, or preparing a release.
- Reads credentials
- Commits and pushes
9 other projects use a version of this.
Adopted by
Most recently taken up by
- ngxccc/engineered-skillstheir own version, first seen Nov 29, 2026
- camilooscargbaptista/cto-toolkittheir own version, first seen Nov 29, 2026
- abhattacherjee/git-flowtheir own version, first seen Nov 22, 2026
- halkn/skillstheir own version, first seen Nov 22, 2026
- vindreshsingh/engineering-skillstheir own version, first seen Oct 20, 2026
- evenweiss/ai-skillstheir own version, first seen Oct 15, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- camilooscargbaptista/cto-toolkit★ 9same name
- ch4570/vulpora★ 2same name
- techbuzzz/awesome-opencode★ 2same name
- kennguyen887/agent-foundation★ 1same name
- abhattacherjee/git-flow★ 0same name
- evenweiss/ai-skills★ 0same name
- halkn/skills★ 0same name
- ngxccc/engineered-skills★ 0same name
- vindreshsingh/engineering-skills★ 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 repository4 other files it gives its agents.
- docs-syncSkill
- pr-reviewSkill
- retroSkill
- ui-ux-scoutSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 52
If no source records a version, start from 0.1.0 and create CHANGELOG.md.
- Distinctive: line 53
Staging: only stage the reviewed files plus the docs you updated.
- Very specific: line 85
Remote: never hardcode origin. Resolve the push remote from git remote -v — prefer the current branch's upstream if one is set, else the …
- Distinctive: line 96
Run in order. Stop and report if a precondition fails.
- Distinctive: line 114
If already on a work branch, keep it.
- Very specific: line 156
Only the release PR (chore(release): vX.Y.Z) computes the version, from every [Unreleased] entry (any feat or breaking change → per the …
- Very specific: line 192
A PR may already exist: If gh pr list --head <branch> returns one, do not create another: push, and update that PR's body wherever a number …
- Very specific: line 212
After creating it, report the URL and gh pr checks.
“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
git-flow
Overview
A guided workflow that takes changes from the working tree to a pull request, following consistent conventions: branch naming, code review, Conventional Commits, automatic SemVer, and a PR template. Guided, not blind — confirm with the user at the review, doc-update, and PR steps.
When to Use
- Changes are done and ready to be committed and shared.
- User says "ship this", "commit and open a PR", "create the PR".
- A feature or fix is finished and needs a branch + commit + PR.
Skip when: the user only wants a quick local commit with no review/PR.
Conventions
| Aspect | Rule |
| Branch | type/description, kebab-case (e.g. feat/login-form) |
| Commit | Conventional Commits, in English |
| Types | feat, fix, docs, style, refactor, perf, test, build, ci, chore |
| SemVer (≥ 1.0) | feat → minor · fix → patch · BREAKING CHANGE (or !) → major |
| Other types | docs/style/refactor/perf/test/build/ci/chore → patch |
SemVer (0.x) | BREAKING → minor (0.y→0.(y+1), resets patch) · everything else → patch |
| PR base | develop if that branch exists (local or on the remote), else main |
| Tag | Created after the PR merges, and only if that merge's base was main — a merge into develop is not a release, see step 10 |
| PR | Via gh, ask before creating |
Rules & tie-breakers
- One authoritative type. Classify the change ONCE (step 2). That type drives the branch name, the commit, and the SemVer bump. They must agree.
- Mixed changes: pick the highest-impact type for the version
(
BREAKING>feat>fix> everything else). If the diff contains clearly separate logical changes, make separate commits; otherwise one commit. - Pre-1.0 (
0.x.y): SemVer is still unstable, so the normal table does NOT apply. ABREAKING CHANGE/!bumps the minor (0.2.3→0.3.0);feat,fix, and every other type bump the patch (0.2.3→0.2.4). Use the ≥ 1.0 rules only once the project actually reaches1.0.0. - Branch description: kebab-case derived from the commit subject, ≤ 5 words
(e.g. subject "add token refresh on 401" →
feat/token-refresh). - Version source precedence:
package.json→VERSION→ latestgit tag→CHANGELOG.md. Strip a leadingv. If two sources disagree, use the highest. If no source records a version, start from0.1.0and createCHANGELOG.md. - Staging: only stage the reviewed files plus the docs you updated. Never
git add -A/git add .blindly. - Files that never go in a commit:
.envand.env.*(except.env.example), private keys and certificates (*.pem,*.key,*.p12,*.pfx,*.jks),credentials*.json,.claude/settings.local.json,.gemini/,.agents/, and any file the project's context file (GEMINI.md,AGENTS.md, orCLAUDE.md) lists as secret. If one is in the changes, stop: leave it unstaged and tell the user (add it to.gitignoreif it belongs there). A value that looks like a secret inside a tracked file (a token, a password, a connection string with credentials) also stops the run. Name the file and line, never the value. A secret that already reached a pushed commit is public even after it is deleted: it must be rotated, and saying so is part of the stop. - Linking issues. The PR body names its issue:
Closes #Nonly when every acceptance criterion is met,Refs #Notherwise (saying which criteria stay open). Closing keywords act only on the default branch: a PR merged intodevelopcloses nothing, so the issue is closed by hand once validated. And because merge commits keep the feature commits, aCloses #Nwritten in a commit message closes the issue later, when the release reachesmain— preferRefs #Nin commits. In a release PR body (develop→main), any closing keyword closes its issue on merge, even inside a quote or an instruction: write one only if you mean it. - After a review, add commits; don't rewrite. Once a PR has been reviewed,
a rebase changes the SHAs the re-review starts from (
git log <reviewed-sha>..HEAD). Fix with new commits, and bring the base in with a merge. When a rewrite is unavoidable (gh stack syncon a stack), push with--force-with-lease, never--force. - Breaking changes say how to migrate. A change that breaks a public
contract (an API field removed or renamed, a changed error code or default,
a config variable renamed, a migration consumers must run) takes
!after the type (feat!:) and aBREAKING CHANGE:footer that says what broke and what a consumer has to do. The same text goes in the PR body. A!without the migration note is not done. - Remote: never hardcode
origin. Resolve the push remote fromgit remote -v— prefer the current branch's upstream if one is set, else the sole remote, else ask which to use. Some repos push through an SSH-alias remote (e.g.git@host-alias:org/repo.git) whose name is notorigin. Use the resolved remote name for the push (step 9) and the post-merge tag (step 10). - Changes = tracked modifications (staged or unstaged) and/or new files. Whitespace-only or no changes → stop, except the release PR of a batch-release project, which starts from a clean tree (step 6).
Workflow
Run in order. Stop and report if a precondition fails.
- Detect context —
git status/git diff; stop if no changes (except for the release PR of a batch-release project, which starts from a clean tree: step 6 creates its edits). Detect version files (package.json,VERSION,CHANGELOG.md,README.md). Resolve the push remote (git remote -v; see the Remote rule). Detect whether adevelopbranch exists (git show-ref --verify --quiet refs/heads/developorrefs/remotes/<remote>/develop) — if so, it's the PR base for this run (GitFlow repo); otherwise the base ismain. The release PR of a batch-release project always targetsmain(step 6). Checkgh auth status. Sort the changed files into source, tests, docs, config, and the three that change the deploy: migrations, contract artifacts (OpenAPI, schemas) and environment variables. Any of those three makes the PR body carry a Deploy & rollback section (step 9). - Classify — pick the one Conventional Commit type and the SemVer bump (see Conventions + tie-breakers).
- Create branch — if on
main/master,git switch -c type/description. If already on a work branch, keep it. - Code review — if the project's context file (
CLAUDE.md,AGENTS.md,GEMINI.md) requires/pr-reviewon every PR, that review is the gate: this step only checks that the diff does one thing (the split below), with no ad hoc review and no confirmation asked for it. Otherwise, review the diff for bugs, convention issues, and simplifications; show findings and continue after the user's OK. If the diff holds changes that can be reviewed and reverted on their own (a refactor plus a feature, a backend change plus an unrelated UI fix), propose splitting them before committing: one branch each, stacked (gh stack add) when one builds on the other. Size alone is not the reason; the reason is that a reviewer cannot judge, or a revert cannot undo, one without the other. - Verify — the suite runs once per tree. If CI runs it on the PR, or
the author already has its real output for this same tree (no edits
since), don't re-run it: run only the fast lint and typecheck if the
project has them (same stop rule as below), and the PR body carries the suite evidence (the CI
check, or the attached output with its success line). Otherwise, detect
the project's test/lint command and run it (see
references/verify-commands.mdfor the per-ecosystem mapping). Prefer a command the repo already defines (scripts,Makefiletargets, CI) over a generic guess. Stop and report if it fails; continue once green. Judge it by its exit code and its own success line (BUILD SUCCESSFUL,ok,0 failed), read in the full output: never pipe it through| tailor| grepwithoutset -o pipefail, which hides a failing exit code behind the filter's success. A check that passes locally but depends on the real environment (a staging service, an external API, a deploy) is reported as "passes locally", not as verified. If the project has no test/lint setup, say so and move on — don't fabricate a command. - Compute version — batch-release projects skip this step. If the project's
context file (or a delivery doc it links, e.g.
docs/delivery-process.md) says versions are bumped once per batch by a release PR, a story PR does not touch the version: step 7 only adds its entry under## [Unreleased](create that heading if missing). With several PRs open on[Unreleased]at once, suggestCHANGELOG.md merge=unionin.gitattributes, so parallel entries merge without conflicts. Any merge ofCHANGELOG.mdis verified, union or not, because a clean merge after a release (a new## [X.Y.Z]under[Unreleased]) can file this PR's entries inside the released section, or leave a released entry under[Unreleased]:git diff <remote>/<base> -- CHANGELOG.mdmust show only this PR's lines, all added under[Unreleased], with no released section touched and no heading duplicated. Only the release PR (chore(release): vX.Y.Z) computes the version, from every[Unreleased]entry (anyfeator breaking change → per the project's rule), renames[Unreleased]to[X.Y.Z] - dateand updates the version files; its tag is created after merge (step 10, or a release-tag workflow if the repo has one). The release PR always targetsmain: in a repo withdevelop, it is the promotion PR (develop→main, or arelease/vX.Y.Zbranch cut fromdevelop), not a PR intodevelop. Otherwise, read the current version per precedence, then apply the bump withscripts/next-version.sh <current> <type>(the canonical, tested implementation of the SemVer table, including the0.xrule). The Conventions table stays the human-readable reference. - Validate & update docs — list the files to update and show the user
before staging:
CHANGELOG.md: add## [X.Y.Z] - YYYY-MM-DDwith the right section (Added/Changed/Fixed/etc.); replace an[Unreleased]block if present.- Version in
package.json/VERSIONif they exist. README.mdonly if the change affects documented behavior. Apply after confirmation.
- Stage & commit —
git addthe relevant files; Conventional Commit message in English. Before committing, checkgit diff --cached --name-onlyagainst Files that never go in a commit and stop if one is there. Shape of the message:- Match the history first (
git log --no-merges --format=%s -30): whether it uses scopes, and its usual subject length. Scope optional (derive from path only if obvious). - Subject in the imperative, lowercase after the type, no trailing period.
- A body only when the diff does not explain itself (a workaround, a trade-off, an alternative rejected): it says why, since the diff already says what.
- Issue references in footers (
Refs #N), never in the subject. See Linking issues before writing a closing keyword in a commit.
- Match the history first (
- Push & PR (ask first) — first
git fetch <remote> <base>and check that the branch merges cleanly into it (git merge-tree --write-tree <remote>/<base> HEADexits non-zero on a conflict). On a conflict, stop and tell the user: bring the base in (merge it if the PR was already reviewed, see After a review) and verify again before the PR, so the reviewer is not handed a diff that is about to change. Then:- A PR may already exist. If
gh pr list --head <branch>returns one, do not create another: push, and update that PR's body wherever a number or claim changed. - A branch in a stack (
gh stack viewlists it) goes up withgh stack submit, which pushes every layer and sets each base; don'tgh pr createit by hand. The rest of this step still applies: show the body and ask before submitting, then set each new PR's body from the template withgh pr edit <n> --body-file <path>. - Otherwise
git push -u <remote> <branch>(the remote resolved in step 1). - Body: the repo's own template wins (
.github/PULL_REQUEST_TEMPLATE.md,.github/pull_request_template.md,.github/PULL_REQUEST_TEMPLATE/); elsereferences/pr-template.md; else a minimal Summary/Changes/Verification/Version body. Fill Verification with the commands actually run and their counts, Linked issue per Linking issues, and Deploy & rollback when step 1 found a migration, a contract artifact or an environment variable. - PR base is the branch resolved in step 1 (
developif it exists, elsemain; the release PR of a batch-release project alwaysmain), title = commit subject. Show the body and ask before creating. On confirmation:gh pr create --base <resolved base>. Ifghis unavailable, output the body and the compare URL instead. - After creating it, report the URL and
gh pr checks. If the project's context file (GEMINI.md,AGENTS.md, orCLAUDE.md) requires a review, hand the PR to it: never call it ready to merge yourself.
- A PR may already exist. If
- Tag after merge — once the PR is merged, tag only if its base was
main, and only the exact merge commit. Tag the remote ref, not a local branch:git fetch <remote> main --tags, check that the checks on<remote>/mainare green (gh pr checkson the merged PR, or the commit's status), thengit tag -a vX.Y.Z -m "vX.Y.Z" <remote>/mainandgit push <remote> vX.Y.Z. A localmainmay be stale or checked out in another worktree (git switch mainthen fails); the remote ref is the release. Skip if the tag already exists, or if a workflow in the repo creates it on merge (an auto-tag action). If the base wasdevelop, don't tag here — that merge is an integration step, not a release; the tag happens later whendevelopis promoted tomain(release/hotfix branch), which is outside this skill's scope. In a batch-release project, only the release PR is tagged: story PRs never are, even when they merge intomain.
Common Mistakes
- Tagging on the feature branch — the tag goes on
mainafter merge (step 10). - Bumping the version in a story PR of a batch-release project — stories add an
[Unreleased]entry only; the release PR bumps once per batch. - Tagging a
developmerge — only tag when the PR's base wasmain; a merge intodevelopis an integration step, not a release. - Hardcoding PR base to
main— detect adevelopbranch first (step 1); GitFlow repos merge feature branches intodevelop, notmain. - Committing on
main— branch first (step 3) unless already on a work branch. - Assuming
package.json— follow the version-source precedence; detect first. - Hardcoding
origin— resolve the real remote (step 1); some repos use an SSH-alias remote. - Over-bumping a
0.xproject — pre-1.0,featis a patch and a breaking change is a minor. - Skipping tests — run the project's test/lint command (step 5) before committing, or cite the CI run or the attached output for this same tree.
- Trusting a filtered output —
./gradlew test | tailexits 0 even when the build failed; read the success line or useset -o pipefail. - Committing a secret — check the staged names (step 8); deleting it in a later commit does not unpublish it.
!without a migration note — a breaking change needs theBREAKING CHANGE:footer saying what consumers must do.- Opening a PR that conflicts with its base — check with
git merge-treefirst (step 9). - Rebasing a reviewed PR — add commits and merge the base instead; the re-review needs the SHAs it already saw.
Closes #Non a PR intodevelop— it closes nothing on merge; close the issue by hand after validating it, and useRefs #Nin commit messages.- A second PR for the same branch — check
gh pr list --head <branch>first and update the existing one. - Tagging a local
main— it may be stale or held by another worktree; tag<remote>/mainafter fetching. git add -A— stage only reviewed + updated files.- Spanish commit/PR text — commits and PR are English; only the chat is Spanish.
- Staging before showing doc updates — show changes in step 7 before
git add.
PR Template
See references/pr-template.md.
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.

