git-workflow
Skill0 starsChanged 3 months agoMITView on GitHub
Git workflow for commits, branches, pushes, pull requests, and local merges — adapted to delivery profile (quick, standard, production, published). Load this skill whenever making a commit, creating a branch, opening a PR, pushing, or deciding how to handle git at a checkpoint. Also load it when the user runs /git or asks how to finish a feature, ship work, or handle git hygiene.
- 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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- data-workSkill
- frontend-designSkill
- geospatialSkill
- project-contractSkill
- python-devops-stackSkill
- research-protocolSkill
- review-protocolSkill
- setupSkill
- test-qualitySkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
8
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
- Distinctive: line 29
Avoid destructive git commands (force-push, hard reset, checkout --) unless explicitly requested — they rewrite history and can cause data …
- Distinctive: line 61
Run before every commit on staged files:
- Very specific: line 67
If matches found: review each one.
- Very specific: line 73
Read the delivery profile from the project AGENTS.md ## Delivery Profile section before choosing a workflow.
- Distinctive: line 83
no PR required, no release process
- Distinctive: line 101
always work on a feature branch for meaningful changes
- Distinctive: line 113
always work on a feature branch, never directly on main
- Distinctive: line 125
Use when starting meaningful work on production/published repos, or when a quick/standard repo change is large enough to warrant isolation.
- Distinctive: line 208
Don't auto-merge — the whole point of a PR is a human review gate before history is finalized.
- Distinctive: line 214
Use when a PR is not needed and you want to merge a feature branch into main locally.
“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
Purpose
Load this skill whenever work involves a git decision or action — commits, branches, pushes, PRs, merges, bootstrap, or release.
The workflow adapts to the delivery profile (quick, standard, production, published), so reading the profile from AGENTS.md is the first step. The same quality standards apply everywhere; what changes is how much ceremony is appropriate.
Lifecycle Routing
- Project bootstrap (git init, first commit, remote push) →
references/bootstrap.md - Published release (version bump, changelog, tag, push) →
references/release.md - Daily work (commit, push, branch, PR, ship) → use the workflows below
Core principles
Conventional Commits matter because they make history readable, enable automated changelog generation with git-cliff, and make PR titles meaningful at a glance. They're worth the small discipline cost.
Stage intentionally rather than git add . because committing unrelated changes together makes history noisy and harder to revert cleanly if something goes wrong.
Scan for secrets before committing because it's cheap to catch them here and expensive to remove them from history later.
Validate before pushing because pushing broken code wastes CI minutes and creates noise for anyone watching the branch.
Avoid destructive git commands (force-push, hard reset, checkout --) unless explicitly requested — they rewrite history and can cause data loss that's hard to recover from.
Conventional Commits
Types:
feat— new functionalityfix— bug fixrefactor— restructuring without behavior changedocs— documentation onlytest— tests onlychore— deps, config, tooling, buildci— CI/CD changes
Message rules:
- imperative mood: "add" not "added"
- lowercase after the prefix
- no trailing period
- optional scope when it adds clarity:
feat(auth): ... - breaking changes: use
!and aBREAKING CHANGE:footer
Examples:
feat(auth): add token refresh flowfix(api): handle null response payloadsdocs: clarify installation stepsfeat(api)!: change response envelope
Secrets Scan
Run before every commit on staged files:
git diff --cached --name-only | xargs rg -il "(api_key|secret_key|password|token|private_key|AWS_|sk-|ghp_|-----BEGIN)" 2>/dev/nullIf matches found: review each one. Variable names and docs referencing these words are false positives and are fine. Actual secrets → stop, remove them, use env vars, add file to .gitignore.
Delivery Profiles
Read the delivery profile from the project AGENTS.md ## Delivery Profile section before choosing a workflow. The profile changes which steps are required, not the underlying quality standards.
quick
Optimize for speed. Minimal ceremony.
- direct work on
mainis acceptable when low-risk - branch when the change is large, risky, or benefits from isolation
- conventional commits always
- validate before committing (lint only)
- no PR required, no release process
- push when ready
standard
Balanced. Feature branches for meaningful work.
- feature branches preferred for meaningful work
- direct commits to
mainacceptable for small cosmetic changes - conventional commits always
- validate before committing (lint + typecheck/test if configured)
- PR flow preferred but not required for trivial solo changes
- no release process
production
High-care. Green CI required before merge.
- always work on a feature branch for meaningful changes
- conventional commits always
- validate before every commit and before every push
- open a PR for all meaningful work — never merge in the terminal
- squash merge in GitHub UI to keep history clean
- CI must pass before merge
- deployment is separate and manual
published
Highest-care. Release-ready work.
- always work on a feature branch, never directly on
main - conventional commits always
- validate before every commit and before every push
- open a PR for all meaningful work — never merge in the terminal
- squash merge in GitHub UI to keep history clean
- CI must pass before merge
- release via
references/release.md
Workflow: Feature Branch Creation
Use when starting meaningful work on production/published repos, or when a quick/standard repo change is large enough to warrant isolation.
1. check for uncommitted changes — if any, stop: commit or stash first
2. git checkout main && git pull origin main
3. derive branch name from the task description:
- format: type/kebab-case-description
- types: feat/, fix/, docs/, refactor/, test/, chore/
- max 50 chars, lowercase, hyphens only
4. git checkout -b <branch-name>
5. git push -u origin <branch-name>Branch name examples:
feat/add-oauth2-supportfix/login-redirect-loopdocs/update-api-referencerefactor/simplify-auth-logic
Branch from main only — branching from another feature branch creates dependency chains that make merging painful. Use lowercase with hyphens for portability across filesystems and tools.
Workflow: Commit
Steps for all profiles:
1. branch guard (production/published only): if on main → stop, tell user to create a branch first
2. git status --short + git diff --stat — understand what changed
3. run validation at the appropriate level for the change
4. git add <files> — stage only the intended files, review before staging
5. secrets scan on staged files
6. determine commit type from the nature of the changes
7. derive scope from affected file paths when it adds clarity
8. write the commit message: type(scope): description
9. show the commit preview — wait for confirmation before executing
10. git commit -m "<message>"Validation level by change type:
- docs, config, comments only →
nox -s lintor skip if no linter - structural changes (new modules, imports, type signatures) →
nox -s lint typecheck - logic or behavior changes →
nox -s lint typecheck test - checkpoint or release gate → full
nox
For non-Python repos, use the project's equivalent validation profile.
One logical change per commit. If staged files span multiple unrelated concerns, suggest splitting.
Workflow: Push
1. branch guard (production/published): if on main → stop
2. confirm commits exist to push: git log origin/<branch>..HEAD
if none → say so and stop
3. run validation at push level (branch-ready quality)
4. git push origin <current-branch>For quick/standard repos where direct main commits are acceptable, push to main is fine after validation.
Workflow: Pull Request (production/published)
1. branch guard: must not be on main
2. git status --short — no uncommitted changes
3. run full validation
4. git push -u origin <branch> (if not already pushed)
5. derive PR title: Conventional Commit style — type(scope): description
6. write PR body:
- what changed
- why it changed
- validation performed
7. gh pr create --title "<title>" --body "<body>"
8. gh pr view --web (open in browser)
9. tell the user: PR is open, CI is running, review and squash merge in GitHub UIDon't auto-merge — the whole point of a PR is a human review gate before history is finalized. Don't create PRs from main or with failing validation — both undermine the PR's value as a quality checkpoint.
Workflow: Ship (quick/standard local merge)
Use when a PR is not needed and you want to merge a feature branch into main locally.
1. confirm not on main and no uncommitted changes
2. git fetch origin main
3. git rebase main — stop and explain if conflicts
4. run full validation after rebase
5. git checkout main
6. git merge --no-ff <branch> -m "Merge branch '<branch>'"
7. git push origin main
8. git branch -d <branch>
9. git push origin --delete <branch>Rebase before merge so the branch tip is current and conflicts are resolved cleanly before touching main. Use --no-ff to preserve the branch topology in history — it makes it easy to see what was part of a feature and revert it if needed. Clean up branches after merge to keep the remote tidy; stale branches cause confusion about what's still in flight.
Manual Workflow Guidance
For manual sessions, use the /git command with the task as the argument:
/git commit/git push/git pr/git feature <description>/git ship/git status
The command loads this skill and routes through the appropriate workflow for the delivery profile.
For published releases, use /git release — this routes to references/release.md.
What Does Not Belong Here
- language-specific validation commands → project
AGENTS.mdor stack skills
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.

