Manage git worktrees for isolated feature development, enabling parallel work without affecting the main working directory.
/plugin marketplace add KreativReason/merged-end-to-end-ai-dpp---e2e-cli/plugin install kreativreason-e2e-pipeline@kreativreason-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Manage git worktrees for isolated feature development, enabling parallel work without affecting the main working directory.
Git worktrees allow you to have multiple working directories attached to the same repository. This skill provides utilities for creating, managing, and cleaning up worktrees during the development workflow.
# Create worktree for a feature
git worktree add .worktrees/feat-user-auth -b feature/user-auth
# Create from existing branch
git worktree add .worktrees/fix-bug-123 bugfix/123
git worktree list
# Output:
# /path/to/repo abc1234 [main]
# /path/to/repo/.worktrees/feat-user-auth def5678 [feature/user-auth]
# Remove worktree (keeps branch)
git worktree remove .worktrees/feat-user-auth
# Force remove (discards changes)
git worktree remove --force .worktrees/feat-user-auth
# Prune stale worktree references
git worktree prune
create_worktree(feature_name, base_branch='main')Creates an isolated worktree for feature development.
Input:
{
"feature_name": "user-auth",
"base_branch": "main"
}
Output:
{
"status": "created",
"worktree_path": ".worktrees/user-auth",
"branch": "feature/user-auth",
"base": "main"
}
Process:
switch_to_worktree(worktree_name)Changes context to specified worktree.
Input:
{
"worktree_name": "user-auth"
}
Output:
{
"status": "switched",
"previous": "/path/to/repo",
"current": "/path/to/repo/.worktrees/user-auth",
"branch": "feature/user-auth"
}
cleanup_worktree(worktree_name, force=false)Removes worktree after feature completion.
Input:
{
"worktree_name": "user-auth",
"force": false
}
Output:
{
"status": "removed",
"worktree_path": ".worktrees/user-auth",
"branch_preserved": true,
"uncommitted_changes": false
}
list_worktrees()Lists all active worktrees.
Output:
{
"worktrees": [
{
"path": "/path/to/repo",
"branch": "main",
"commit": "abc1234",
"is_main": true
},
{
"path": "/path/to/repo/.worktrees/user-auth",
"branch": "feature/user-auth",
"commit": "def5678",
"is_main": false
}
]
}
1. /kreativreason:work plans/feat-user-auth.md
↓
2. Skill: create_worktree("user-auth")
↓
3. Work happens in .worktrees/user-auth/
↓
4. PR created from feature branch
↓
5. Skill: cleanup_worktree("user-auth")
Main repo: /project
├── .worktrees/
│ ├── feat-user-auth/ # Working on auth
│ ├── feat-dark-mode/ # Working on UI
│ └── fix-bug-123/ # Fixing bug
└── (main branch untouched)
Add to .gitignore:
.worktrees/
| Error | Cause | Resolution |
|---|---|---|
worktree already exists | Name collision | Use different name or remove existing |
branch already checked out | Branch in another worktree | Use that worktree instead |
uncommitted changes | Dirty worktree | Commit or stash before removal |
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 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 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.