git-workflow
Skill32 starsChanged 7 months agoMITView on GitHub
Handles git workflow: creating branches, atomic commits with conventional prefixes, PR creation with structured summaries, keeping PR descriptions updated on follow-up pushes, and post-merge cleanup. Use when the user asks to commit, create or update a PR, push changes, address PR feedback, or says a PR was merged.
- Deletes or force-pushes
- 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 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.
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 repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
31 rules. 0 are common, 24 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 101 edited versions we read keep these.
24
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Create descriptive branch names using category prefixes:
- Very specific: line 31
Commit message format: prefix: short imperative description
- Very specific: line 35
Use feat!: or fix!: for breaking changes.
- Distinctive: line 40
Keep the subject line under 72 characters
- Distinctive: line 41
No period at the end of the subject line
- Very specific: line 42
Always include this trailer at the end of every commit message: Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Distinctive: line 45
Before creating any commit, review staged changes with git diff --cached to ensure only intended changes are included.
- Distinctive: line 49
Do not treat "atomic commits" as a preference.
- Distinctive: line 51
Before creating any commit:
- Distinctive: line 55
Create a brief internal commit plan such as:
- Distinctive: line 60
After each staged unit, run git diff --cached and verify the staged diff matches exactly one logical change.
- Distinctive: line 61
If the current working tree cannot be cleanly split into atomic commits without risky manual surgery, stop and tell the caller that the …
- Distinctive: line 63
Never create a single catch-all commit when the diff spans multiple concerns, such as:
- Distinctive: line 70
If the user asks to create a PR and the branch contains uncommitted work spanning multiple logical changes, the skill must split that work …
- Distinctive: line 72
If the user asks to address PR feedback, keep the fixes in one commit only when they all serve the same review-driven purpose.
- Distinctive: line 76
After all commits are ready and pushed:
- Very specific: line 79
Create a PR with gh pr create
- Distinctive: line 89
When reporting success back to the user, include the branch name, relevant commit SHA(s), and PR URL.
- Distinctive: line 93
When a branch already has an open PR and you push additional commits:
- Very specific: line 95
Read the current PR body with gh pr view --json body -q .body and use that exact content as the base for your update.
- Distinctive: line 98
Treat the PR body as a surgical update, not a full rewrite:
- Distinctive: line 100
update the summary table to include new commits
- Distinctive: line 101
remove or rewrite outdated entries when the implementation changed
- Distinctive: line 103
If the PR body does not already contain a summary table, add one without removing the rest of the description.
- Very specific: line 104
Before running gh pr edit, verify the updated body still contains the important sections from the original PR description.
- Distinctive: line 106
Never leave the PR description stale after pushing fixes to an existing PR.
- Distinctive: line 110
If the user explicitly asks to redo commits, split a monolithic commit, or force-push a corrected branch:
- Distinctive: line 113
Use git push --force-with-lease only when the user explicitly requested rewriting remote history.
- Distinctive: line 114
After the push, make sure the PR description still matches the new commit set.
- Distinctive: line 118
When told a PR is merged:
- Very specific: line 122
Delete the merged branch locally: git branch -d <branch-name>
“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
Manage the git workflow for this project. Follow these conventions strictly.
Branch Naming
Create descriptive branch names using category prefixes:
feat/short-description— new featuresfix/short-description— bug fixesrefactor/short-description— code restructuringchore/short-description— maintenance, deps, configsecurity/short-description— security fixesui/short-description— UI/UX changesimprove/short-description— improvements and optimizations
Commit Conventions
Each commit must be atomic — one logical change per commit.
Commit message format: prefix: short imperative description
Prefixes: fix:, feat:, refactor:, chore:, ci:, docs:, test:
Use feat!: or fix!: for breaking changes.
Rules:
- If this is the first commit in a batch, inspect
package.jsonand run only the validation scripts that actually exist amongbuild,lint, andtest. If any existing required script fails, abort immediately and return the failure to the caller. Do not attempt to fix unrelated issues from inside this skill. - One logical change per commit — do not bundle unrelated changes
- Keep the subject line under 72 characters
- No period at the end of the subject line
- Always include this trailer at the end of every commit message:
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Before creating any commit, review staged changes with git diff --cached to ensure only intended changes are included.
Enforcing Atomic Commits
Do not treat "atomic commits" as a preference. Treat it as a required workflow.
Before creating any commit:
- Inspect the full working tree with
git status --shortandgit diff --stat. - Identify the logical change units before staging anything.
- Create a brief internal commit plan such as:
feat: add parser support for new fieldfeat: add reusable chart componentui: refresh dashboard layout
- Stage and commit one logical unit at a time. Prefer file-based staging when a file belongs entirely to one change; use partial staging such as
git add -pwhen multiple logical changes share a file. - After each staged unit, run
git diff --cachedand verify the staged diff matches exactly one logical change. - If the current working tree cannot be cleanly split into atomic commits without risky manual surgery, stop and tell the caller that the changes need to be reorganized before committing.
Never create a single catch-all commit when the diff spans multiple concerns, such as:
- parser or data-shape changes mixed with UI changes
- new reusable components mixed with feature wiring
- layout/styling changes mixed with behavior changes
- review feedback fixes mixed with unrelated cleanup
If the user asks to create a PR and the branch contains uncommitted work spanning multiple logical changes, the skill must split that work into multiple commits before pushing.
If the user asks to address PR feedback, keep the fixes in one commit only when they all serve the same review-driven purpose. If feedback touches separate concerns, split it into multiple commits.
PR Creation and Updates
After all commits are ready and pushed:
- Push the branch:
git push -u origin <branch-name> - Create a PR with
gh pr create - PR body must include a summary table of all commits:
| Commit | Change |
|--------|--------|
| `fix:` description | What was fixed and why |
| `feat:` description | What was added |When reporting success back to the user, include the branch name, relevant commit SHA(s), and PR URL.
PR Follow-Up Pushes
When a branch already has an open PR and you push additional commits:
- Read the current PR body with
gh pr view --json body -q .bodyand use that exact content as the base for your update. Do not generate a fresh PR description from scratch. - Push the branch updates.
- Refresh the PR description with
gh pr editso it reflects the latest state of the branch. - Treat the PR body as a surgical update, not a full rewrite:
- preserve existing sections such as summary prose, validation steps, and other reviewer context
- update the summary table to include new commits
- remove or rewrite outdated entries when the implementation changed
- mention review feedback fixes in the description when the new commits address PR comments
- If the PR body does not already contain a summary table, add one without removing the rest of the description.
- Before running
gh pr edit, verify the updated body still contains the important sections from the original PR description.
Never leave the PR description stale after pushing fixes to an existing PR.
History Rewrites
If the user explicitly asks to redo commits, split a monolithic commit, or force-push a corrected branch:
- Rebuild the branch history into atomic commits that match the conventions above.
- Use
git push --force-with-leaseonly when the user explicitly requested rewriting remote history. - After the push, make sure the PR description still matches the new commit set.
Post-Merge Cleanup
When told a PR is merged:
git checkout maingit pull origin main- Delete the merged branch locally:
git branch -d <branch-name> - Confirm the local main is up to date
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.

