samzong/gmc/gmc
Claude Code and agent skill by samzong/gmc
- community
Checking that the SKILL.md file is still in the repository.
Use the `gmc` CLI for explicit gmc requests: generate commit messages, create or remove worktrees, prune merged worktrees, discover or sync shared resources, or run other `gmc wt` subcommands. Triggers mainly when the user invokes `/gmc` or mentions `gmc wt add`, `gmc wt prune`, `gmc wt share`, `gmc wt sync`, `gmc tag`, or asks to use gmc for commit or worktree automation. Do not use for generic git or generic worktree requests unless the user specifically wants `gmc`.
Install
npx vskill@latest install samzong/gmc/gmcSKILL.md
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, ortag - [ ] If the intent is unclear, ask one focused question before running commands
- [ ] Step 1: Validate context [BLOCKING]
- [ ] Confirm
gmcexists - [ ] Confirm the current directory is a git repo when the command needs repo context
- [ ] If the action depends on GitHub state, confirm
ghworks first - [ ] Step 2: Preview plan [REQUIRED]
- [ ] Show the exact command you plan to run
- [ ] For destructive or bulk actions, prefer
--dry-runfirst - [ ] Step 3: Execute exactly one workflow
- [ ]
commit - [ ]
wt add - [ ]
wt prune - [ ]
wt share - [ ] other
gmc wtsubcommand ortag - [ ] 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
commituses top-levelgmc- Any worktree action uses
gmc wt <subcommand> - If the user says
gmc add, translate it togmc wt addand say so - If the user wants generic git help without
gmc, do not use this skill
Common commands
gmcgmc -ygmc -a -ygmc -a -y -p "context"gmc --dry-rungmc wt add <name>gmc wt add <name> --syncgmc wt add <name> -b <branch>gmc wt lsgmc wt list -Agmc wt rm <name>gmc wt rm -D <name>gmc wt prunegmc wt syncgmc wt share lsgmc wt share add <path> --strategy copygmc wt share add <path> --strategy linkgmc wt share syncgmc tag
Workflow: commit mode
- Use top-level
gmc, notgmc wt - Default to interactive
gmcunless the user explicitly wants automation - Ask before
gmc -a -ybecause it stages all files and auto-confirms - Use
gmc --dry-runwhen the user wants a suggested message without committing
Workflow: create worktree
- Read
worktree.rootonly from global configuration, alongsideshared; project files cannot set it. - New add, dup, and PR worktrees use
<root>/<owner>/<repo>/<repo>--<name>; owner comes fromoriginor the repository directory's parent. - If root is missing, warn and use the old location without creating root; clone's initial main worktree stays in place.
- Native Git locks protect global worktrees. Before direct
git worktree removeorgit worktree move, unlock them or use-f -f. - Offline
gmc wt rmandgmc wt prunepreserve Git metadata and branches, including with--force. gmc manages its own locks and keeps manual locks.
- Use
gmc wt add <name> - Use
-b <branch>only if the user provided a base branch or asked for one - Use
--synconly when the user wants the latest base first - After creation, report the worktree path
- When you need the result programmatically, run
gmc wt add <name> -o json,gmc wt add --pr <number> -o json, orgmc wt dup [N] -o json:
stdout is an array of {name, path, branch, base, created, error, warnings}. Continue with items where created is true, even if the command exits non-zero; report error and warnings
gmc wt list -o jsonaddsallocated_bytes; when a size cannot be measured it is omitted and
issues: [{source: "size", code, message}] explains why
Workflow: prune merged worktrees
- Run
gmc wt prune --dry-runfirst to preview - Use
gmc wt prune --all --pr-aware --dry-runto preview cleanup across repositories with linked worktrees in the home directory - Use
gmc wt prune --pr-awareto check PR state before pruning - Use
gmc wt prune --brancheswhen the user wants stale local branches without worktrees cleaned too - Ask before actual removal
- Use
--forceonly with explicit user approval
Workflow: shared resources
- For discovery, run
gmc wt share discover --dry-run - Use
gmc wt share discover --autoonly with explicit approval - For manual control, use
gmc wt share add,gmc wt share ls,gmc wt share rm, orgmc wt share sync - Prefer
copyfor env files or local config - Prefer
linkfor large identical directories such asnode_modulesor.venv - Build output directories (
target,build,dist,.next,.nuxt) cannot be linked — usecopyor leave them unshared
Confirmation gates
- Ask before
gmc -a -y - Ask before
gmc wt rm -D <name> - Ask before any non-dry-run prune
- Ask before
gmc wt share discover --auto - Ask before
--force
Do not
- Do not run
gmc add,gmc rm,gmc prune,gmc clone, orgmc share - Do not skip dry-run for cleanup when a preview exists
- Do not use
--auto,-a -y,-D, or--forcewithout explicit user approval - Do not guess worktree paths, base branches, or GitHub state
- Do not mix commit mode and worktree mode in the same command
Security
- Security scanPassed, 91 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/gmc/SKILL.md
Popularity
- Repository stars
- 28
- Repository forks
- 1
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/samzong/gmc/gmc)