git-workflow
Skill1 starsChanged 2 months agoMITView on GitHub
Enforces the release-branch Git model: scaffold feature branches, open PRs with review checks, cut releases with tags, and view workflow reference.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
188 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- juninmd/skillstheir own version, first seen Nov 8, 2026
- jDxve/avengers-kittheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- haythamasalama/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use squad-commands, ci-cd-pipelines and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkillsquad-commands
Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.
Also in 5 projects that use this
harrissohail6Skillci-cd-pipelines
CI/CD pipeline design and implementation. Auto-activates when discussing deployment, automation, or pipelines.
Also in 6 projects that use this
Microsoft AzureSkillarchitectural-proposals
How to write comprehensive architectural proposals that drive alignment before code is written
Also in 4 projects that use this
GitHubSkille2e-template-testing
End-to-end validation of coordinator and agent template changes
Also in 3 projects that use this
GitHubSkillnotification-routing
Route agent notifications to specific channels by type — prevent alert fatigue from single-channel flooding
Also in 3 projects that use this
frostneySkillnative-nostalgia-stack
Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.
Also in 3 projects that use this
- +5 more from Azure
- +1 more from github
Other versions188 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 188
- langfuse/langfuse★ 37ksame name
- modelcontextprotocol/typescript-sdk★ 14ksame name
- JetBrains/ideavim★ 10ksame name
- jokob-sk/NetAlertX★ 7.4ksame name
- netalertx/NetAlertX★ 7.4ksame name
- Galaxy-Dawn/claude-scholar★ 5.9ksame name
- github/gh-aw★ 5.6ksame name
- modelcontextprotocol/csharp-sdk★ 4.6ksame name
- antonbabenko/pre-commit-terraform★ 3.8ksame name
- github/squad★ 3.4ksame name
178 more not listed
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 repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- adrSkill
- api-designSkill
- architecture-designSkill
- architecture-reviewSkill
- best-practicesSkill
- changelog-generatorSkill
- code-reviewSkill
- database-designSkill
- dependency-auditSkill
- doc-refreshSkill
- example-skillSkill
- full-security-reviewSkill
- golden-rulesSkill
- incident-reportSkill
- log-correlationSkill
- mvp-readinessSkill
- onboardingSkill
- pre-commitSkill
- requirements-generatorSkill
- test-writerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
41 rules. 0 are common, 30 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
30
Distinctive
This author's own choices. Worth a look.
11
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
- Distinctive: line 14
Never commit or push directly to
main: If the current branch is main, stop and create a new branch before making any changes. - Distinctive: line 16
All changes must reach main via a PR from a release branch.
- Distinctive: line 20
When invoked, ask the user what they want to do (if not already specified):
- Distinctive: line 42
Use Bash to fetch, confirm a clean working tree, and identify the current release branch:
- Very specific: line 50
No-release-branch fallback: If the command above returns no output (no release/* branch exists), fall back to branching from main and …
- Distinctive: line 60
Use Bash to create and check out the branch from the freshly fetched release branch (the fetch in step 1 keeps the base current):
- Distinctive: line 67
Never commit directly to main or the release branch.
- Distinctive: line 74
Use Bash to check the current branch and recent commits:
- Very specific: line 80
Use Glob to check if handoffs/reviews/ exists.
- Distinctive: line 82
Use Bash to identify the target release branch (same detection as Action (b).
- Very specific: line 88
Use Read to check handoffs/plans/ for context to include in the PR description.
- Very specific: line 95
If gh is not available, print the PR body for the user to paste manually.
- Distinctive: line 101
Use Bash to confirm the current release branch is clean and all PRs are merged:
- Very specific: line 107
Ask the user for the version tag (e.g.
- Very specific: line 113
If gh is not available, print the PR body and ask the user to open the PR manually.
- Distinctive: line 115
After the PR is approved and merged, tag the release on main.
- Distinctive: line 122
Use an annotated tag: it records the tagger, date, and message, and git describe ignores lightweight tags by default.
- Distinctive: line 130
Use Bash to identify all conflicted files:
- Distinctive: line 136
Use Bash to fetch the latest remote state and show how far behind the current branch is:
- Distinctive: line 143
Ask the user whether to rebase or merge to incorporate upstream changes, and explain the tradeoffs:
- Distinctive: line 147
Wait for the user's choice before proceeding.
- Very specific: line 157
After all conflicted files are resolved, use Bash to stage only the resolved files by name (never git add ., which would sweep untracked …
- Distinctive: line 158
If rebase was chosen:
- Distinctive: line 163
If additional conflict rounds occur, repeat steps 4–5 for each round until the rebase completes.
- Distinctive: line 164
If merge was chosen:
- Distinctive: line 170
Use Bash to confirm the branch is clean and ready to push:
- Distinctive: line 175
Verify there are no remaining conflict markers and the working tree is clean.
- Very specific: line 176
If rebase was used, a force-push is required: git push --force-with-lease origin <branch>.
- Very specific: line 177
If merge was used, a regular push is safe: git push origin <branch>.
- Distinctive: line 183
Use Bash to list all stashes:
- Distinctive: line 187
If the list is empty, inform the user and stop.
- Distinctive: line 200
Ask the user which stash number (N) to inspect.
- Distinctive: line 208
Ask the user which stash number (N) to apply.
- Distinctive: line 212
After applying, check for conflicts:
- Very specific: line 216
If any conflicts are present (files show both modified or similar), inform the user and run Action (e) to resolve them.
- Distinctive: line 220
Ask the user which stash number (N) to pop.
- Distinctive: line 224
After popping, check for conflicts the same way as sub-action (ii).
- Distinctive: line 228
Ask the user which stash number (N) to drop.
- Distinctive: line 246
After any sub-action completes, run git stash list again and show the user the updated stash state.
- Very specific: line 292
Document the chosen merge style in docs/assumptions.md at project start.
- Distinctive: line 300
After completing any action, confirm:
“Common” is measured: kept by at least 6 in 10 of the 165 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 Workflow — Release-Branch Model
Enforce the release-branch Git model and help execute the correct git operations for your current context: start new work, open a PR, cut a release, or view the workflow reference.
Hard Rules (always enforced, no exceptions)
- Never commit or push directly to
main. If the current branch ismain, stop and create a new branch before making any changes. - Never force-push to
main. - All changes must reach
mainvia a PR from a release branch.
Instructions
When invoked, ask the user what they want to do (if not already specified):
"What would you like to do? (a) View the Git workflow reference (b) Start new work — scaffold a feature or fix branch (c) Open a PR for the current branch (d) Cut a release — merge release branch to main and tag (e) Resolve a merge conflict on the current branch (f) Manage stashes — list, view, apply, or drop stashes"
Then execute the appropriate action below.
Action (a) — View Workflow Reference
Print the full Git Workflow Reference section below.
Action (b) — Start New Work
Use Bash to fetch, confirm a clean working tree, and identify the current release branch:
git fetch origin git status --porcelain git for-each-ref --sort=-v:refname --count=1 --format='%(refname:lstrip=3)' 'refs/remotes/origin/release/*'If
git status --porcelainprints anything, stop and ask the user to commit or stash first. The last command prints the highestrelease/*branch by version order (for examplerelease/1.10, notorigin/release/1.10), so it can be used directly as<release-branch>. It only matches branches underrelease/, unlike a plaingrep release.No-release-branch fallback: If the command above returns no output (no
release/*branch exists), fall back to branching frommainand targetmainfor the PR. Inform the user:"No release branch found. Branching from
mainand the PR will targetmaindirectly. This is normal for simple repos and early-stage projects that do not yet use the release-branch model." In this case, replaceorigin/<release-branch>in step 4 withorigin/main, and use--base mainin thegh pr createcall in Action (c).- Ask the user:
- Is this a new feature or a bug fix? (determines
feature/vsfix/prefix) - What is the task ID or short description? (e.g.
task-042,login-crash)
- Is this a new feature or a bug fix? (determines
- Construct the branch name:
feature/task-XXX-short-descriptionorfix/task-XXX-short-description. - Use Bash to create and check out the branch from the freshly fetched release branch (the fetch in step 1 keeps the base current):
Without the fetch, a stale remote-tracking ref would create the branch off an old tip.git checkout -b <branch-name> origin/<release-branch> - Confirm the branch was created and remind the user:
- Never commit directly to
mainor the release branch. - Open a PR from this branch into the release branch when work is complete.
- Never commit directly to
Action (c) — Open a PR
- Use Bash to check the current branch and recent commits:
git branch --show-current git log --oneline -10 - Use Glob to check if
handoffs/reviews/exists. If it does, use Read on any open review artifacts to check for unresolved findings withseverity: critical | severe | moderate. If any exist, block the PR and inform the user these must be resolved first. - Use Bash to identify the target release branch (same detection as Action (b); fall back to
mainif it prints nothing):git fetch origin git for-each-ref --sort=-v:refname --count=1 --format='%(refname:lstrip=3)' 'refs/remotes/origin/release/*' - Use Read to check
handoffs/plans/for context to include in the PR description. - Produce a PR description with: summary of changes, related task IDs, testing notes. Push the branch first so the PR has a head on the remote, then use Bash:
Ifgit push -u origin "$(git branch --show-current)" gh pr create --title "<title>" --body "<description>" --base <release-branch>ghis not available, print the PR body for the user to paste manually.
Action (d) — Cut a Release
- Use Bash to confirm the current release branch is clean and all PRs are merged:
git status git log --oneline origin/main..HEAD - Ask the user for the version tag (e.g.
1.0.0). - Open a release PR from the release branch into
main— all changes reachmainvia PR, including releases:
Ifgh pr create --base main --head release/<version> --title "Release v<version>" --body "<release summary>"ghis not available, print the PR body and ask the user to open the PR manually. - After the PR is approved and merged, tag the release on
main. Confirm before pushing the tag:
Use an annotated tag: it records the tagger, date, and message, andgit checkout main git pull origin main git tag -a v<version> -m "Release v<version>" git push origin v<version>git describeignores lightweight tags by default. If the user signs tags (git config --get tag.gpgSignprintstrue, or they ask for a signed tag), usegit tag -s v<version> -m "Release v<version>"instead. - Remind the user to invoke
/abd-docs(or the Documentation agent) to create the changelog for this release indocs/CHANGELOG.mdordocs/changelogs/<version>.md.
Action (e) — Resolve a Merge Conflict
- Use Bash to identify all conflicted files:
List each file that showsgit statusboth modified,deleted by us,deleted by them, or any other conflict marker. - Use Bash to fetch the latest remote state and show how far behind the current branch is:
Report how many commits the remote is ahead. If the remote branch no longer exists, note that and continue with local conflict resolution.git fetch origin git log --oneline HEAD..origin/$(git branch --show-current) Ask the user whether to rebase or merge to incorporate upstream changes, and explain the tradeoffs:
- Rebase (
git rebase origin/<branch>): rewrites your local commits on top of the upstream tip, producing a linear history. Best for feature branches that are not shared with others. Avoid rebasing branches that other people have checked out. - Merge (
git merge origin/<branch>): creates a merge commit that preserves the full history of both sides. Safer for shared or long-lived branches where rewriting history would disrupt collaborators.
Wait for the user's choice before proceeding.
- Rebase (
- For each conflicted file identified in step 1:
a. Use Read to display the file and locate the conflict markers (
<<<<<<<,=======,>>>>>>>). b. Explain to the user what each side of the conflict contains:- HEAD (your changes): the lines between
<<<<<<< HEADand=======. - Incoming (their changes): the lines between
=======and>>>>>>> <ref>. c. Ask the user which resolution to apply (keep yours, keep theirs, or combine), or propose a resolution if the intent is clear from context. d. Use Edit to apply the agreed resolution, removing all conflict markers so the file is valid.
- HEAD (your changes): the lines between
- After all conflicted files are resolved, use Bash to stage only the resolved files by name (never
git add ., which would sweep untracked files like build output or.envinto the commit) and complete the rebase or merge:- If rebase was chosen:
If additional conflict rounds occur, repeat steps 4–5 for each round until the rebase completes.git add <resolved-file-1> <resolved-file-2> ... git rebase --continue - If merge was chosen:
git add <resolved-file-1> <resolved-file-2> ... git merge --continue
- If rebase was chosen:
- Use Bash to confirm the branch is clean and ready to push:
Verify there are no remaining conflict markers and the working tree is clean. Remind the user:git status git log --oneline -5- If rebase was used, a force-push is required:
git push --force-with-lease origin <branch>. Only do this if the branch is not shared. - If merge was used, a regular push is safe:
git push origin <branch>.
- If rebase was used, a force-push is required:
Action (f) — Manage Stashes
- Use Bash to list all stashes:
If the list is empty, inform the user and stop.git stash list - Show the stash list to the user and ask what they want to do:
"(i) Inspect a stash — show its diff (ii) Apply a stash — apply without dropping (iii) Pop a stash — apply and drop (iv) Drop a stash — delete without applying (v) Drop all stashes — clear the entire stash list (confirm first)"
Execute the chosen sub-action:
Sub-action (i) — Inspect a stash
Ask the user which stash number (N) to inspect. Then:
git stash show -p stash@{N}Display the diff and provide a plain-language summary of what changes are stashed (files changed, nature of changes).
Sub-action (ii) — Apply a stash
Ask the user which stash number (N) to apply. Then:
git stash apply stash@{N}After applying, check for conflicts:
git statusIf any conflicts are present (files show
both modifiedor similar), inform the user and run Action (e) to resolve them.Sub-action (iii) — Pop a stash
Ask the user which stash number (N) to pop. Then:
git stash pop stash@{N}After popping, check for conflicts the same way as sub-action (ii). If conflicts are found, run Action (e) to resolve them.
Sub-action (iv) — Drop a stash
Ask the user which stash number (N) to drop. Show the stash message and confirm:
"This will permanently delete stash@{N}:
<message>. Confirm? (y/n)"If confirmed:
git stash drop stash@{N}Sub-action (v) — Drop all stashes
Count the total number of stashes and confirm with the user:
"This will permanently delete ALL X stashes. This cannot be undone. Confirm? (y/n)"
If confirmed:
git stash clear- After any sub-action completes, run
git stash listagain and show the user the updated stash state.
Git Workflow Reference
Branch Model
| Branch | Purpose | Rules |
main | Production-ready history | Never commit directly. Only merge from release branches. |
release/<version> | Integration branch per release | Never commit directly. All feature/fix PRs target this. |
feature/task-XXX-description | New work | One per task. Created from the release branch. |
fix/task-XXX-description | Bug fixes | One per issue. Created from the release branch. |
Flow
feature/* or fix/*
↓ (PR)
release/<version>
↓ (PR when release is ready)
main → annotated tag v<version>Who Does What
| Action | Responsible |
| Create feature/fix branch | Planning or Dev agent |
| Open PR | Dev agent (the one that did the work) |
| Code review | Tech Review + Security agents |
| Approve PR | Tech Review + Security; Planning after triage |
| Merge to release | Planning or designated agent |
| Cut release (release → main + tag) | Planning or DevOps |
| Create changelog | Documentation agent |
Naming Conventions
- Feature branches:
feature/task-NNN-short-description - Fix branches:
fix/issue-NNN-short-description - Version tags:
vMAJOR.MINOR.PATCH(e.g.v1.0.0), always annotated (git tag -a) or signed (git tag -s) - Changelog:
docs/CHANGELOG.mdordocs/changelogs/<version>.md
Merge Style
Document the chosen merge style in docs/assumptions.md at project start. Default: merge commit (--no-ff) to preserve branch history.
Changelogs
The Documentation agent creates or updates changelogs in docs/ for each release. Format: version, date, sections for Added / Changed / Fixed / Security, links to PRs or handoff artifacts.
Output Format
After completing any action, confirm:
- What git operations were run (list commands with output).
- The current state of relevant branches.
- What the next step is.
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.

