Agent Skills Plugin
git-gud ships as a Claude Code plugin and follows the open Agent Skills standard. This means AI coding agents — Claude Code, Cursor, Gemini CLI, OpenAI Codex, VS Code integrations, and others — can use gg for stacked-diff workflows.
What’s included
The plugin provides two skills:
| Skill | Description |
|---|---|
gg-github | Use gg with GitHub PRs (gh CLI) |
gg-gitlab | Use gg with GitLab MRs (glab CLI, merge trains) |
Each skill includes:
- SKILL.md — concise instructions with agent operating rules
- reference.md — command reference and JSON schemas
- examples/ — step-by-step workflow walkthroughs
Installation
1) Claude Code marketplace (recommended)
claude plugin marketplace add https://github.com/mrmans0n/git-gud
claude plugin install git-gud
2) One-off plugin loading (CLI)
Use this when launching Claude Code directly:
claude --plugin-dir /path/to/git-gud
3) Project-level config (.claude/settings.json)
Use this when you want the plugin enabled by default for a repository:
{
"plugins": [
{
"name": "git-gud",
"path": "/path/to/git-gud"
}
]
}
4) Other Agent Skills-compatible tools
Tools that support the Agent Skills standard can load skills from the repo’s skills/ directory. In practice, this includes Claude Code, Cursor, Gemini CLI, OpenAI Codex, and other compatible agent hosts.
How agents typically use gg
A practical AI-assisted stacked-diff workflow looks like this:
- Agent creates or switches to a stack (
gg co ..., ideally with a worktree) - Agent makes small commits and keeps each commit focused
- Agent syncs the stack (
gg sync) so PRs/MRs are created/updated in order - Agent iterates on review feedback (amend/reorder/re-sync)
- Agent asks for explicit user confirmation before
gg land
This keeps work reviewable while preserving user control over merges.
JSON output for tool-driven agents
For machine-readable parsing, gg supports --json on key commands:
gg ls --jsongg sync --jsongg land --jsongg clean --jsongg lint --json
Use these outputs in agents and automation for reliable state checks and decisions. For full response schemas, see each skill’s reference.md.
Safety model (required behavior)
When using AI agents with gg, keep these rules:
- Never land without explicit user confirmation
- Never run
git add -Ablindly (stage only reviewed/intended files) - Prefer worktrees for isolation (
gg co --wt) - Use structured output (
--json) when automation must parse command results
Skill references
For full operational details, prompts, and examples:
- GitHub skill:
skills/gg-github/SKILL.md - GitLab skill:
skills/gg-gitlab/SKILL.md
File structure
.claude-plugin/
plugin.json # Plugin manifest
skills/
gg-github/
SKILL.md # GitHub skill
reference.md # Command reference + JSON schemas
examples/
basic-flow.md # Simple feature workflow
multi-commit.md # Absorb, reorder, lint
gg-gitlab/
SKILL.md # GitLab skill
reference.md # Command reference + merge trains
examples/
basic-flow.md # Simple feature workflow
merge-train.md # Merge train workflow