# Worker

> Spawn a Claude worker in an isolated git worktree for parallel development. Use when you need to work on a task in isolation without affecting current work. Use when this capability is needed.

- Skill: `tomevault-io/worker` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/worker`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/worker/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/worker

---


# Worker Skill

Spawn a Claude worker in an isolated git worktree.

## Usage

```
/worker <branch-name> <task description>
```

## Examples

```
/worker feat/add-logging Add structured logging to the supervisor module
/worker fix/auth-bug Fix the authentication bypass in the API
/worker refactor/cleanup Refactor the instance manager for clarity
```

## Instructions

When the user invokes `/worker`, follow these steps:

### 1. Parse Arguments

Extract the branch name (first argument) and task description (remaining text).

### 2. Create Worktree

```bash
# Get project name for worktree prefix
PROJECT=$(basename $(git rev-parse --show-toplevel))
WORKTREE_PATH="../${PROJECT}-$(echo $BRANCH | tr '/' '-')"

# Create the worktree with a new branch
git worktree add "$WORKTREE_PATH" -b "$BRANCH"
```

### 3. Spawn Worker Claude

Run a Claude instance in the worktree with full autonomy:

```bash
cd "$WORKTREE_PATH" && claude --print --dangerously-skip-permissions "$TASK_DESCRIPTION"
```

### 4. Push and Create PR

After the worker completes successfully and has made commits:

```bash
# Push the branch to origin
git push -u origin "$BRANCH"

# Create PR with auto-generated summary
gh pr create --title "<commit message or task summary>" --body "$(cat <<'EOF'
## Summary
<brief description of changes>

## Changes
<list of key changes made>

---
🤖 Generated by Claude worker
EOF
)"

# Enable auto-merge (will merge automatically when CI passes)
gh pr merge --auto --squash
```

### 5. Report Results

After the worker completes:
1. Show the worker's output
2. Show any commits made: `git log $BRANCH --oneline -5`
3. Show the PR URL if created
4. Offer next steps:
   - Review the PR
   - Continue working (spawn another worker command)
   - Clean up the worktree

## Important Notes

- Workers have full autonomy (`--dangerously-skip-permissions`)
- Each worker gets its own branch - no conflicts with main work
- Workers push their branch and create PRs when done
- Use `git worktree list` to see active workers
- Use `git worktree remove <path>` to clean up

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/schmug) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-16 -->

