git-workflow
Skill1 starsChanged 5 months agoMITView on GitHub
Runs the daily branch to PR to merge loop safely on any git/GitHub repo — one branch per task, confirm the branch before every commit, rebase onto latest main before review, keep PRs small with a what/why/how-to-test description, and recover cleanly with amend, revert, and reflog. Use when starting a task branch, preparing or reviewing a pull request, deciding whether to amend or revert, undoing a bad commit, or recovering work that seems lost. Not for writing the commit text itself (see commit-message) or reviewing the diff's contents (see code-review).
- Installs packages
- Commits and pushes
118 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- 1pedroosilva/databricks-genie-skillstheir own version, first seen Oct 2, 2026
- vospr/context-engineering-templatetheir own version, first seen Oct 1, 2026
- fusebase-dev/fusebase-flowtheir own version, first seen Oct 1, 2026
Used with
Projects with it also use squad-commands, typescript-patterns and 9 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.
MicrosoftSkillsquad-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 3 projects that use this
cohen-lielSkilltypescript-patterns
TypeScript best practices and patterns. Use when writing TypeScript code, defining types, working with generics, or converting JavaScript to TypeScript.
Also in 4 projects that use this
martinholovskySkillllm-integration
Expert skill for integrating local Large Language Models using llama.cpp and Ollama. Covers secure model loading, inference optimization, prompt handling, and protection against LLM-specific vulnerabilities including prompt injection, model theft, and denial of service attacks.
Also in 4 projects that use this
MicrosoftSkillcost-optimization
Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: \"optimize Azure costs\", \"reduce cloud spending\", \"rightsize resources\", \"find idle resources\", \"orphaned disk\", \"deleted VM still charged\", \"public IP still charging\", \"reservation utilization\", \"Savings Plan coverage\", \"commitment recommendation\", \"why is pay-as-you-go still charged\". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.
Also in 5 projects that use this
YepAPISkillbackground-jobs
Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.
Also in 3 projects that use this
Vimalk0703Skilldependency-management
Vet packages before adoption, audit for vulnerabilities, pin versions, and prevent dependency bloat.
Also in 3 projects that use this
- +1 more from microsoft
Other versions118 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 118
- JetBrains/ideavim★ 10ksame name
- Galaxy-Dawn/claude-scholar★ 5.7ksame name
- github/gh-aw★ 5.3ksame name
- microsoft/Generative-AI-for-beginners-dotnet★ 3.1ksame name
- microsoft/waza★ 1.4ksame name
- laolaoshiren/claude-code-skills-zh★ 876same name
- Mindrally/skills★ 266same name
- Azure/fleet★ 226same name
- povvo/claudikins-kernel★ 128same name
- extra-org/extra★ 113same name
108 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 repository49 other files it gives its agents.
- accessibilitySkill
- ai-evalsSkill
- ai-integrationSkill
- architecture-decisionsSkill
- audit-loggingSkill
- aws-servicesSkill
- browser-e2e-testingSkill
- celery-tasksSkill
- changelogSkill
- ci-cdSkill
- codebase-guideSkill
- code-reviewSkill
- commit-messageSkill
- cookie-auth-csrfSkill
- dashboard-data-designSkill
- db-concurrencySkill
- debugSkill
- dependency-auditSkill
- deploy-awsSkill
- design-systemSkill
- drf-apiSkill
- drf-zod-contractSkill
- frontend-perfSkill
- i18n-rtlSkill
- incident-responseSkill
- migrationsSkill
- money-decimalSkill
- multi-tenancySkill
- nextjs-moduleSkill
- observabilitySkill
- perf-reviewSkill
- production-readinessSkill
- product-ux-designSkill
- rbac-permissionsSkill
- react-querySkill
- security-reviewSkill
- skill-authoringSkill
- tailwind-shadcnSkill
- tenant-session-switchSkill
- threat-modelingSkill
- verifySkill
- version-checkSkill
- visual-ui-designSkill
- webhook-handlerSkill
- websockets-channelsSkill
- write-testsSkill
- zod-formsSkill
- zustand-stateSkill
- example-skillSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 101 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Write a description that answers what / why / how-to-test: Add before/after screenshots for any visual change so a reviewer verifies …
- Distinctive: line 45
Don't request review on red CI: If you want early direction, open a Draft PR and say what feedback you're after.
- Very specific: line 52
Lockfiles are generated, not merged: When uv.lock or pnpm-lock.yaml conflicts, don't hand-edit the hashes — take the merged manifest …
- Distinctive: line 66
After any resolution, re-run the build and tests before continuing the rebase — a clean git status only means the text merged, not that it …
“Common” is measured: kept by at least 6 in 10 of the 101 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 (branch to PR to merge)
When to use
Any time you move a change from your working tree into the shared history — cutting
a task branch, opening or updating a PR, or digging yourself out after a bad commit.
The shared branch (main) is sacred: it stays green and only receives reviewed,
rebased work.
Pattern
Two guards hold the whole loop together:
- Confirm your branch before every commit. A shared checkout or a worktree can switch under you between commands, so never assume — check, then commit.
- Rebase onto latest
mainbefore requesting review, so CI tests the code as it will actually land, not a stale merge base.
Everything else — small PRs, honest descriptions, no reviews on red CI — falls out of protecting the shared branch.
Steps / idioms
Branch per task, never commit straight to
main. Name by intent (feat/…,fix/…):git switch -c feat/tenant-filter main # branch off a fresh main # ...work, then before EACH commit, confirm where you are: git branch --show-current # must NOT be main / a shared branch git add -p && git commit # message: see commit-message git fetch origin git rebase origin/main # replay onto latest before review git push -u origin HEAD # (push --force-with-lease after a rebase)- Keep PRs small. One reviewable idea per PR; if it grows, split it and stack the branches (each PR targets the one below it) rather than shipping a 40-file wall.
- Write a description that answers what / why / how-to-test. Add before/after screenshots for any visual change so a reviewer verifies without checking out.
- Don't request review on red CI. If you want early direction, open a Draft PR and say what feedback you're after; move it to Ready only once CI is green.
Resolving conflicts
A three-way merge conflict means git couldn't reconcile two edits; resolve by intent, not by mechanically picking a side.
- Lockfiles are generated, not merged. When
uv.lockorpnpm-lock.yamlconflicts, don't hand-edit the hashes — take the merged manifest (pyproject.toml/package.json), then regenerate:git checkout --theirs uv.lock && uv lock, orgit checkout --theirs pnpm-lock.yaml && pnpm install --lockfile-only. A manually stitched lockfile installs a set nobody resolved. - Two migrations on one app — each branch added a migration to the same Django app,
so both share a parent and the app has a branched history. Don't renumber by hand:
rebase onto latest
main, thenpython manage.py makemigrations --mergeto write a tie migration that depends on both leaves. Rebasing first keeps the merge node last. - Deleted-but-modified — one side deleted a file the other side changed, and git
can't guess your intent. Decide deliberately:
git rm <file>to honor the deletion, orgit add <file>to keep the modified version. Never letgit checkout --ours/--theirssilently drop the decision.
After any resolution, re-run the build and tests before continuing the rebase — a clean
git status only means the text merged, not that it works.
Adapt to your repo
Rename the shared branch if it isn't main (master, develop, a release branch).
Match your host's push protection and the branch-name convention your team uses
(prefixes, ticket ids). If PRs auto-run CI, confirm the required checks before marking
Ready; if you use stacked PRs, pick a tool or a plain base-branch chain and stay
consistent.
Gotchas
- Amend only before you push. Rewriting a commit others may have pulled forces them into a painful reset — once it's shared, add a new commit instead.
- Undo merged history with
git revert, never a force-push to a shared branch. Revert makes a new inverse commit that preserves history; force-pushingmainrewrites everyone's base. - A "lost" commit usually isn't.
git refloglists every HEAD you've been on; find the sha andgit switch -c rescue <sha>(orgit cherry-pickit) to recover. --force-with-leaseover--forceon your own branch — it refuses to clobber commits you haven't seen (e.g. a teammate's push to your PR).- Rebasing a branch others share rewrites their base too; only rebase branches that are yours.
See also
commit-messagecode-reviewci-cdmigrations
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.

