git-workflow
Skill0 starsChanged 33 days agoMITView on GitHub
Use when choosing or executing Git-only workflows: branching, staging, commits, signed commits, DCO sign-off, local merge/rebase/squash, conflicts, tags, stashes, reflog recovery, branch cleanup, Git safety checks, or Git-history release prep.
- Deletes or force-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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- apple-app-icon-generatorSkill
- apple-bundle-id-guardrailsSkill
- break-it-downSkill
- css-typography-koSkill
- docs-syncSkill
- flutter-flavorsSkill
- github-workflowSkill
- macos-dev-app-cleanupSkill
- macos-release-reinstallSkill
- prepare-release-githubSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 18 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use for Git operations that affect history, branches, tags, commits, or conflict recovery.
- Distinctive: line 13
Never claim a check passed unless you ran it and can report the command.
- Distinctive: line 14
Avoid direct pushes to protected or shared base branches unless repo guidance and the user explicitly allow it.
- Very specific: line 15
Keep commits atomic: one logical change per commit, no final WIP, fixup, or mixed-change commits.
- Very specific: line 17
Never bypass hooks, signing, or DCO checks (--no-verify, --no-gpg-sign) unless the user explicitly asks.
- Very specific: line 18
Use --force-with-lease, never plain --force, and only after confirming the branch is safe to rewrite.
- Distinctive: line 19
Ask before any command that may discard work, delete local or remote refs, or rewrite public/shared history: git reset --hard, branch or …
- Distinctive: line 20
Before running a commit, amend, or destructive command, construct the exact command and verify it keeps the safeguards above.
- Distinctive: line 24
Run git status --short before staging, committing, rebasing, merging, or deleting anything.
- Distinctive: line 26
When inspecting diffs, use raw unified diffs.
- Very specific: line 34
If a wrapper filters or hides diff output you need, rerun the same safe command through the wrapper's raw passthrough mode (for example rtk …
- Distinctive: line 37
Check whether the branch is shared before rebasing or force-pushing.
- Very specific: line 40
When creating or renaming local task branches, default to feature/, fix/, hotfix/, docs/, test/, refactor/, release/, or chore/ based on …
- Distinctive: line 44
Before any user-requested commit or amend:
- Distinctive: line 46
If the tree has multiple changed files or unclear scope, inspect git --no-pager diff --no-color --no-ext-diff --stat, git --no-pager diff …
- Distinctive: line 49
Leave unrelated or unverified groups dirty and report them as follow-up commit candidates.
- Distinctive: line 50
Use git add -A only when the intended commit scope is the whole tree and that scope has been verified.
- Distinctive: line 51
Check staged files or staged diff before committing.
- Distinctive: line 52
Use Conventional Commits unless the repository documents another convention.
- Very specific: line 55
Verify the exact commit command against Core Rule 5 (-S --signoff) before executing, and against the body decision above.
- Distinctive: line 59
Before creating, switching, rebasing, merging, force-pushing, or deleting branches:
- Distinctive: line 63
Check for uncommitted or staged changes that could be carried across branches.
- Distinctive: line 82
Read repo-specific Git guidance.
- Distinctive: line 87
If the user asked you to commit, follow the Commit Safety Checklist.
- Distinctive: line 88
If the user asked you to push, push with upstream tracking on first push.
- Very specific: line 89
If the user asked for GitHub PRs, checks, releases, or gh CLI workflows, use github-workflow.
“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
Use for Git operations that affect history, branches, tags, commits, or conflict recovery. Use github-workflow for GitHub PRs, stacked PRs and gh-stack, reviews, Actions, Releases, and gh CLI workflows.
Core Rules
- Inspect repository-specific Git guidance first:
AGENTS.md,CLAUDE.md,docs/git-workflow.md,CONTRIBUTING.md,README.md, release docs. - Never claim a check passed unless you ran it and can report the command.
- Avoid direct pushes to protected or shared base branches unless repo guidance and the user explicitly allow it.
- Keep commits atomic: one logical change per commit, no final
WIP,fixup, or mixed-change commits. - Use signed commits with DCO sign-off by default:
git commit -S --signoff. Plaingit commit -m ...orgit commit --amend -m ...is forbidden unless the user explicitly overrides signing or DCO. If signing is unavailable — a key probe finds no usable key, or a-Scommit just failed with a signing error, regardless ofcommit.gpgsign— do not retry; follow the signing fallback table inreferences/commits.md. - Never bypass hooks, signing, or DCO checks (
--no-verify,--no-gpg-sign) unless the user explicitly asks. - Use
--force-with-lease, never plain--force, and only after confirming the branch is safe to rewrite. - Ask before any command that may discard work, delete local or remote refs, or rewrite public/shared history:
git reset --hard, branch or tag deletion, force pushes, or discarding local changes. - Before running a commit, amend, or destructive command, construct the exact command and verify it keeps the safeguards above.
Before Acting
- Run
git status --shortbefore staging, committing, rebasing, merging, or deleting anything. - Document and reason about plain
gitcommands only. Command wrappers (token-filtering proxies such asrtk) are an execution-time concern: apply a wrapper prefix only when the user's global or repository guidance says so. All rules in this skill apply to the underlying Git command whether or not a wrapper prefix is present. - When inspecting diffs, use raw unified diffs. Do not use aliases or wrapped diff shortcuts such as
git difft; bypass pagers, colors, and external diff tools:
git --no-pager diff --no-color --no-ext-diff
git --no-pager diff --cached --no-color --no-ext-diff
git --no-pager show --no-color --no-ext-diff- If a wrapper filters or hides diff output you need, rerun the same safe command through the wrapper's raw passthrough mode (for example
rtk proxy git --no-pager diff --no-color --no-ext-diff) or without the wrapper. - Identify the actual base branch from repo docs or remote metadata. Do not assume
main. - Refresh remote-tracking refs before operations whose correctness depends on remote state: merging into a base branch, rebasing onto it, release range review, or branch cleanup.
- Check whether the branch is shared before rebasing or force-pushing.
- Apply these Git safeguards to the underlying operations of tools such as gh-stack, including implicit commits, rebases, and force pushes. Use
github-workflowfor stack orchestration and tool availability. - Stage only intentional changes. Prefer
git add -por explicit file paths. - When creating or renaming local task branches, default to
feature/,fix/,hotfix/,docs/,test/,refactor/,release/, orchore/based on the work type unless the user supplies an exact branch name.
Commit Safety Checklist
Before any user-requested commit or amend:
- If the tree has multiple changed files or unclear scope, inspect
git --no-pager diff --no-color --no-ext-diff --stat,git --no-pager diff --no-color --no-ext-diff --name-status, and targeted diffs as needed. - Group changes by logical intent before staging; do not infer intent from paths alone when the diff suggests otherwise.
- Stage only the logical group directly covered by the user's current request unless the user explicitly asks to commit all remaining groups.
- Leave unrelated or unverified groups dirty and report them as follow-up commit candidates.
- Use
git add -Aonly when the intended commit scope is the whole tree and that scope has been verified. - Check staged files or staged diff before committing.
- Use Conventional Commits unless the repository documents another convention.
- Write a commit body unless the title is fully self-explanatory. Decide this explicitly rather than defaulting to a title-only commit: a fix, a workaround, a rejected alternative, a behavior or interface change, or anything a future
git blamereader would ask "why" about needs a body. Seereferences/commits.mdfor what belongs in one. - Resolve the subject-description language, and the body language separately when a body is needed, using
references/commits.md. - Verify the exact commit command against Core Rule 5 (
-S --signoff) before executing, and against the body decision above. Pass a body with-F -, not by cramming it into-m.
Branch and History Safety Checklist
Before creating, switching, rebasing, merging, force-pushing, or deleting branches:
- Confirm current branch, intended target branch, and actual base branch.
- Fetch and compare the base branch with its upstream before integrating or judging merged state.
- Check for uncommitted or staged changes that could be carried across branches.
- Confirm whether the branch is shared or protected before rewriting or deleting it, then apply Core Rules 7-8.
Reference Routing
| Reference | Use For |
references/branching.md | Branch flow, trunk-based, GitFlow, release branches, branch naming |
references/linear-history.md | Fast-forward vs rebase decisions, linear integration, conflict preflight |
references/commits.md | Conventional Commits, commit bodies, message language, atomic commits, signed commits, DCO sign-off, staging, interactive rebase/autosquash cleanup |
references/conflicts-recovery.md | Pull/merge/rebase/cherry-pick/stash conflicts, abort/continue flows, revert/reset/reflog recovery, untracking accidentally committed files |
references/releases.md | Git tags, forge-neutral release notes, release branch safety |
references/anti-patterns.md | Common Git mistakes before staging, committing, pushing, or merging |
references/branch-cleanup.md | Explicit branch cleanup requests, merged/stale branch checks, safe branch deletion |
references/bisect.md | Finding the commit that introduced a regression via manual or automated git bisect |
references/submodules.md | Cloning, adding, updating, or removing Git submodules |
Default Workflow
- Read repo-specific Git guidance.
- Run
git status --short. - Load the relevant reference file.
- Inspect branch, base, remote, and staged changes as needed.
- Choose the least surprising safe Git operation.
- If the user asked you to commit, follow the Commit Safety Checklist.
- If the user asked you to push, push with upstream tracking on first push.
- If the user asked for GitHub PRs, checks, releases, or
ghCLI workflows, usegithub-workflow.
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.

