Guides creating lazygit customCommands with prompts, contextual keybindings, menus, templates, and conventional-commit flows. Includes all fields, contexts, and data objects.
Ships in supermodel-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
context and command are required (except commandMenu entries — see below).
| Field | Notes |
|---|---|
key | Hotkey — omit to expose via ? menu only |
context | Required. Comma-separated for multi: 'commits, subCommits' |
command | Required. Go template string |
description | Shown in UI and ? menu |
loadingText | Progress label while running |
output | 'none' | 'terminal' | 'log' | 'logWithPty' | 'popup' |
outputTitle | Title for popup output |
after | checkForConflicts |
prompts | List of prompt configs (see below) |
Keys: single letters or special forms like <c-t>, <f5>, <esc>.
status, files, worktrees, localBranches, remotes, remoteBranches, tags, commits, reflogCommits, subCommits, commitFiles, stash, global
All prompts share: type, title, key. Answers referenced as {{.Form.<Key>}}.
- type: 'input'
key: 'Scope'
title: 'Scope (optional):'
initialValue: ''
suggestions:
preset: 'branches' # authors|branches|files|refs|remotes|remoteBranches|tags
# OR: command: 'my-cmd' (mutually exclusive with preset)
- type: 'confirm'
key: 'Confirm'
title: 'Force-push to remote?'
body: 'This will rewrite history on the remote branch.'
Options: value required, name (display label — shows value if omitted), description, key (direct-select).
- type: 'menu'
key: 'Type'
title: 'Commit type:'
options:
- value: 'feat'
name: 'Feature'
description: 'New functionality'
key: 'f'
- value: 'fix'
key: 'x'
- value: 'chore'
- type: 'menuFromCommand'
key: 'Branch'
title: 'Remote branch:'
command: 'git branch -r --list {{.SelectedRemote.Name}}/*'
filter: '.*{{.SelectedRemote.Name}}/(?P<branch>.*)' # named groups: ?P<name>, unnamed: group_1, group_2...
valueFormat: '{{.branch}}'
labelFormat: '{{.branch | green}}'
Without filter/valueFormat/labelFormat, each output line is both value and label.
Objects available in command and prompts:
SelectedFile (files) · SelectedLocalBranch (localBranches) · SelectedRemote (remotes) · SelectedRemoteBranch (remoteBranches) · SelectedTag (tags) · SelectedCommit (commits) · SelectedCommitRange (commits) · SelectedStashEntry (stash) · SelectedCommitFile (commitFiles) · SelectedWorktree (worktrees) · SelectedPath · CheckedOutBranch (global)
Notable fields: SelectedFile.Name, SelectedFile.HasUnstagedChanges, SelectedRemote.Name, SelectedCommitRange.From/.To.
Helpers: quote (safe shell quoting), runCommand (interpolate single-line command output).
Template example with a conditional:
command: "git {{if .SelectedFile.HasUnstagedChanges}}add{{else}}reset{{end}} {{.SelectedFile.Name | quote}}"
Prefer Go template conditionals (if, else if, eq) over shell parsing complexity.
Groups commands under one top-level key. Only key and description allowed at the top level — full fields go on entries:
customCommands:
- key: 'X'
description: 'Patch workflows'
commandMenu:
- key: 'c'
context: 'commits, subCommits'
description: 'Copy range to clipboard'
command: 'git format-patch --stdout {{.SelectedCommitRange.From}}^..{{.SelectedCommitRange.To}} | pbcopy'
- key: 'v'
context: 'commits'
description: 'Apply from clipboard'
command: 'pbpaste | git am'
global, built-in exists for the active specific context → built-in winsSet output: popup and wrap command in echo to preview template resolution without executing.
Return paste-ready YAML with correct indentation and explicit context. Verify keybinding collisions and .Form.<Key> references before finalizing.
Only fetch these if something specific isn't covered above — the spec is long and will waste a ton of context window tokens if you pull it in wholesale unnecessarily.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
22 skills in this plugin
/agent-configCoding agent harness config - Claude Code hooks and settings, Codex config.toml layers, sandbox and approvals, permission profiles, MCP, plugins./analytics-engineeringAnalytics engineering - dbt projects, maintainable SQL as CTE pipelines, event patterns (funnels, sessions, retention, window functions, MATCH_RECOGNIZE)./ascii-animationsASCII and Unicode terminal animations - spinners, logo reveals, particles. Frame loops, character grids, per-character state, performance./supermodel-skills:lazygit-custom-commandsfrom supermodel-skills
npx claudepluginhub gwenwindflower/dotfiles --plugin supermodel-skillsOther plugins' skills for the same job