git-workflow

git-workflow is a skill for Claude Code, Codex from dimetron/pi-go. It costs 59 tokens per session (2,953 once invoked), scanned A, original, MIT.

A set of rules for working with Git, the version-control system that records code changes. It covers separate worktrees, signed commits, signature checks, history rewrites, and checks for large files and GIFs.

In plain words
What is it for?
It helps choose or create the right worktree, sign and verify commits, re-sign known problematic commits, rewrite history safely, and handle large-file or GIF hook failures.
Why use it?
A separate worktree prevents branch switching from discarding uncommitted work, while the other checks prevent rejected pushes and unverifiable or unsuitable commits.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code; mentions AGENTS.md.

Good fit It helps choose or create the right worktree, sign and verify commits, re-sign known problematic commits, rewrite history safely, and handle large-file or GIF hook failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dimetron/pi-go/git-workflow
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.

Any agent
npx skills add dimetron/pi-go --skill git-workflow
Clone the repo
git clone --depth 1 https://github.com/dimetron/pi-go

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimetron/pi-go/git-workflow/github.svg)](https://agentmods.dev/skills/dimetron/pi-go/git-workflow)
Your own site
<a href="https://agentmods.dev/skills/dimetron/pi-go/git-workflow"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/git-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/dimetron/pi-go/git-workflow"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/git-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,953 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00059 $0.02953
Opus 5.5 $0.00024 $0.01181
Sonnet 5.5 $0.00012 $0.00591
Haiku 4.5 $0.00006 $0.00295

Measured 12d ago against content hash 92595ebb2f98, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 12d 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.

.pi-go/skills/git-workflow/SKILL.md · 256 lines

How it starts

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

Git workflow: worktrees, signed commits, large files

The always-on rules are in the root AGENTS.md. This is the full reference: the commands, the reasons, and the history behind each rule.

Work in a git worktree, not the primary checkout

Do not make uncommitted edits in the primary checkout and leave them there. The primary checkout has its branch switched frequently, and git checkout discards uncommitted changes in tracked files without warning. Work has been lost to this. A worktree gives each task its own working directory and its own branch, so a switch in one cannot destroy another.

Check first: are you already in a worktree?

Do not create a worktree when you are already inside one. Nesting a worktree below another puts the new branch's base at the enclosing worktree's HEAD, and leaves two worktrees whose branches shadow each other on the same task. If you are already in one, work in the current directory.

The check is a comparison, because git rev-parse --git-dir and --git-common-dir differ in exactly the case that matters:

# Already in a worktree? Then the two paths differ.
if [ "$(git rev-parse --git-dir)" != "$(git rev-parse --git-common-dir)" ]; then
  echo "already in a worktree: $(git rev-parse --show-toplevel) — work here"
else
  echo "primary checkout — create a worktree for this task"
fi

In the primary checkout both report .git. Inside a linked worktree --git-dir is <repo>/.git/worktrees/<name> while --git-common-dir stays <repo>/.git.

Create one only when that check says you are in the primary checkout:

git worktree add -b fix/<topic> .worktrees/fix-<topic> HEAD
cd .worktrees/fix-<topic>

Remove it when the branch is merged or abandoned:

git worktree remove .worktrees/fix-<topic>
git worktree list          # verify; prune stale metadata with `git worktree prune`

Where worktrees live

Three conventions coexist. Match the one that fits who is doing the work.

Creator Path Branch Notes
Human / Claude Code <repo>/.worktrees/<branch-with-dashes> fix/…, feat/… Inside the repo; .worktrees/ is gitignored
pi-go agent (/run, subagents) <repo>/.pi-go/tasks/<pathID> pi-agent-<shortID>, or the sanitized requested name Created by internal/subagent/worktree.go; .pi-go/ is gitignored
arbor tool ~/.arbor/worktrees/pi-go/<name> matches dir name External tool, listed here only so git worktree list output is not surprising

Read the full file on GitHub · 256 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. 12d ago First seen · 256 lines · 59 tokens per session scan A 92595ebb2f98

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository dimetron/pi-go (232 stars, last pushed 6d ago), licensed MIT. It adds 59 tokens to every session and 2,953 once invoked, about $0.0002 per session on Opus 5.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-11-18.

Related

git-workflow compared with skills from other repositories

git-workflow next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-workflowdimetron/pi-goSkill2326d agoMITA59Claude Code, Codex
writing-git-commitspatriceckhart/zotSkill372todayMITA14Claude Code, Codex
autofix-prQwenLM/qwen-codeSkill31ktodayApache-2.0A142Claude Code
cw-landHmbown/CodewhaleSkill41k1mo agoMITA44Claude Code, Codex
commit-msgjrswab/axeSkill914todayApache-2.0A0Claude Code, Codex
commit-stagedGoldziher/ai-rulezSkill1825d agoMITA23Claude Code
pixiv-cli-developFlanChanXwO/pixiv-cliSkill1408d agoMITA49Codex