gmc

gmc is a skill for Claude Code, Codex from samzong/gmc. It costs 123 tokens per session (1,278 once invoked), scanned A, original, MIT.

A skill for using the gmc command-line tool to manage Git worktrees, shared resources, tags, and commit messages. A worktree is a separate working folder connected to the same Git repository.

In plain words
What is it for?
Use it for gmc requests such as creating, removing, pruning, sharing, syncing, or reviewing worktrees, generating commit messages, and tagging.
Why use it?
It prevents confusing or incorrect gmc commands by routing each request through a defined workflow and checking the required context.

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/samzong/gmc/gmc
Any agent
npx skills add samzong/gmc --skill gmc
Clone the repo
git clone --depth 1 https://github.com/samzong/gmc

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 gmc

README.md
[![agentmods](https://agentmods.dev/badge/skills/samzong/gmc/gmc.svg)](https://agentmods.dev/skills/samzong/gmc/gmc)
Your own site
<a href="https://agentmods.dev/skills/samzong/gmc/gmc"><img src="https://agentmods.dev/badge/skills/samzong/gmc/gmc.svg" alt="Measured on agentmods" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,278 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.00123 $0.01278
Opus 5 $0.00062 $0.00639
Sonnet 5 $0.00025 $0.00256
Haiku 4.5 $0.00012 $0.00128

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

Security

Grade A, and why

gmc 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 4d 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.

skills/gmc/SKILL.md · 115 lines

How it starts

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

IRON LAW: ALL WORKTREE OPERATIONS MUST USE gmc wt <subcommand>. NEVER INVENT gmc add, gmc rm, gmc prune, gmc clone, OR OTHER TOP-LEVEL WORKTREE COMMANDS.

gmc

Use $ARGUMENTS and the user's words to route into exactly one mode.

Copy this checklist and check off items as you complete them:

  • Step 0: Parse intent [BLOCKING]
    • Classify the request as commit, wt add, wt prune, wt share, wt sync, wt rm, wt ls, wt dup, wt pr-review, or tag
    • If the intent is unclear, ask one focused question before running commands
  • Step 1: Validate context [BLOCKING]
    • Confirm gmc exists
    • Confirm the current directory is a git repo when the command needs repo context
    • If the action depends on GitHub state, confirm gh works first
  • Step 2: Preview plan [REQUIRED]
    • Show the exact command you plan to run
    • For destructive or bulk actions, prefer --dry-run first
  • Step 3: Execute exactly one workflow
    • commit
    • wt add
    • wt prune
    • wt share
    • other gmc wt subcommand or tag
  • Step 4: Report result
    • State the exact command run
    • Report the created path, cleaned worktrees, synced resources, or generated message
    • State what was not run

Routing

  • commit uses top-level gmc
  • Any worktree action uses gmc wt <subcommand>
  • If the user says gmc add, translate it to gmc wt add and say so
  • If the user wants generic git help without gmc, do not use this skill

Common commands

  • gmc
  • gmc -y
  • gmc -a -y
  • gmc -a -y -p "context"
  • gmc --dry-run
  • gmc wt add <name>
  • gmc wt add <name> --sync
  • gmc wt add <name> -b <branch>
  • gmc wt ls
  • gmc wt rm <name>
  • gmc wt rm -D <name>
  • gmc wt prune
  • gmc wt sync
  • gmc wt share ls
  • gmc wt share add <path> --strategy copy
  • gmc wt share add <path> --strategy link
  • gmc wt share sync
  • gmc tag

Workflow: commit mode

  • Use top-level gmc, not gmc wt
  • Default to interactive gmc unless the user explicitly wants automation
  • Ask before gmc -a -y because it stages all files and auto-confirms
  • Use gmc --dry-run when the user wants a suggested message without committing

Read the full file on GitHub · 115 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. 4d ago First seen · 115 lines · 123 tokens per session scan A 8438f608f98b

Subscribe to this mod's changes

gmc is a skill published in the GitHub repository samzong/gmc (18 stars, last pushed 2mo ago), licensed MIT. It adds 123 tokens to every session and 1,278 once invoked, about $0.0006 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.