fix(worktrees): use full paths for bundled scripts

Users were confused by ./scripts/ references, thinking they needed to copy
scripts into their project. Scripts are in ~/.claude/skills/worktrees/scripts/
and should be referenced with full paths.

Changes:
- Updated spawn-issues to use full script paths
- Updated worktrees skill with full paths in all examples
- Fixed gitea model name to claude-haiku-4-5
- Added tools list to issue-worker agent

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-01-13 00:06:28 +01:00
parent dd97378bb9
commit 5ad27ae040
4 changed files with 25 additions and 24 deletions

View File

@@ -83,16 +83,16 @@ git worktree add "${WORKTREES_DIR}/${REPO_NAME}-review-${PR_NUMBER}" \
## Bundled Scripts
Use bundled scripts for error-prone operations:
Use bundled scripts for error-prone operations. Scripts are located in `~/.claude/skills/worktrees/scripts/`:
### Create Worktree
```bash
# Usage: ./scripts/create-worktree.sh issue <issue-number>
# Usage: ./scripts/create-worktree.sh review <pr-number> <branch-name>
# Usage: ~/.claude/skills/worktrees/scripts/create-worktree.sh issue <issue-number>
# Usage: ~/.claude/skills/worktrees/scripts/create-worktree.sh review <pr-number> <branch-name>
./scripts/create-worktree.sh issue 42
./scripts/create-worktree.sh review 55 issue-42-feature-name
~/.claude/skills/worktrees/scripts/create-worktree.sh issue 42
~/.claude/skills/worktrees/scripts/create-worktree.sh review 55 issue-42-feature-name
```
Returns worktree path on success.
@@ -100,7 +100,7 @@ Returns worktree path on success.
### List Worktrees
```bash
./scripts/list-worktrees.sh
~/.claude/skills/worktrees/scripts/list-worktrees.sh
```
Shows all active worktrees with their branches.
@@ -109,13 +109,13 @@ Shows all active worktrees with their branches.
```bash
# Remove specific worktree
./scripts/cleanup-worktrees.sh "${WORKTREES_DIR}/${REPO_NAME}-issue-42"
~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh "${WORKTREES_DIR}/${REPO_NAME}-issue-42"
# Remove all worktrees in directory
./scripts/cleanup-worktrees.sh "${WORKTREES_DIR}"
~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh "${WORKTREES_DIR}"
# Force remove even if dirty
./scripts/cleanup-worktrees.sh --force "${WORKTREES_DIR}"
~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh --force "${WORKTREES_DIR}"
```
## Patterns
@@ -125,7 +125,7 @@ Shows all active worktrees with their branches.
**Orchestrator creates all worktrees upfront:**
```bash
for issue in 42 43 44; do
worktree_path=$(./scripts/create-worktree.sh issue $issue)
worktree_path=$(~/.claude/skills/worktrees/scripts/create-worktree.sh issue $issue)
# Spawn worker with worktree_path
done
```
@@ -140,14 +140,14 @@ git push -u origin $(git branch --show-current)
**Orchestrator cleans up after all complete:**
```bash
./scripts/cleanup-worktrees.sh "${WORKTREES_DIR}"
~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh "${WORKTREES_DIR}"
```
### Pattern: Review in Isolation
**Create review worktree:**
```bash
worktree_path=$(./scripts/create-worktree.sh review $PR_NUMBER $BRANCH_NAME)
worktree_path=$(~/.claude/skills/worktrees/scripts/create-worktree.sh review $PR_NUMBER $BRANCH_NAME)
cd "$worktree_path"
git diff origin/main...HEAD # Review changes
```
@@ -156,12 +156,12 @@ git diff origin/main...HEAD # Review changes
**List stale worktrees:**
```bash
./scripts/list-worktrees.sh
~/.claude/skills/worktrees/scripts/list-worktrees.sh
```
**Force cleanup:**
```bash
./scripts/cleanup-worktrees.sh --force "${WORKTREES_DIR}"
~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh --force "${WORKTREES_DIR}"
```
## Best Practices
@@ -181,8 +181,8 @@ git diff origin/main...HEAD # Review changes
```bash
# In orchestrator
declare -A worktrees
worktrees[42]=$(./scripts/create-worktree.sh issue 42)
worktrees[43]=$(./scripts/create-worktree.sh issue 43)
worktrees[42]=$(~/.claude/skills/worktrees/scripts/create-worktree.sh issue 42)
worktrees[43]=$(~/.claude/skills/worktrees/scripts/create-worktree.sh issue 43)
# Pass to agents
spawn_agent --worktree="${worktrees[42]}"
@@ -198,10 +198,10 @@ spawn_agent --worktree="${worktrees[42]}"
**Worktree already exists:**
```bash
# Remove old worktree first
./scripts/cleanup-worktrees.sh "${WORKTREES_DIR}/${REPO_NAME}-issue-42"
~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh "${WORKTREES_DIR}/${REPO_NAME}-issue-42"
# Then create new one
./scripts/create-worktree.sh issue 42
~/.claude/skills/worktrees/scripts/create-worktree.sh issue 42
```
**Branch already exists:**
@@ -216,8 +216,8 @@ git branch -D issue-42-old-name
**Stale worktrees after crash:**
```bash
# List and force remove
./scripts/list-worktrees.sh
./scripts/cleanup-worktrees.sh --force "${WORKTREES_DIR}"
~/.claude/skills/worktrees/scripts/list-worktrees.sh
~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh --force "${WORKTREES_DIR}"
```
## Tips