api-and-interface-desi…
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints,…
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need
$ npx -y skills add addyosmani/agent-skills --skill git-workflow-and-versioning --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/git-workflow-and-versioningContext preview
The summary Claude sees to decide when to auto-load this skill.
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need
name: git-workflow-and-versioning description: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.
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 is the mechanism that keeps changes manageable, reviewable, and reversible.
Always. Every code change flows through git.
Keep `main` always deployable. Work in short-lived feature branches that merge back within 1-3 days. Long-lived development branches are hidden costs — they diverge, create merge conflicts, and delay integration. DORA research consistently shows trunk-based development correlates with high-performing engineering teams.
main ──●──●──●──●──●──●──●──●──●── (always deployable)
╲ ╱ ╲ ╱
●──●─╱ ●──╱ ← short-lived feature branches (1-3 days)This is the recommended default. Teams using gitflow or long-lived branches can adapt the principles (atomic commits, small changes, descriptive messages) to their branching model — the commit discipline matters more than the specific branching strategy.
Each successful increment gets its own commit. Don't accumulate large uncommitted changes.
Work pattern: Implement slice → Test → Verify → Commit → Next slice Not this: Implement everything → Hope it works → Giant commit
Commits are save points. If the next change breaks something, you can revert to the last known-good state instantly.
Each commit does one logical thing:
# Good: Each commit is self-contained git log --oneline a1b2c3d Add task creation endpoint with validation d4e5f6g Add task creation form component h7i8j9k Connect form to API and add loading state m1n2o3p Add task creation tests (unit + integration) # Bad: Everything mixed together git log --oneline x1y2z3a Add task feature, fix sidebar, update deps, refactor utils
Commit messages explain the *why*, not just the *what*:
# Good: Explains intent feat: add email validation to registration endpoint Prevents invalid email formats from reaching the database. Uses Zod schema validation at the route handler level, consistent with existing validation patterns in auth.ts. # Bad: Describes what's obvious from the diff update auth.ts
**Format:**
<type>: <short description> <optional body explaining why, not what>
**Types:**
Don't combine formatting changes with behavior changes. Don't combine refactors with features. Each type of change should be a separate commit — and ideally a separate PR:
# Good: Separate concerns git commit -m "refactor: extract validation logic to shared utility" git commit -m "feat: add phone number validation to registration" # Bad: Mixed concerns git commit -m "refactor validation and add phone number field"
**Separate refactoring from feature work.** A refactoring change and a feature change are two different changes — submit them separately. This makes each change easier to review, revert, and understand in history. Small cleanups (renaming a variable) can be included in a feature commit at reviewer discretion.
Target ~100 lines per commit/PR. Changes over ~1000 lines should be split. See the splitting strategies in `code-review-and-quality` for how to break down large changes.
~100 lines → Easy to review, easy to revert ~300 lines → Acceptable for a single logical change ~1000 lines → Split into smaller changes
main (always deployable) │ ├── feature/task-creation ← One feature per branch ├── feature/user-settings ← Parallel work └── fix/duplicate-tasks ← Bug fixes
feature/<short-description> → feature/task-creation fix/<short-description> → fix/duplicate-tasks chore/<short-description> → chore/update-deps refactor/<short-description> → refactor/auth-module
For parallel AI agent work, use git worktrees to run multiple branches simultaneously:
# Create a worktree for a feature branch git worktree add ../project-feature-a feature/task-creation git worktree add ../project-feature-b feature/user-settings # Each worktree is a separate directory with its own branch # Agents can work in parallel without interfering ls ../ project/ ← main branch project-feature-a/ ← task-creation branch project-feature-b/ ← user-settings branch # When done, merge and clean up git worktree remove ../project-feature-a
Benefits:
Production-grade engineering skills for AI coding agents. Skills encode the workflows, quality gates, and best practices that senior engineers use when building software.
Get the whole plugin, auto-invokedRepo: addyosmani/agent-skills
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints,…
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture…
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test…
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to…
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend…
Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane…