Agent skill
init
Initialize a new feature workflow with git worktree. Use when the user wants to start a new feature, create an isolated development branch, says "init worktree", or needs to set up a feature branch for compounder workflow.
Install this agent skill to your Project
npx add-skill https://github.com/jero2rome/compounder/tree/main/skills/init
SKILL.md
Init Skill
Initializes an isolated git worktree for feature development, enabling parallel work without affecting the main branch.
When to Use
- User says "initialize a worktree for X"
- User says "use compounder to init"
- User wants to start a new feature branch
- User needs isolated development environment
Quick Start
# Via skill (if permissions are configured)
/compounder:init "my-feature"
# Direct script call (always works)
scripts/init-worktree.sh "my-feature"
What Gets Created
| Item | Location | Description |
|---|---|---|
| Worktree | ../compounder-{feature} |
Sibling directory to main repo |
| Branch | feat/{feature} |
Based on current HEAD |
Invocation Methods
Method 1: Skill Tool (May Require Permission)
Skill: compounder:init
Args: "feature-name"
Note: This may fail with permission error if bash command isn't pre-approved.
Method 2: Direct Script Call (Recommended)
/path/to/scripts/init-worktree.sh "feature-name"
The script is located at:
$CLAUDE_PLUGIN_ROOT/scripts/init-worktree.sh
Or in cached plugins:
~/.claude/plugins/cache/jero2rome-compounder/compounder/*/scripts/init-worktree.sh
Debugging Journey (Reference for Claude)
This section documents the trial-and-error process that led to successful invocation:
Attempt 1: Skill Tool
Tool: Skill
skill: "compounder:init"
Result: FAILED
Error: Bash command permission check failed for pattern...
This command requires approval
Lesson: The Skill tool internally runs a bash script that wasn't in the allowed permissions list.
Attempt 2: Ask User for Feature Name
Tool: AskUserQuestion
questions: [{"question": "What feature?", "options": [{"label": "Enter custom"}]}]
Result: FAILED
Error: Array must contain at least 2 element(s)
Lesson: AskUserQuestion requires at least 2 options. Can't use it for single free-text input.
Attempt 3: Direct Script Without Argument
Tool: Bash
command: /path/to/scripts/init-worktree.sh
Result: FAILED
Error: Feature name required
Usage: /compounder:init "my-feature"
Lesson: The script requires a positional argument for the feature name.
Attempt 4: Direct Script With Argument (SUCCESS)
Tool: Bash
command: /path/to/scripts/init-worktree.sh "test-comp"
Result: SUCCESS
Creating worktree and branch...
HEAD is now at ad08615 ...
Worktree created: ../compounder-test-comp
Branch created: feat/test-comp
Key Learnings
- Skill tool limitation: Underlying bash commands need explicit permission approval
- Workaround: Call the script directly via Bash tool with full path
- Script location:
$CLAUDE_PLUGIN_ROOT/scripts/init-worktree.shor cached path - Required argument: Feature name MUST be passed as positional argument
- AskUserQuestion: Requires 2+ options; can't use for single text input
Required Permission
To auto-approve the init script, add to .claude/settings.json:
{
"permissions": {
"allow": [
"Bash(*/scripts/init-worktree.sh:*)"
]
}
}
After Initialization
-
Switch to worktree:
bashcd ../compounder-{feature} && claude -
Start workflow:
- "Let's ideate [feature]" -> feature description
- "Create a spec" -> spec.md
- "Create a plan" -> plan.md
- "Create tasks" -> tasks.md
- "Execute the tasks" -> implementation
-
Cleanup after merge:
bashgit worktree remove ../compounder-{feature}
Handoff
After init completes, guide user to:
- Open new terminal in worktree directory
- Start Claude Code in that directory
- Begin with
ideateskill for the feature
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
execute
Use when the user wants to execute tasks autonomously, run compounder on a tasks.md file, start autonomous development, compound through a task list, or implement tasks iteratively. Guides autonomous task execution using compound loops.
ideate
Use when the user has an idea to brainstorm, wants to design a feature, needs help refining a concept, says "let's ideate", or describes a vague project needing structure. Guides structured brainstorming to produce a clear feature description ready for speckit.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Didn't find tool you were looking for?