git-workflow

A set of Git procedures for feature branches, isolated worktrees, small commits, and completing development work. A worktree is a separate working folder connected to the same Git repository.

In plain words
What is it for?
Use it when starting feature work, creating a branch or worktree, making atomic commits, or finishing a development branch. It helps guide the work from setup through delivery.
Why use it?
It provides a consistent way to keep feature work separate and reduce accidental changes to other work. It also covers the choices involved when finishing a branch, such as merging, opening a pull request, preserving it, or discarding it.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lgbarn/shipyard/git-workflow
Any agent
npx skills add lgbarn/shipyard --skill git-workflow
Clone the repo
git clone --depth 1 https://github.com/lgbarn/shipyard

Made for: Claude Code, Codex.

Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,650 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00076 $0.02650
Opus 5 $0.00038 $0.01325
Sonnet 5 $0.00015 $0.00530
Haiku 4.5 $0.00008 $0.00265

Measured 2d ago against content hash cf20b9072a7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/shipyard/skills/git-workflow/SKILL.md · 431 lines

How it starts

The opening of the file, as written. The whole thing — 431 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Workflow

When This Skill Activates

  • Starting feature work that needs branch isolation
  • Creating, switching, or removing worktrees
  • Completing a development branch (merge, PR, preserve, discard)
  • /shipyard:worktree command invoked

Natural Language Triggers

  • "create branch", "commit this", "merge branch", "start feature", "set up worktree"

Overview

Comprehensive git workflow covering the full development lifecycle: branch creation, worktree isolation, atomic commits, and branch completion.

Core principle: Systematic directory selection + safety verification + structured completion options = reliable development workflow.

Part 1: Branch and Worktree Setup

Announce at start: "I'm using the git-workflow skill to set up an isolated workspace."

Directory Selection Process

Follow this priority order:

1. Check Existing Directories
# Check in priority order
ls -d .worktrees 2>/dev/null     # Preferred (hidden)
ls -d worktrees 2>/dev/null      # Alternative

If found: Use that directory. If both exist, .worktrees wins.

2. Check CLAUDE.md
grep -i "worktree.*director" CLAUDE.md 2>/dev/null

If preference specified: Use it without asking.

3. Ask User

If no directory exists and no CLAUDE.md preference:

No worktree directory found. Where should I create worktrees?

1. .worktrees/ (project-local, hidden)
2. ~/.config/shipyard/worktrees/<project-name>/ (global location)

Which would you prefer?

Safety Verification

For Project-Local Directories (.worktrees or worktrees):

MUST verify directory is ignored before creating worktree:

# Check if directory is ignored (respects local, global, and system gitignore)
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null

If NOT ignored:

Fix immediately:

  1. Add appropriate line to .gitignore
  2. Commit the change
  3. Proceed with worktree creation

Read the full file on GitHub · 431 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 431 lines · 76 tokens per session scan A cf20b9072a7b

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository lgbarn/shipyard (65 stars, last pushed 1mo ago), licensed MIT. It adds 76 tokens to every session and 2,650 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.