agentleFS
Adit-Jain-srmAdit-Jain-srm/skill-forge/skills/git-workflow/SKILL.md

git-workflow

Skill2 starsChanged 6 months agoMITView on GitHub

Enforces disciplined git practices on every commit. Small atomic commits, conventional messages, branch hygiene, and PR readiness checks. Changes how the agent HANDLES git — not just what commands it knows. Auto-triggers on any git operation. Use when committing, branching, merging, or preparing PRs. Also use when git history is messy, commits are too large, or PRs get rejected for poor git hygiene.

  • Commits and pushes

118 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • MicrosoftSkill

    squad-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-lielSkill

    typescript-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

  • martinholovskySkill

    llm-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

  • MicrosoftSkill

    cost-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

  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 3 projects that use this

  • Vimalk0703Skill

    dependency-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

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 101 edited versions we read keep these.

  • 4

    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
  1. Very specific:

    Write message: type(scope): what changed (not "update files")

    line 38
  2. Distinctive:

    Check: would reverting THIS commit break anything else?

    line 39
  3. Distinctive:

    Run this checklist YOURSELF before showing the PR to the user:

    line 52
  4. Distinctive:

    When you're about to:

    line 91
  5. Distinctive:

    Create a PR → RUN the PR checklist above.

    line 95

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Enforce disciplined git practices on every operation — small atomic commits, conventional messages, clean branch hygiene, and PR readiness checks. Changes how the agent handles git, not just what commands it knows.

Git Workflow

Change how you handle git. Not a reference — a DISCIPLINE.

Persistence

ACTIVE on every git operation. Every commit, every branch, every PR. Not optional. Off only when user explicitly says "skip git discipline".

The Discipline

Every Commit Must Be

SMALL: One logical change (if you need "and" to describe it, split it)
ATOMIC: Passes tests on its own (any commit can be reverted safely)
MESSAGED: Conventional format (type: concise description)
CLEAN: No debug logs, no commented code, no TODOs you won't do

Before EVERY git commit:

  1. git diff --staged — READ what you're actually committing
  2. Is this ONE thing? If not, git reset HEAD and commit in parts
  3. Write message: type(scope): what changed (not "update files")
  4. Check: would reverting THIS commit break anything else? (shouldn't)

Branching

RULE: Never commit directly to main/master
RULE: Branch names describe the work: feat/add-auth, fix/login-timeout
RULE: Branches live < 3 days (if longer, you're batching too much)
RULE: Rebase before PR (clean linear history)

Before Creating a PR

Run this checklist YOURSELF before showing the PR to the user:

[ ] All commits are atomic and conventional
[ ] No fixup commits left (squash them)
[ ] Branch is rebased on latest main
[ ] Tests pass on the branch
[ ] No unrelated changes snuck in
[ ] PR description explains WHY not just WHAT
[ ] Diff is < 400 lines (if larger, split into multiple PRs)

Conventional Commit Types

TypeWhen
featNew capability for users
fixBug that affected users
refactorCode change, no behavior change
testAdding/fixing tests only
docsDocumentation only
choreBuild, deps, config
perfPerformance improvement

Bad → Good

BAD:  "update stuff"
GOOD: "feat(auth): add JWT refresh token rotation"

BAD:  "fix bug"  
GOOD: "fix(checkout): prevent double-charge on timeout retry"

BAD:  one commit with 15 files changed across 3 features
GOOD: 3 commits, each touching one feature, each revertable alone

Auto-Triggers

When you're about to:

  • git add . → STOP. Stage selectively. Read the diff.
  • git commit -m "..." → CHECK: is the message conventional? Is the change atomic?
  • git push → CHECK: is the branch rebased? Tests pass?
  • Create a PR → RUN the PR checklist above.

Why

Messy git = impossible to debug, revert, or review. Disciplined git = every commit is a rollback point, every PR is reviewable, every message is searchable. This compounds over months into a codebase that's navigable by archaeology.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.