Agents / Skills

Git Hygiene Setup

Skill

Establishes the version-control conventions that keep a repository navigable: branch naming, commit standards, merge strategy, protected branches — decided once, written down, and enforced where tooling allows.

Best for

  • Repositories where every developer invented their own workflow
  • Teams growing past the stage where everyone just knows
  • Histories that cannot answer 'what shipped when, and why?'

What you give it

  • Your repository, team size, and release style (continuous, versioned, both)

What you get back

  • The conventions decided and written: branching model, naming, commit format, merge strategy — each with its reason
  • Enforcement wired where possible: protected branches, required checks, commit linting, template files
  • The history contract: what a reader can rely on finding — and the practices that would break it, banned by name

How it works

  1. Fits the model to the team's actual release style — trunk-based with short branches for continuous shippers, release branches only where versioned support genuinely demands them.
  2. Decides each convention with its reason written, because conventions without whys erode on the first deadline.
  3. Enforces by machine wherever the platform allows: protections, required checks, linted messages — the convention that depends on memory is already failing.
  4. Defines the history contract: the guarantees (main always buildable, every merge traceable to review) that make the log a usable record.

Example

You: Five developers, five workflows, and a main branch that broke twice this month. Set us straight.

Result: The decisions: short-lived branches named by type and ticket, one trunk, squash-merge with the PR as the story unit (reasoning written: your team reviews by PR, so history should read by PR), commit summaries in imperative under 72 characters with the convention linted, main protected behind the two required checks, force-push banned everywhere shared. All enforced by repository settings and hooks where tooling reaches; the two unenforcables (commit body quality, branch freshness) made review-checklist lines. Main has not broken since, and 'what shipped Tuesday?' is now one command.

Limits — please read

  • Conventions bind going forward; history rewriting of the past is neither needed nor wise — the contract starts now.
  • Tooling enforcement varies by platform; the unenforceable remainder lands in review checklists, honestly labelled.
  • Workflow religion wars (merge vs rebase) are settled by fit to your review style, with the tie-break written.