git-workflow
Skill1 starsChanged 2 months agoMITView on GitHub
Reach for this before a commit, a branch, a revert or a history question — a repository to initialise, a working tree to cut into atomic commits, a staged diff to scan for credentials. Never merges, never commits to `main`. The pull request body is `pull-request`; per-slice isolation `worktree`; grading a diff `code-review`.
- Reads credentials
- 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 repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- acceptance-criteriaSkill
- aim-higherSkill
- api-designSkill
- architecture-designSkill
- browser-testing-with-devtoolsSkill
- ci-cdSkill
- codebase-designSkill
- codebase-researchSkill
- code-reviewSkill
- code-simplificationSkill
- comprehension-quizSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- environment-manifestSkill
- gauntlet-loopSkill
- handoffSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- literate-explainerSkill
- observability-and-instrumentationSkill
- orchestratorSkill
- performance-optimizationSkill
- plan-breakdownSkill
- preflight-readinessSkill
- project-setupSkill
- pull-requestSkill
- quality-verificationSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-grillingSkill
- spec-reviewSkill
- test-driven-developmentSkill
- to-prdSkill
- using-agent-skillsSkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
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 26
Not here: merging. A person merges (safety-rails.md).
- Distinctive: line 80
Run the pass every time, in order — read the staged diff, scan it for a credential, then tests, lint, type check:
- Very specific: line 95
Write the .gitignore before the first commit — build output, .env*, node_modules/, keys, private editor state.
- Distinctive: line 154
NOT TOUCHED is the block that earns its keep — where an unsolicited renovation would have shown.
“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 and Versioning
Purpose
Stage: cross-cutting. Principles 1, 7, 9.
The save-point substrate every other stage commits through: a repository to initialise, a working tree cut into atomic commits, a staged diff scanned for credentials before any of it becomes history. It writes no artifact-chain file of its own. History is the one account of a change that outlives the conversation that produced it.
When to use / when to skip
- Any commit, branch, revert or history question: every code change lands through git, and the only pass with nothing to do is one where no file changed.
- A directory that is not a repository yet; a failure mid-slice asking which save point to return to or which commit turned a test red; a tree of unrelated edits that has to become reviewable history.
- Near-miss — the pull request body and its risk band:
pull-request. Per-slice isolation:worktree. Grading a diff:code-review. The release after a merge:shipping-and-launch. Server-side gates:ci-cd. - Not here: merging. A person merges (
safety-rails.md).
Inputs
- the working tree (
git status,git diff --staged) — helps: what every step below reads · without it: the directory is no repository —git initfirst and mark the baselinederived, rather than commit into a non-repo. docs/features/<slug>/plan/<slice-id>.mdandSTATE.md— helps: the slice id the branch carries and the why its messages state · without them: take both from the prompt and the diff, markedderived.- the repository's conventions (recent
git log,.gitignore, the hooks there) — helps: match the house style rather than impose one · without them: use the shapes below, markedderived.
With a person present, ask at most three questions, only where the gap changes the history's shape.
Core Principles
- Commit each green increment as its own save point — one logical, self-contained change, roughly 100 lines, its test in the same commit or already committed earlier on the branch, which is what keeps the test-first order legible in the history.
- Keep concerns apart. A reflow, a refactor and a behaviour change are three commits — stage per
commit by path, and
git add -pwhere a reflow and a behaviour change share a file. Split anything past ~1,000 lines before review (code-reviewhas the strategies). - Give the message the why, since the diff carries the what:
<type>: <summary>—featfixrefactortestdocschore— plus a body stating the reason, since the log is what reconstructs a decision or a changed oracle when the session log is thin, and whatgit log -Ssearches. - Rewrite no pushed history — no amend, rebase or force-push on a branch anyone else may hold.
Nothing is frozen: a test the plan moved past may change, disclosed in the pull request body and the
log (
pull-request), never folded quietly into a rewritten commit. - Hand over on a clean tree — every increment committed, nothing staged or stray — with the change summary Outputs & handoff shapes.
Branching Strategy
Branch before the first commit and commit to main never: the run ends at an open pull request
(safety-rails.md), and the default branch stays deployable. Name
it feat/<slug> · fix/<slug> · refactor/<slug> · chore/<slug>, lowercase and hyphenated, a slice
branch carrying its id (feat/OFD-2-draft-buffer). Merge inside a couple of days and delete it after —
a branch outliving the week compounds merge risk daily, and unfinished work belongs behind an
off-by-default flag. Two agents at once take a worktree each, one branch per directory (worktree).
The Save Point Pattern
On a failing test or a broken build, reset to the last green commit and diagnose from there rather than
build on top of it (debugging-and-error-recovery) — git reset --hard HEAD then costs one increment.
That holds only where each save point left a clean tree, so nothing a neighbouring slice owns rides on
the reset.
Pre-Commit Hygiene
Run the pass every time, in order — read the staged diff, scan it for a credential, then tests, lint, type check:
git diff --staged
git diff --staged | grep -inE 'password|secret|api[_-]?key|token|BEGIN [A-Z ]*PRIVATE KEY|AKIA[0-9A-Z]{16}'A hit is a stop-list item (safety-rails.md): the commit does not
happen, and the report says a credential is present without echoing its value. Move the pass into a
hook (lint-staged + husky, or .git/hooks/pre-commit) so it runs whether anyone remembers or not;
ci-cd owns the same gates server-side.
Handling Generated Files
Write the .gitignore before the first commit — build output, .env*, node_modules/, keys, private
editor state; afterwards the remedy is a rotation, not a revert. Commit a generated file only where the
project expects one: a lockfile, a migration.
Using Git for Debugging
git bisect for the commit that turned a test red, git log -S or --grep for when a line arrived,
git blame for what carried it. A root-caused defect cites its commit in docs/lessons.md
(debugging-and-error-recovery).
Rationalizations
- "I'll commit once the feature is done" → one commit for an afternoon is one nobody can bisect or revert.
- "The message doesn't matter, the diff is there" → the diff carries the what; later the why exists only in the message.
- "It's really all one change" → a reflow and a behaviour change in one diff hide each other.
- "I'll squash and force-push to tidy it up" → a rewrite of pushed history hides a changed test from the review reading the diff.
- "It's only a dev token" → history keeps a credential long after the file holding it is deleted.
- "I'll add the
.gitignorelater" → between now and then is where.envanddist/enter history.
Red flags
- A working tree carrying an afternoon of unrelated edits, uncommitted.
- Subjects reading
wip,updates,fix stuff,misc. - A reflow sitting in the same commit as a behaviour change.
.env,dist/ornode_modules/staged, or a repository with no.gitignore.- A branch alive for weeks, or a commit landing on
mainitself. - An amend, rebase or force-push proposed on a branch already pushed.
Verification
- The work sits on a named branch off the default one,
mainneither committed to nor pushed. - One logical change per commit, each with its test, and
git status --porcelainis empty. - Every message carries a type and its why; no commit mixes a reflow with behaviour.
- The staged-diff scan ran clean before each commit — or a hit ended the pass as a stop-list item, naming where the credential was and printing no value.
- The
.gitignorewas in place before the first commit. - The change summary came back, naming what was left alone on purpose.
- Every derived value — slice id, base branch, initialised repository — reads
derived.
Outputs & handoff
- Commits on the feature or slice branch, shaped as Core Principles states — the range
pull-requestbands andcode-reviewgrades. .gitignoreat the repository root when there is none, covering what Handling Generated Files lists.docs/session-log.md— one appended entry, cap 60 words, where this pass settled something itself: an initialised repository, a chosen base branch, a split nobody asked for. Shape instate-schema.md.- No
STATE.mdrow — the caller owns the slice's transition (state-schema.md). Returned in conversation rather than written — the change summary, cap 200 words:
CHANGES MADE <file>: what changed there NOT TOUCHED <file or area>: why it was left alone, deliberately CONCERNS what a reviewer should look at first, or "none"NOT TOUCHED is the block that earns its keep — where an unsolicited renovation would have shown.
- Nothing else — no merge, no pull request, no
qa.md, no release.
Report each capped write — the change summary, the log entry — at its measured size against its cap; an over-cap draft is reported at that size, never handed on as though it fit.
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.

