Creator · addyosmani
Last updated · Sep 1, 2026
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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,
Creator · addyosmani
Last updated · Sep 1, 2026
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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,
Creator · addyosmani
Last updated · Sep 1, 2026
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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,
Creator · addyosmani
Last updated · Sep 1, 2026
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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,
Sandbox only
Install targets
Codex install prompt
Install the "git-workflow-and-versioning" agent skill from https://github.com/addyosmani/agent-skills/tree/main/skills/git-workflow-and-versioning. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"addyosmani-git-workflow-and-versioning","task":"Install git-workflow-and-versioning","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Maintenance
fresh
8d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
91K
95/100 Quality · 78/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
91K GitHub stars
Repo activity
91K stars, 9.8K forks
Maintenance
8d since push
License
MIT
Install
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
Agent should check
Copy prompt
Task: Use git-workflow-and-versioning in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install
Install command: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
LLM text format
/api/skills/addyosmani-git-workflow-and-versioning/install?format=text
Find alternatives
/api/skills/search?q=git-workflow-and-versioning&limit=3
Agent prompt
Use git-workflow-and-versioning for this task. Review https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install, then install with: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/addyosmani-git-workflow-and-versioning
LLM text
/api/registry/manifest/addyosmani-git-workflow-and-versioning?format=text
Install alias
/api/registry/install/addyosmani-git-workflow-and-versioning
Recommend
/api/registry/recommend?task=Use%20git-workflow-and-versioning%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
GitHub automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS91K GitHub stars
Stars/forks activity
PASS91K stars, 9.8K forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Automate repeated work
I need my agent to automate a repeated workflow across tools and files.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: git-workflow-and-versioning description: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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 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 is the mechanism that keeps changes manageable, reviewable, and reversible.
## When to Use
Always. Every code change flows through git.
## Core Principles
### Trunk-Based Development (Recommended)
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.
- **Dev branches are costs.** Every day a branch lives, it accumulates merge risk. - **Release branches are acceptable.** When you need to stabilize a release while main moves forward. - **Feature flags > long branches.** Prefer deploying incomplete work behind flags rather than keeping it on a branch for weeks.
### 1. Commit Early, Commit Often
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.
### 2. Atomic Commits
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 ```
### 3. Descriptive Messages
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:** - `feat` — New feature - `fix` — Bug fix - `refactor` — Code change that neither fixes a bug nor adds a feature - `test` — Adding or updating tests - `docs` — Documentation only - `chore` — Tooling, dependencies, config
### 4. Keep Concerns Separate
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.
### 5. Size Your Changes
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 ```
## Branching Strategy
### Feature Branches
``` main (always deployable) │ ├── feature/task-creation ← One feature per branch ├── feature/user-settings ← Parallel work └── fix/duplicate-tasks ← Bug fixes ```
- Branch from `main` (or the team's default branch) - Keep branches short-lived (merge within 1-3 days) — long-lived branches are hidden costs - Delete branches after merge - Prefer feature flags over long-lived branches for incomplete features
### 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 ```
## Working with Worktrees
For parallel AI agent work, use git worktrees to run multiple branches simultaneously:
```bash # 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: - Multiple agents can work on different features simultaneously - No branch switching needed (each directory has its own branch) - If one experiment fails, delete the worktree — nothing is lost - Changes are isolated until explicitly merged
## The Save Point Pattern
``` Agent starts work │ ├── Makes a change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ ├── Makes another change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ └── Feature complete → All commits form a clean history ```
This pattern means you never lose more than one increment of work. If an agent goes off the rails, `git reset --hard HEAD` takes you back to the last successful state.
## Change Summaries
After any modification, provide a structured summary. This makes review easier, documents scope discipline, and surfaces unintended changes:
``` 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 - src/middleware/error.ts: Error format could be improved (separate task)
POTENTIAL CONCERNS: - The Zod schema is strict — rejects extra fields. Confirm this is desired. - Added zod as a dependency (72KB gzipped) — already in package.json ```
This pattern catches wrong assumptions early and gives reviewers a clear map of the change. The "DIDN'T TOUCH" section is especially important — it shows you exercised scope discipline and didn't go on an unsolicited renovation.
## Pre-Commit Hygiene
Before every commit:
```bash # 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 npm test
# 4. Run linting npm run lint
# 5. Run type checking npx tsc --noEmit ```
Automate this with git hooks:
```json // package.json (using lint-staged + husky) { "lint-staged": { "*.{ts,tsx}": ["eslint --fix", "prettier --write"], "*.{json,md}": ["prettier --write"] } } ```
## Handling Generated Files
- **Commit generated files** only if the project expects them (e.g., `package-lock.json`, Prisma migrations) - **Don't commit** build output (`dist/`, `.next/`), environment files (`.env`), or IDE config (`.vscode/settings.json` unless shared) - **Have a `.gitignore`** that covers: `node_modules/`, `dist/`, `.env`, `.env.local`, `*.pem`
## Using Git for Debugging
```bash # Find which commit introduced a bug git bisect start git bisect bad HEAD git bisect good <known-good-commit> # Git checkouts midpoints; run your test at each to narrow down
# View what changed recently git log --oneline -20 git diff HEAD~5..HEAD -- src/
# Find who last changed a specific line git blame src/services/task.ts
# Search commit messages for a keyword git log --grep="validation" --oneline ```
## Release & Versioning
Commits are how *you* track change; a **version** is how your *consumers* track it. The moment anything else depends on your code — another team, a published package, a deployed client — "latest on main" stops being a sufficient answer to "what am I running, and is it safe to upgrade?" A version number and a changelog are the contract that answers it.
### Semantic Versioning
For anything with consumers, version `MAJOR.MINOR.PATCH` and let the number carry meaning:
``` MAJOR breaking change — consumers must change their code to upgrade MINOR new functionality, backward-compatible — safe to upgrade PATCH bug fix, backward-compatible — safe to upgrade ```
The number is a promise, so make the code match it. A "patch" that changes behavior consumers relied on is a major change wearing a disguise (Hyrum's Law — see the `api-and-interface-design` skill). When unsure whether a change is breaking, assume it is; a surprise major is far cheaper than a broken consumer.
### Tag the release, and let the tag be the source of truth
A release is an immutable point in history, not a moving branch. Tag it so it can always be reproduced:
```bash git tag -a v1.4.0 -m "Release 1.4.0" git push origin v1.4.0 ```
Derive the version from the tag rather than hand-editing it in scattered files, so the artifact, the tag, and the changelog can never disagree.
### Keep a changelog written for humans
A changelog is not `git log`. It's the curated, consumer-facing answer to "what changed and do I care?" — grouped by `Added / Changed / Fixed / Deprecated / Removed / Security`, newest on top, every entry phrased around user impact, not internal mechanics.
```markdown ## [1.4.0] - 2025-06-12 ### Added - Bulk task import via CSV ### Fixed - Timezone drift in recurring task due dates ### Deprecated - `GET /v1/tasks/all` — use the paginated `GET /v1/tasks` (removal in 2.0) ```
Write the entry in the same change that makes the change, while the impact is fresh — not reconstructed from commit archaeology at release time. Breaking changes get a migration note and a deprecation window (follow the `deprecation-and-migration` skill); shipping the actual release is the `shipping-and-launch` skill's job — this section is the versioning contract that feeds it.
## Common Rationalizations
| Rationalization | Reality | |---|---| | "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 (and future agents) will need to understand what changed and why. | | "I'll squash it all later" | Squashing destroys the development narrative. Prefer clean incremental commits from the start. | | "Branches add overhead" | Short-lived branches are free and prevent conflicting work from colliding. Long-lived branches are the problem — merge within 1-3 days. | | "I'll split this change later" | Large changes are harder to review, riskier to deploy, and harder to revert. Split before submitting, not after. | | "I don't
Source provenance
Decision snapshot
91,373 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for git-workflow-and-versioning, ready for a manual X post.
git-workflow-and-versioning: Structures git workflow practices. Use when making any code change. Use when committing, bran... 91.4K stars https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x
Listing + install path for git-workflow-and-versioning: https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x Install: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to addyosmani but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning/audit)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)addyosmani
@addyosmani
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "git-workflow-and-versioning" agent skill from https://github.com/addyosmani/agent-skills/tree/main/skills/git-workflow-and-versioning. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"addyosmani-git-workflow-and-versioning","task":"Install git-workflow-and-versioning","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Maintenance
fresh
8d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
91K
95/100 Quality · 78/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
91K GitHub stars
Repo activity
91K stars, 9.8K forks
Maintenance
8d since push
License
MIT
Install
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
Agent should check
Copy prompt
Task: Use git-workflow-and-versioning in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install
Install command: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
LLM text format
/api/skills/addyosmani-git-workflow-and-versioning/install?format=text
Find alternatives
/api/skills/search?q=git-workflow-and-versioning&limit=3
Agent prompt
Use git-workflow-and-versioning for this task. Review https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install, then install with: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/addyosmani-git-workflow-and-versioning
LLM text
/api/registry/manifest/addyosmani-git-workflow-and-versioning?format=text
Install alias
/api/registry/install/addyosmani-git-workflow-and-versioning
Recommend
/api/registry/recommend?task=Use%20git-workflow-and-versioning%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
GitHub automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS91K GitHub stars
Stars/forks activity
PASS91K stars, 9.8K forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Automate repeated work
I need my agent to automate a repeated workflow across tools and files.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: git-workflow-and-versioning description: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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 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 is the mechanism that keeps changes manageable, reviewable, and reversible.
## When to Use
Always. Every code change flows through git.
## Core Principles
### Trunk-Based Development (Recommended)
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.
- **Dev branches are costs.** Every day a branch lives, it accumulates merge risk. - **Release branches are acceptable.** When you need to stabilize a release while main moves forward. - **Feature flags > long branches.** Prefer deploying incomplete work behind flags rather than keeping it on a branch for weeks.
### 1. Commit Early, Commit Often
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.
### 2. Atomic Commits
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 ```
### 3. Descriptive Messages
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:** - `feat` — New feature - `fix` — Bug fix - `refactor` — Code change that neither fixes a bug nor adds a feature - `test` — Adding or updating tests - `docs` — Documentation only - `chore` — Tooling, dependencies, config
### 4. Keep Concerns Separate
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.
### 5. Size Your Changes
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 ```
## Branching Strategy
### Feature Branches
``` main (always deployable) │ ├── feature/task-creation ← One feature per branch ├── feature/user-settings ← Parallel work └── fix/duplicate-tasks ← Bug fixes ```
- Branch from `main` (or the team's default branch) - Keep branches short-lived (merge within 1-3 days) — long-lived branches are hidden costs - Delete branches after merge - Prefer feature flags over long-lived branches for incomplete features
### 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 ```
## Working with Worktrees
For parallel AI agent work, use git worktrees to run multiple branches simultaneously:
```bash # 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: - Multiple agents can work on different features simultaneously - No branch switching needed (each directory has its own branch) - If one experiment fails, delete the worktree — nothing is lost - Changes are isolated until explicitly merged
## The Save Point Pattern
``` Agent starts work │ ├── Makes a change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ ├── Makes another change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ └── Feature complete → All commits form a clean history ```
This pattern means you never lose more than one increment of work. If an agent goes off the rails, `git reset --hard HEAD` takes you back to the last successful state.
## Change Summaries
After any modification, provide a structured summary. This makes review easier, documents scope discipline, and surfaces unintended changes:
``` 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 - src/middleware/error.ts: Error format could be improved (separate task)
POTENTIAL CONCERNS: - The Zod schema is strict — rejects extra fields. Confirm this is desired. - Added zod as a dependency (72KB gzipped) — already in package.json ```
This pattern catches wrong assumptions early and gives reviewers a clear map of the change. The "DIDN'T TOUCH" section is especially important — it shows you exercised scope discipline and didn't go on an unsolicited renovation.
## Pre-Commit Hygiene
Before every commit:
```bash # 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 npm test
# 4. Run linting npm run lint
# 5. Run type checking npx tsc --noEmit ```
Automate this with git hooks:
```json // package.json (using lint-staged + husky) { "lint-staged": { "*.{ts,tsx}": ["eslint --fix", "prettier --write"], "*.{json,md}": ["prettier --write"] } } ```
## Handling Generated Files
- **Commit generated files** only if the project expects them (e.g., `package-lock.json`, Prisma migrations) - **Don't commit** build output (`dist/`, `.next/`), environment files (`.env`), or IDE config (`.vscode/settings.json` unless shared) - **Have a `.gitignore`** that covers: `node_modules/`, `dist/`, `.env`, `.env.local`, `*.pem`
## Using Git for Debugging
```bash # Find which commit introduced a bug git bisect start git bisect bad HEAD git bisect good <known-good-commit> # Git checkouts midpoints; run your test at each to narrow down
# View what changed recently git log --oneline -20 git diff HEAD~5..HEAD -- src/
# Find who last changed a specific line git blame src/services/task.ts
# Search commit messages for a keyword git log --grep="validation" --oneline ```
## Release & Versioning
Commits are how *you* track change; a **version** is how your *consumers* track it. The moment anything else depends on your code — another team, a published package, a deployed client — "latest on main" stops being a sufficient answer to "what am I running, and is it safe to upgrade?" A version number and a changelog are the contract that answers it.
### Semantic Versioning
For anything with consumers, version `MAJOR.MINOR.PATCH` and let the number carry meaning:
``` MAJOR breaking change — consumers must change their code to upgrade MINOR new functionality, backward-compatible — safe to upgrade PATCH bug fix, backward-compatible — safe to upgrade ```
The number is a promise, so make the code match it. A "patch" that changes behavior consumers relied on is a major change wearing a disguise (Hyrum's Law — see the `api-and-interface-design` skill). When unsure whether a change is breaking, assume it is; a surprise major is far cheaper than a broken consumer.
### Tag the release, and let the tag be the source of truth
A release is an immutable point in history, not a moving branch. Tag it so it can always be reproduced:
```bash git tag -a v1.4.0 -m "Release 1.4.0" git push origin v1.4.0 ```
Derive the version from the tag rather than hand-editing it in scattered files, so the artifact, the tag, and the changelog can never disagree.
### Keep a changelog written for humans
A changelog is not `git log`. It's the curated, consumer-facing answer to "what changed and do I care?" — grouped by `Added / Changed / Fixed / Deprecated / Removed / Security`, newest on top, every entry phrased around user impact, not internal mechanics.
```markdown ## [1.4.0] - 2025-06-12 ### Added - Bulk task import via CSV ### Fixed - Timezone drift in recurring task due dates ### Deprecated - `GET /v1/tasks/all` — use the paginated `GET /v1/tasks` (removal in 2.0) ```
Write the entry in the same change that makes the change, while the impact is fresh — not reconstructed from commit archaeology at release time. Breaking changes get a migration note and a deprecation window (follow the `deprecation-and-migration` skill); shipping the actual release is the `shipping-and-launch` skill's job — this section is the versioning contract that feeds it.
## Common Rationalizations
| Rationalization | Reality | |---|---| | "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 (and future agents) will need to understand what changed and why. | | "I'll squash it all later" | Squashing destroys the development narrative. Prefer clean incremental commits from the start. | | "Branches add overhead" | Short-lived branches are free and prevent conflicting work from colliding. Long-lived branches are the problem — merge within 1-3 days. | | "I'll split this change later" | Large changes are harder to review, riskier to deploy, and harder to revert. Split before submitting, not after. | | "I don't
Source provenance
Decision snapshot
91,373 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for git-workflow-and-versioning, ready for a manual X post.
git-workflow-and-versioning: Structures git workflow practices. Use when making any code change. Use when committing, bran... 91.4K stars https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x
Listing + install path for git-workflow-and-versioning: https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x Install: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to addyosmani but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning/audit)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)addyosmani
@addyosmani
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "git-workflow-and-versioning" agent skill from https://github.com/addyosmani/agent-skills/tree/main/skills/git-workflow-and-versioning. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"addyosmani-git-workflow-and-versioning","task":"Install git-workflow-and-versioning","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Maintenance
fresh
8d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
91K
95/100 Quality · 78/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
91K GitHub stars
Repo activity
91K stars, 9.8K forks
Maintenance
8d since push
License
MIT
Install
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
Agent should check
Copy prompt
Task: Use git-workflow-and-versioning in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install
Install command: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
LLM text format
/api/skills/addyosmani-git-workflow-and-versioning/install?format=text
Find alternatives
/api/skills/search?q=git-workflow-and-versioning&limit=3
Agent prompt
Use git-workflow-and-versioning for this task. Review https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install, then install with: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/addyosmani-git-workflow-and-versioning
LLM text
/api/registry/manifest/addyosmani-git-workflow-and-versioning?format=text
Install alias
/api/registry/install/addyosmani-git-workflow-and-versioning
Recommend
/api/registry/recommend?task=Use%20git-workflow-and-versioning%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
GitHub automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS91K GitHub stars
Stars/forks activity
PASS91K stars, 9.8K forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Automate repeated work
I need my agent to automate a repeated workflow across tools and files.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: git-workflow-and-versioning description: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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 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 is the mechanism that keeps changes manageable, reviewable, and reversible.
## When to Use
Always. Every code change flows through git.
## Core Principles
### Trunk-Based Development (Recommended)
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.
- **Dev branches are costs.** Every day a branch lives, it accumulates merge risk. - **Release branches are acceptable.** When you need to stabilize a release while main moves forward. - **Feature flags > long branches.** Prefer deploying incomplete work behind flags rather than keeping it on a branch for weeks.
### 1. Commit Early, Commit Often
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.
### 2. Atomic Commits
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 ```
### 3. Descriptive Messages
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:** - `feat` — New feature - `fix` — Bug fix - `refactor` — Code change that neither fixes a bug nor adds a feature - `test` — Adding or updating tests - `docs` — Documentation only - `chore` — Tooling, dependencies, config
### 4. Keep Concerns Separate
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.
### 5. Size Your Changes
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 ```
## Branching Strategy
### Feature Branches
``` main (always deployable) │ ├── feature/task-creation ← One feature per branch ├── feature/user-settings ← Parallel work └── fix/duplicate-tasks ← Bug fixes ```
- Branch from `main` (or the team's default branch) - Keep branches short-lived (merge within 1-3 days) — long-lived branches are hidden costs - Delete branches after merge - Prefer feature flags over long-lived branches for incomplete features
### 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 ```
## Working with Worktrees
For parallel AI agent work, use git worktrees to run multiple branches simultaneously:
```bash # 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: - Multiple agents can work on different features simultaneously - No branch switching needed (each directory has its own branch) - If one experiment fails, delete the worktree — nothing is lost - Changes are isolated until explicitly merged
## The Save Point Pattern
``` Agent starts work │ ├── Makes a change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ ├── Makes another change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ └── Feature complete → All commits form a clean history ```
This pattern means you never lose more than one increment of work. If an agent goes off the rails, `git reset --hard HEAD` takes you back to the last successful state.
## Change Summaries
After any modification, provide a structured summary. This makes review easier, documents scope discipline, and surfaces unintended changes:
``` 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 - src/middleware/error.ts: Error format could be improved (separate task)
POTENTIAL CONCERNS: - The Zod schema is strict — rejects extra fields. Confirm this is desired. - Added zod as a dependency (72KB gzipped) — already in package.json ```
This pattern catches wrong assumptions early and gives reviewers a clear map of the change. The "DIDN'T TOUCH" section is especially important — it shows you exercised scope discipline and didn't go on an unsolicited renovation.
## Pre-Commit Hygiene
Before every commit:
```bash # 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 npm test
# 4. Run linting npm run lint
# 5. Run type checking npx tsc --noEmit ```
Automate this with git hooks:
```json // package.json (using lint-staged + husky) { "lint-staged": { "*.{ts,tsx}": ["eslint --fix", "prettier --write"], "*.{json,md}": ["prettier --write"] } } ```
## Handling Generated Files
- **Commit generated files** only if the project expects them (e.g., `package-lock.json`, Prisma migrations) - **Don't commit** build output (`dist/`, `.next/`), environment files (`.env`), or IDE config (`.vscode/settings.json` unless shared) - **Have a `.gitignore`** that covers: `node_modules/`, `dist/`, `.env`, `.env.local`, `*.pem`
## Using Git for Debugging
```bash # Find which commit introduced a bug git bisect start git bisect bad HEAD git bisect good <known-good-commit> # Git checkouts midpoints; run your test at each to narrow down
# View what changed recently git log --oneline -20 git diff HEAD~5..HEAD -- src/
# Find who last changed a specific line git blame src/services/task.ts
# Search commit messages for a keyword git log --grep="validation" --oneline ```
## Release & Versioning
Commits are how *you* track change; a **version** is how your *consumers* track it. The moment anything else depends on your code — another team, a published package, a deployed client — "latest on main" stops being a sufficient answer to "what am I running, and is it safe to upgrade?" A version number and a changelog are the contract that answers it.
### Semantic Versioning
For anything with consumers, version `MAJOR.MINOR.PATCH` and let the number carry meaning:
``` MAJOR breaking change — consumers must change their code to upgrade MINOR new functionality, backward-compatible — safe to upgrade PATCH bug fix, backward-compatible — safe to upgrade ```
The number is a promise, so make the code match it. A "patch" that changes behavior consumers relied on is a major change wearing a disguise (Hyrum's Law — see the `api-and-interface-design` skill). When unsure whether a change is breaking, assume it is; a surprise major is far cheaper than a broken consumer.
### Tag the release, and let the tag be the source of truth
A release is an immutable point in history, not a moving branch. Tag it so it can always be reproduced:
```bash git tag -a v1.4.0 -m "Release 1.4.0" git push origin v1.4.0 ```
Derive the version from the tag rather than hand-editing it in scattered files, so the artifact, the tag, and the changelog can never disagree.
### Keep a changelog written for humans
A changelog is not `git log`. It's the curated, consumer-facing answer to "what changed and do I care?" — grouped by `Added / Changed / Fixed / Deprecated / Removed / Security`, newest on top, every entry phrased around user impact, not internal mechanics.
```markdown ## [1.4.0] - 2025-06-12 ### Added - Bulk task import via CSV ### Fixed - Timezone drift in recurring task due dates ### Deprecated - `GET /v1/tasks/all` — use the paginated `GET /v1/tasks` (removal in 2.0) ```
Write the entry in the same change that makes the change, while the impact is fresh — not reconstructed from commit archaeology at release time. Breaking changes get a migration note and a deprecation window (follow the `deprecation-and-migration` skill); shipping the actual release is the `shipping-and-launch` skill's job — this section is the versioning contract that feeds it.
## Common Rationalizations
| Rationalization | Reality | |---|---| | "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 (and future agents) will need to understand what changed and why. | | "I'll squash it all later" | Squashing destroys the development narrative. Prefer clean incremental commits from the start. | | "Branches add overhead" | Short-lived branches are free and prevent conflicting work from colliding. Long-lived branches are the problem — merge within 1-3 days. | | "I'll split this change later" | Large changes are harder to review, riskier to deploy, and harder to revert. Split before submitting, not after. | | "I don't
Source provenance
Decision snapshot
91,373 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for git-workflow-and-versioning, ready for a manual X post.
git-workflow-and-versioning: Structures git workflow practices. Use when making any code change. Use when committing, bran... 91.4K stars https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x
Listing + install path for git-workflow-and-versioning: https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x Install: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to addyosmani but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning/audit)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)addyosmani
@addyosmani
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "git-workflow-and-versioning" agent skill from https://github.com/addyosmani/agent-skills/tree/main/skills/git-workflow-and-versioning. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"addyosmani-git-workflow-and-versioning","task":"Install git-workflow-and-versioning","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Maintenance
fresh
8d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
91K
95/100 Quality · 78/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
91K GitHub stars
Repo activity
91K stars, 9.8K forks
Maintenance
8d since push
License
MIT
Install
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
Agent should check
Copy prompt
Task: Use git-workflow-and-versioning in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20git-workflow-and-versioning%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install
Install command: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/addyosmani-git-workflow-and-versioning/install
LLM text format
/api/skills/addyosmani-git-workflow-and-versioning/install?format=text
Find alternatives
/api/skills/search?q=git-workflow-and-versioning&limit=3
Agent prompt
Use git-workflow-and-versioning for this task. Review https://www.openagentskill.com/api/skills/addyosmani-git-workflow-and-versioning/install, then install with: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioningRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/addyosmani-git-workflow-and-versioning
LLM text
/api/registry/manifest/addyosmani-git-workflow-and-versioning?format=text
Install alias
/api/registry/install/addyosmani-git-workflow-and-versioning
Recommend
/api/registry/recommend?task=Use%20git-workflow-and-versioning%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
GitHub automation
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS91K GitHub stars
Stars/forks activity
PASS91K stars, 9.8K forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Automate repeated work
I need my agent to automate a repeated workflow across tools and files.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: git-workflow-and-versioning description: Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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 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 is the mechanism that keeps changes manageable, reviewable, and reversible.
## When to Use
Always. Every code change flows through git.
## Core Principles
### Trunk-Based Development (Recommended)
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.
- **Dev branches are costs.** Every day a branch lives, it accumulates merge risk. - **Release branches are acceptable.** When you need to stabilize a release while main moves forward. - **Feature flags > long branches.** Prefer deploying incomplete work behind flags rather than keeping it on a branch for weeks.
### 1. Commit Early, Commit Often
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.
### 2. Atomic Commits
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 ```
### 3. Descriptive Messages
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:** - `feat` — New feature - `fix` — Bug fix - `refactor` — Code change that neither fixes a bug nor adds a feature - `test` — Adding or updating tests - `docs` — Documentation only - `chore` — Tooling, dependencies, config
### 4. Keep Concerns Separate
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.
### 5. Size Your Changes
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 ```
## Branching Strategy
### Feature Branches
``` main (always deployable) │ ├── feature/task-creation ← One feature per branch ├── feature/user-settings ← Parallel work └── fix/duplicate-tasks ← Bug fixes ```
- Branch from `main` (or the team's default branch) - Keep branches short-lived (merge within 1-3 days) — long-lived branches are hidden costs - Delete branches after merge - Prefer feature flags over long-lived branches for incomplete features
### 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 ```
## Working with Worktrees
For parallel AI agent work, use git worktrees to run multiple branches simultaneously:
```bash # 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: - Multiple agents can work on different features simultaneously - No branch switching needed (each directory has its own branch) - If one experiment fails, delete the worktree — nothing is lost - Changes are isolated until explicitly merged
## The Save Point Pattern
``` Agent starts work │ ├── Makes a change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ ├── Makes another change │ ├── Test passes? → Commit → Continue │ └── Test fails? → Revert to last commit → Investigate │ └── Feature complete → All commits form a clean history ```
This pattern means you never lose more than one increment of work. If an agent goes off the rails, `git reset --hard HEAD` takes you back to the last successful state.
## Change Summaries
After any modification, provide a structured summary. This makes review easier, documents scope discipline, and surfaces unintended changes:
``` 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 - src/middleware/error.ts: Error format could be improved (separate task)
POTENTIAL CONCERNS: - The Zod schema is strict — rejects extra fields. Confirm this is desired. - Added zod as a dependency (72KB gzipped) — already in package.json ```
This pattern catches wrong assumptions early and gives reviewers a clear map of the change. The "DIDN'T TOUCH" section is especially important — it shows you exercised scope discipline and didn't go on an unsolicited renovation.
## Pre-Commit Hygiene
Before every commit:
```bash # 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 npm test
# 4. Run linting npm run lint
# 5. Run type checking npx tsc --noEmit ```
Automate this with git hooks:
```json // package.json (using lint-staged + husky) { "lint-staged": { "*.{ts,tsx}": ["eslint --fix", "prettier --write"], "*.{json,md}": ["prettier --write"] } } ```
## Handling Generated Files
- **Commit generated files** only if the project expects them (e.g., `package-lock.json`, Prisma migrations) - **Don't commit** build output (`dist/`, `.next/`), environment files (`.env`), or IDE config (`.vscode/settings.json` unless shared) - **Have a `.gitignore`** that covers: `node_modules/`, `dist/`, `.env`, `.env.local`, `*.pem`
## Using Git for Debugging
```bash # Find which commit introduced a bug git bisect start git bisect bad HEAD git bisect good <known-good-commit> # Git checkouts midpoints; run your test at each to narrow down
# View what changed recently git log --oneline -20 git diff HEAD~5..HEAD -- src/
# Find who last changed a specific line git blame src/services/task.ts
# Search commit messages for a keyword git log --grep="validation" --oneline ```
## Release & Versioning
Commits are how *you* track change; a **version** is how your *consumers* track it. The moment anything else depends on your code — another team, a published package, a deployed client — "latest on main" stops being a sufficient answer to "what am I running, and is it safe to upgrade?" A version number and a changelog are the contract that answers it.
### Semantic Versioning
For anything with consumers, version `MAJOR.MINOR.PATCH` and let the number carry meaning:
``` MAJOR breaking change — consumers must change their code to upgrade MINOR new functionality, backward-compatible — safe to upgrade PATCH bug fix, backward-compatible — safe to upgrade ```
The number is a promise, so make the code match it. A "patch" that changes behavior consumers relied on is a major change wearing a disguise (Hyrum's Law — see the `api-and-interface-design` skill). When unsure whether a change is breaking, assume it is; a surprise major is far cheaper than a broken consumer.
### Tag the release, and let the tag be the source of truth
A release is an immutable point in history, not a moving branch. Tag it so it can always be reproduced:
```bash git tag -a v1.4.0 -m "Release 1.4.0" git push origin v1.4.0 ```
Derive the version from the tag rather than hand-editing it in scattered files, so the artifact, the tag, and the changelog can never disagree.
### Keep a changelog written for humans
A changelog is not `git log`. It's the curated, consumer-facing answer to "what changed and do I care?" — grouped by `Added / Changed / Fixed / Deprecated / Removed / Security`, newest on top, every entry phrased around user impact, not internal mechanics.
```markdown ## [1.4.0] - 2025-06-12 ### Added - Bulk task import via CSV ### Fixed - Timezone drift in recurring task due dates ### Deprecated - `GET /v1/tasks/all` — use the paginated `GET /v1/tasks` (removal in 2.0) ```
Write the entry in the same change that makes the change, while the impact is fresh — not reconstructed from commit archaeology at release time. Breaking changes get a migration note and a deprecation window (follow the `deprecation-and-migration` skill); shipping the actual release is the `shipping-and-launch` skill's job — this section is the versioning contract that feeds it.
## Common Rationalizations
| Rationalization | Reality | |---|---| | "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 (and future agents) will need to understand what changed and why. | | "I'll squash it all later" | Squashing destroys the development narrative. Prefer clean incremental commits from the start. | | "Branches add overhead" | Short-lived branches are free and prevent conflicting work from colliding. Long-lived branches are the problem — merge within 1-3 days. | | "I'll split this change later" | Large changes are harder to review, riskier to deploy, and harder to revert. Split before submitting, not after. | | "I don't
Source provenance
Decision snapshot
91,373 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for git-workflow-and-versioning, ready for a manual X post.
git-workflow-and-versioning: Structures git workflow practices. Use when making any code change. Use when committing, bran... 91.4K stars https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x
Listing + install path for git-workflow-and-versioning: https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=x Install: npx skills add addyosmani/agent-skills --skill git-workflow-and-versioning
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to addyosmani but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning/audit)
[](https://www.openagentskill.com/skills/addyosmani-git-workflow-and-versioning?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)addyosmani
@addyosmani
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsPermission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness