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`.
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
Workflow: create worktree
Use gmc wt add <name>
Use -b <branch> only if the user provided a base branch or asked for one
Use --sync only when the user wants the latest base first
After creation, report the worktree path
Workflow: prune merged worktrees
Run gmc wt prune --dry-run first to preview
Use gmc wt prune --pr-aware to check PR state before pruning
Ask before actual removal
Use --force only with explicit user approval
Workflow: shared resources
For discovery, run gmc wt share discover --dry-run
Use gmc wt share discover --auto only with explicit approval
For manual control, use gmc wt share add, gmc wt share ls, gmc wt share rm, or gmc wt share sync
Prefer copy for env files or local config
Prefer link for large identical directories such as node_modules or .venv
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, or gmc share
Do not skip dry-run for cleanup when a preview exists
Do not use --auto, -a -y, -D, or --force without 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
1---2name: gmc3description: 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`.4---56IRON 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.78# gmc910Use `$ARGUMENTS` and the user's words to route into exactly one mode.1112Copy this checklist and check off items as you complete them:1314- [ ] Step 0: Parse intent [BLOCKING]15 - [ ] Classify the request as `commit`, `wt add`, `wt prune`, `wt share`, `wt sync`, `wt rm`, `wt ls`, `wt dup`, `wt pr-review`, or `tag`16 - [ ] If the intent is unclear, ask one focused question before running commands17- [ ] Step 1: Validate context [BLOCKING]18 - [ ] Confirm `gmc` exists19 - [ ] Confirm the current directory is a git repo when the command needs repo context20 - [ ] If the action depends on GitHub state, confirm `gh` works first21- [ ] Step 2: Preview plan [REQUIRED]22 - [ ] Show the exact command you plan to run23 - [ ] For destructive or bulk actions, prefer `--dry-run` first24- [ ] Step 3: Execute exactly one workflow25 - [ ] `commit`26 - [ ] `wt add`27 - [ ] `wt prune`28 - [ ] `wt share`29 - [ ] other `gmc wt` subcommand or `tag`30- [ ] Step 4: Report result31 - [ ] State the exact command run32 - [ ] Report the created path, cleaned worktrees, synced resources, or generated message33 - [ ] State what was not run3435## Routing3637- `commit` uses top-level `gmc`38- Any worktree action uses `gmc wt <subcommand>`39- If the user says `gmc add`, translate it to `gmc wt add` and say so40- If the user wants generic git help without `gmc`, do not use this skill4142## Common commands4344- `gmc`45- `gmc -y`46- `gmc -a -y`47- `gmc -a -y -p "context"`48- `gmc --dry-run`49- `gmc wt add <name>`50- `gmc wt add <name> --sync`51- `gmc wt add <name> -b <branch>`52- `gmc wt ls`53- `gmc wt rm <name>`54- `gmc wt rm -D <name>`55- `gmc wt prune`56- `gmc wt sync`57- `gmc wt share ls`58- `gmc wt share add <path> --strategy copy`59- `gmc wt share add <path> --strategy link`60- `gmc wt share sync`61- `gmc tag`6263## Workflow: commit mode6465- Use top-level `gmc`, not `gmc wt`66- Default to interactive `gmc` unless the user explicitly wants automation67- Ask before `gmc -a -y` because it stages all files and auto-confirms68- Use `gmc --dry-run` when the user wants a suggested message without committing6970## Workflow: create worktree7172- Use `gmc wt add <name>`73- Use `-b <branch>` only if the user provided a base branch or asked for one74- Use `--sync` only when the user wants the latest base first75- After creation, report the worktree path7677## Workflow: prune merged worktrees7879- Run `gmc wt prune --dry-run` first to preview80- Use `gmc wt prune --pr-aware` to check PR state before pruning81- Ask before actual removal82- Use `--force` only with explicit user approval8384## Workflow: shared resources8586- For discovery, run `gmc wt share discover --dry-run`87- Use `gmc wt share discover --auto` only with explicit approval88- For manual control, use `gmc wt share add`, `gmc wt share ls`, `gmc wt share rm`, or `gmc wt share sync`89- Prefer `copy` for env files or local config90- Prefer `link` for large identical directories such as `node_modules` or `.venv`9192## Confirmation gates9394- Ask before `gmc -a -y`95- Ask before `gmc wt rm -D <name>`96- Ask before any non-dry-run prune97- Ask before `gmc wt share discover --auto`98- Ask before `--force`99100## Do not101102- Do not run `gmc add`, `gmc rm`, `gmc prune`, `gmc clone`, or `gmc share`103- Do not skip dry-run for cleanup when a preview exists104- Do not use `--auto`, `-a -y`, `-D`, or `--force` without explicit user approval105- Do not guess worktree paths, base branches, or GitHub state106- Do not mix commit mode and worktree mode in the same command
Run npx skillmds@latest add samzong/gmc in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
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`. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
samzong (@samzong) published this skill. Their other Agent Skills are listed on their SkillMD profile.