Guidance for Worktrunk, a CLI tool for managing git worktrees. Covers configuration (user config at ~/.config/worktrunk/config.toml and project hooks at .config/wt.toml), usage, and troubleshooting. Use for "setting up LLM", "configuring hooks", "automating tasks", or general worktrunk questions.
/plugin marketplace add max-sixty/worktrunk/plugin install worktrunk@worktrunkThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Help users work with Worktrunk, a CLI tool for managing git worktrees.
Reference files are synced from worktrunk.dev documentation:
For command-specific options, run wt <command> --help. For configuration, follow the workflows below.
Worktrunk uses two separate config files with different scopes and behaviors:
~/.config/worktrunk/config.toml)~/.config/worktrunk/config.toml (never checked into git)reference/config.md for detailed guidance.config/wt.toml)<repo>/.config/wt.toml (checked into git)reference/hook.md for detailed guidanceWhen a user asks for configuration help, determine which type based on:
User config indicators:
Project config indicators:
Both configs may be needed: For example, setting up LLM integration requires user config, but automating quality checks requires project config.
Most common request. Follow this sequence:
Check if LLM tool exists
which llm # or: which aichat
If not installed, guide installation (don't run it)
uv tool install -U llm
Guide API key setup (don't run it)
llm install llm-anthropic
llm keys set anthropic
llm models default claude-haiku-4.5
Propose config change
[commit-generation]
command = "llm"
Ask: "Should I add this to your config?"
After approval, apply
wt config showwt config createSuggest testing
llm "say hello"
wt merge # in a repo with uncommitted changes
See reference/config.md and reference/llm-commits.md for complete details.
Common request for workflow automation. Follow discovery process:
Detect project type
ls package.json Cargo.toml pyproject.toml
Identify available commands
package.json scriptsDesign appropriate hooks (7 hook types available)
post-createpre-commit or pre-mergepost-startpost-switchpost-mergepre-removeValidate commands work
npm run lint # verify exists
which cargo # verify tool exists
Create .config/wt.toml
# Install dependencies when creating worktrees
post-create = "npm install"
# Validate code quality before committing
[pre-commit]
lint = "npm run lint"
typecheck = "npm run typecheck"
# Run tests before merging
pre-merge = "npm test"
Add comments explaining choices
Suggest testing
wt switch --create test-hooks
See reference/hook.md for complete details.
When users want to add automation to an existing project:
Read existing config: cat .config/wt.toml
Determine hook type - When should this run?
post-createpost-startpost-switchpre-commitpre-mergepost-mergepre-removeHandle format conversion if needed
Single command to named table:
# Before
post-create = "npm install"
# After (adding db:migrate)
[post-create]
install = "npm install"
migrate = "npm run db:migrate"
Preserve existing structure and comments
Before adding hooks, validate:
# Verify command exists
which npm
which cargo
# For npm, verify script exists
npm run lint --dry-run
# For shell commands, check syntax
bash -n -c "if [ true ]; then echo ok; fi"
Dangerous patterns — Warn users before creating hooks with:
rm -rf, DROP TABLEcurl http://...sudoreference/llm-commits.mdreference/config.md#worktree-path-templatereference/llm-commits.md#templatesreference/config.md#command-settingsreference/config.md#user-hooksreference/hook.mdreference/hook.md#configurationreference/hook.md#template-variablesreference/config.md#dev-server-url# View all configuration
wt config show
# Create initial user config
wt config create
# LLM setup guide
wt config --help
Load reference files for detailed configuration, hook specifications, and troubleshooting.
Find specific sections with grep:
grep -A 20 "## Setup" reference/llm-commits.md
grep -A 30 "### post-create" reference/hook.md
grep -A 20 "## Warning Messages" reference/shell-integration.md
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.