agentleFS
aneja5aneja5/forge-skills/skills/git-workflow/SKILL.md

git-workflow

Skill3 starsChanged 7 months agoMITView on GitHub

Use when committing work, creating branches, preparing PRs, resolving merge conflicts, when grouping related changes into commits, when cleaning up history before merging, or when deciding what should be a separate commit vs squashed.

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

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

  • 0

    Common

    Most of the 101 edited versions we read keep these.

  • 1

    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. Distinctive:

    Commit touches files from more than one task

    line 35
  2. Very specific:

    Commit message describes the diff ("update user.ts") not the reason ("guard against null session on logout")

    line 36

“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

Git Workflow

Overview

Each commit is an atomic, independently-revertable unit of work. Commit messages explain WHY, not WHAT (the diff shows what). Branch names reference task IDs. PRs link to the originating task and contract.

When to Use

  • Committing completed work from incremental-implementation
  • Creating a branch for a new task
  • Preparing a PR for review
  • Resolving merge conflicts

When NOT to Use

  • You're in the middle of implementing — finish the task first, then commit
  • Exploratory work not yet at a stable state — use git stash or a WIP commit

Common Rationalizations

ThoughtReality
"I'll squash it all at the end"Squashing discards the incremental story — keep atomic commits
"The commit message can be 'fix'"Future you and your teammates need to know WHY
"I'll just force push to clean up"Force push rewrites shared history — never on shared branches
"One big commit is fine for a small change"Small changes are the easiest place to practice atomic commits

Red Flags

  • Commit touches files from more than one task
  • Commit message describes the diff ("update user.ts") not the reason ("guard against null session on logout")
  • Unrelated test fixes bundled with a feature commit
  • Merge conflict resolved by accepting one side wholesale without reading both

Core Process

Branch naming

feat/T001-user-registration
fix/T023-null-session-logout
chore/update-dependencies

Commit format

[T001] Implement user registration

Guard against duplicate email on create — UserService.create() now returns
DuplicateEmailError instead of throwing, matching the contract invariant.

Closes: T001
  • First line: [TASK-ID] imperative verb + what changed (≤72 chars)
  • Body: WHY this change was needed, not what the diff shows
  • Footer: task reference

Before committing

  • Only files from the current task are staged
  • git diff --staged reviewed — no debug logs, no TODO left in
  • Tests pass: <run test command>
  • Build passes: <run build command>

PR checklist

  • PR title matches the task title
  • PR description links to task ID and to the relevant .forge/contracts/ file
  • "What changed and why" section in PR body — not just the task title
  • No unresolved review comments before merge
  • Merge strategy: squash only if commits are truly WIP; prefer merge commit to preserve atomic history

Verification

  • Each commit is independently revertable
  • Commit messages explain WHY, not WHAT
  • No debug artifacts committed (console.log, TODO, commented-out code)
  • Branch references task ID
  • PR links to task and contract

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.