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

@@ -5,6 +5,7 @@ description: >
implementation, commits, pushes, and creates PR. Use when implementing an implementation, commits, pushes, and creates PR. Use when implementing an
issue as part of parallel workflow. issue as part of parallel workflow.
model: claude-sonnet-4-5 model: claude-sonnet-4-5
tools: Bash, Read, Write, Edit, Glob, Grep, TodoWrite
skills: gitea, issue-writing, worktrees skills: gitea, issue-writing, worktrees
--- ---

View File

@@ -1,6 +1,6 @@
--- ---
name: gitea name: gitea
model: haiku model: claude-haiku-4-5
description: View, create, and manage Gitea issues and pull requests using tea CLI. Use when working with issues, PRs, viewing issue details, creating pull requests, adding comments, merging PRs, or when the user mentions tea, gitea, issue numbers, or PR numbers. description: View, create, and manage Gitea issues and pull requests using tea CLI. Use when working with issues, PRs, viewing issue details, creating pull requests, adding comments, merging PRs, or when the user mentions tea, gitea, issue numbers, or PR numbers.
user-invocable: false user-invocable: false
--- ---

View File

@@ -61,7 +61,7 @@ git rev-parse --git-dir >/dev/null 2>&1 || exit 1
For each issue, create worktree using script: For each issue, create worktree using script:
```bash ```bash
cd "$REPO_PATH" cd "$REPO_PATH"
worktree_path=$(./scripts/create-worktree.sh issue <ISSUE_NUMBER>) worktree_path=$(~/.claude/skills/worktrees/scripts/create-worktree.sh issue <ISSUE_NUMBER>)
``` ```
Track worktree paths: Track worktree paths:
@@ -174,7 +174,7 @@ branch_name = worker_result.branch
**Create review worktree:** **Create review worktree:**
```bash ```bash
cd "$REPO_PATH" cd "$REPO_PATH"
review_worktree=$(./scripts/create-worktree.sh review <PR_NUMBER> <BRANCH_NAME>) review_worktree=$(~/.claude/skills/worktrees/scripts/create-worktree.sh review <PR_NUMBER> <BRANCH_NAME>)
``` ```
**Spawn code-reviewer agent:** **Spawn code-reviewer agent:**
@@ -230,7 +230,7 @@ After all issues reach terminal state:
```bash ```bash
cd "$REPO_PATH" cd "$REPO_PATH"
./scripts/cleanup-worktrees.sh "$WORKTREES_DIR" ~/.claude/skills/worktrees/scripts/cleanup-worktrees.sh "$WORKTREES_DIR"
``` ```
This removes all issue and review worktrees created during this run. This removes all issue and review worktrees created during this run.

View File

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