agentleFS
buildpad-aibuildpad-ai/skills/git-workflow-and-versioning/SKILL.md

git-workflow-and-versioning

Skill1 starsChanged 27 days agoMITView on GitHub

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.

  • Reads credentials
  • Installs packages

61 other projects use a version of this, 50 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use constraint-driven-development, observability-and-instrumentation 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.
  • MrCipherSmithSkill

    constraint-driven-development

    Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.

    Also in 16 projects that use this

  • HK-hubSkill

    observability-and-instrumentation

    Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.

    Also in 33 projects that use this

  • HK-hubSkill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 36 projects that use this

  • seikaikyoSkill

    doubt-driven-development

    對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。

    Also in 35 projects that use this

  • seikaikyoSkill

    interview-me

    需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。

    Also in 37 projects that use this

  • silvainfmSkill

    marketing-ideas

    When the user needs marketing ideas, inspiration, or strategies for their SaaS or software product. Also use when the user asks for 'marketing ideas,' 'growth ideas,' 'how to market,' 'marketing strategies,' 'marketing tactics,' 'ways to promote,' or 'ideas to grow.' This skill provides 140 proven marketing approaches organized by category.

    Also in 4 projects that use this

  • +1 more from HK-hub

The file

We split this skill into the rules it gives an agent

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

  • 5

    Common

    Most of the 57 edited versions we read keep these.

  • 5

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

    Always. Every code change flows through git.

    line 14
  2. Distinctive:

    Keep main always deployable.

    line 20
  3. Distinctive:

    Don't combine formatting changes with behavior changes.

    line 65
  4. Common:

    Keep branches short-lived (merge within 1-3 days)

    line 86
  5. Common:

    Delete branches after merge

    line 87
  6. Common:

    Prefer feature flags over long-lived branches

    line 88
  7. Distinctive:

    After any modification, provide a structured summary:

    line 113
  8. Distinctive:

    Verify with git remote -v and git branch before pushing

    line 150
  9. Very specific:

    Always validate locally before merging to main: pnpm install && pnpm build && pnpm test

    line 151
  10. Distinctive:

    Use PRs and require CI/build checks before merging to main

    line 152
  11. Common:

    Commit messages like "fix", "update", "misc"

    line 167

“Common” is measured: kept by at least 6 in 10 of the 57 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 and Versioning

Overview

Git is your safety net. Treat commits as save points, branches as sandboxes, and history as documentation. With AI agents generating code at high speed, disciplined version control keeps changes manageable, reviewable, and reversible.

When to Use

Always. Every code change flows through git.

Core Principles

Trunk-Based Development

Keep main always deployable. Work in short-lived feature branches that merge back within 1-3 days. Pushes to main trigger AWS Amplify builds.

main ──●──●──●──●──●──●──  (always deployable, triggers Amplify)
        ╲      ╱  ╲    ╱
         ●──●─╱    ●──╱    ← short-lived feature branches (1-3 days)

1. Commit Early, Commit Often

Work pattern:
  Implement slice → Test → Verify → Commit → Next slice

Not this:
  Implement everything → Hope it works → Giant commit

2. Atomic Commits

Each commit does one logical thing:

# Good: Each commit is self-contained
a1b2c3d feat: add task creation endpoint with validation
d4e5f6g feat: add task creation form component
h7i8j9k feat: connect form to API and add loading state
m1n2o3p test: add task creation tests (unit + integration)

# Bad: Everything mixed
x1y2z3a Add task feature, fix sidebar, update deps, refactor utils

3. Descriptive Messages

<type>: <short description>

<optional body explaining why, not what>

Types: feat, fix, refactor, test, docs, chore

4. Keep Concerns Separate

Don't combine formatting changes with behavior changes. Don't combine refactors with features.

5. Size Your Changes

~100 lines  → Easy to review, easy to revert
~300 lines  → Acceptable for a single logical change
~1000 lines → Split into smaller changes

Branching Strategy

main (always deployable, Amplify deploys on push)
  │
  ├── feature/task-creation    ← One feature per branch
  ├── feature/user-settings    ← Parallel work
  └── fix/duplicate-tasks      ← Bug fixes
  • Branch from main
  • Keep branches short-lived (merge within 1-3 days)
  • Delete branches after merge
  • Prefer feature flags over long-lived branches

Branch Naming

feature/<short-description>   → feature/task-creation
fix/<short-description>       → fix/duplicate-tasks
chore/<short-description>     → chore/update-deps
refactor/<short-description>  → refactor/auth-module

The Save Point Pattern

Agent starts work
    │
    ├── Makes a change
    │   ├── Test passes? → Commit → Continue
    │   └── Test fails? → Revert to last commit → Investigate
    │
    └── Feature complete → All commits form a clean history

Change Summaries

After any modification, provide a structured summary:

CHANGES MADE:
- src/routes/tasks.ts: Added validation middleware to POST endpoint
- src/lib/validation.ts: Added TaskCreateSchema using Zod

THINGS I DIDN'T TOUCH (intentionally):
- src/routes/auth.ts: Has similar validation gap but out of scope

POTENTIAL CONCERNS:
- The Zod schema is strict — rejects extra fields. Confirm this is desired.

Pre-Commit Hygiene

# 1. Check what you're about to commit
git diff --staged

# 2. Ensure no secrets
git diff --staged | grep -i "password\|secret\|api_key\|token"

# 3. Run tests
pnpm test

# 4. Run linting and type checking
pnpm lint && pnpm tsc --noEmit

# 5. Run build
pnpm build

DaaS/Amplify-Specific

  • The starter repo includes amplify.yml — pushes to main trigger Amplify builds
  • Initial branch from starter is temporary-local — create a feature branch before working
  • Verify with git remote -v and git branch before pushing
  • Always validate locally before merging to main: pnpm install && pnpm build && pnpm test
  • Use PRs and require CI/build checks before merging to main

Common Rationalizations

RationalizationReality
"I'll commit when the feature is done"One giant commit is impossible to review, debug, or revert. Commit each slice.
"The message doesn't matter"Messages are documentation. Future you will need to understand what changed.
"I'll squash it all later"Squashing destroys the development narrative. Prefer clean incremental commits.
"Branches add overhead"Short-lived branches are free. Long-lived branches are the problem.
"I don't need a .gitignore"Until .env with production secrets gets committed. Set it up immediately.

Red Flags

  • Large uncommitted changes accumulating
  • Commit messages like "fix", "update", "misc"
  • Formatting changes mixed with behavior changes
  • No .gitignore in the project
  • Committing node_modules/, .env, or build artifacts
  • Long-lived branches that diverge significantly from main
  • Force-pushing to shared branches

Verification

For every commit:

  • Commit does one logical thing
  • Message explains the why, follows type conventions
  • Tests pass before committing
  • No secrets in the diff
  • No formatting-only changes mixed with behavior changes
  • .gitignore covers standard exclusions

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.

Reviews can't be read right now.

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.