git

A guide to using Git for version control and continuous integration, including branches, worktrees, status checks, branch protection, cleanup, and synchronization. Git records code changes so teams can work safely and review history.

In plain words
What is it for?
Use it to create feature branches or worktrees, inspect repository status, protect branches, synchronize changes, and clean up merged branches.
Why use it?
It helps isolate parallel work, choose between a branch and a worktree, and keep repositories organized through common development tasks.

Command

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 commands/data-wise/craft/git
Clone the repo
git clone --depth 1 https://github.com/Data-Wise/craft
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 600 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.00000 $0.00600
Opus 5 $0.00000 $0.00300
Sonnet 5 $0.00000 $0.00120
Haiku 4.5 $0.00000 $0.00060

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

Security

Grade A, and why

git 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 yesterday.

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.

docs/commands/git.md · 70 lines

How it starts

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

Git & CI Commands

Version control and continuous integration.

Note (2026-07 v4 consolidation): All git commands — worktree, sync, recap, init, branch protection, guard management, status, cleanup, and quick-branch creation — were folded into the dev/git skill; there are no longer separate slash commands under /craft:git:*. Ask naturally ("create a worktree for feature-auth", "protect this branch", "check guard status", "clean up merged branches") or see skills/dev/git/SKILL.md directly.

Worktree vs Branch: When to Use What

Scenario Ask Why
Start a new feature "create a worktree for feature-x" Isolated directory, no branch switching
Quick one-file fix "create feature branch x" Lightweight, stays in same directory
Work on 2+ features at once "create a worktree for feature-x" Each feature gets its own directory
Clean up after merge "clean up merged branches" Removes merged branches safely
See what's going on "show git status" Enhanced status with teaching mode support

Decision rule: If the change takes more than one commit or you need to context-switch, use worktree. For quick fixes you'll commit immediately, use branch.

CI commands:

Scenario Command
What CI does my project need? /craft:ci:detect
Generate GitHub Actions workflow /craft:ci:generate
Validate existing CI config /craft:ci:validate

Git Commands (0)

Worktree, sync, recap, init, protect, unprotect, status, clean, branch, and guard were all folded into the dev/git skill (2026-07 v4 consolidation) — ask naturally ("create a worktree for feature-auth", "protect this branch", "unprotect for a merge conflict", "check guard status", "clean up merged branches", "create feature branch x") or see skills/dev/git/SKILL.md.

Read the full file on GitHub · 70 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. yesterday First seen · 70 lines · 0 tokens per session scan A a936af03832d

Subscribe to this mod's changes

git is a command published in the GitHub repository Data-Wise/craft (4 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 600 tokens. 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-31.