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
issue as part of parallel workflow.
model: claude-sonnet-4-5
tools: Bash, Read, Write, Edit, Glob, Grep, TodoWrite
skills: gitea, issue-writing, worktrees
---

View File

@@ -1,6 +1,6 @@
---
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.
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:
```bash
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:
@@ -174,7 +174,7 @@ branch_name = worker_result.branch
**Create review worktree:**
```bash
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:**
@@ -230,7 +230,7 @@ After all issues reach terminal state:
```bash
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.

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