Skip to content

Commit c1f5cc5

Browse files
cahaselerclaude
andauthored
feat: use direct ${CLAUDE_PLUGIN_ROOT} in commands instead of skill workaround (#182)
Now that Claude Code 2.1.0 properly substitutes ${CLAUDE_PLUGIN_ROOT} in bash execution, we can simplify commands to directly reference scripts: - add-to-backlog.md: Direct script execution - code-review.md: Direct script execution - complete-task.md: Direct script execution - prepare-completion.md: Direct script execution - specify.md: Direct script execution Removed: - test-plugin-root.md (testing command no longer needed) - Skill tool from allowed-tools (no longer needed) This eliminates the two-step "invoke skill, then run script" workaround that was necessary when ${CLAUDE_PLUGIN_ROOT} wasn't being substituted. Co-authored-by: Craig Haseler <cahaseler@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent db3dd15 commit c1f5cc5

File tree

9 files changed

+51
-421
lines changed

9 files changed

+51
-421
lines changed

commands/add-to-backlog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
shortname: add-to-backlog
33
description: Quickly add an item to the backlog without disrupting current work
44
usage: /add-to-backlog "Your idea or bug description"
5-
allowed-tools: Bash(bun:*), Skill
5+
allowed-tools: Bash(bun:*)
66
---
77

88
# Add to Backlog
99

10-
Invoke the `cc-track:cc-track-tools` skill to get the script path, then run:
10+
Run the backlog script directly:
1111

1212
```bash
13-
bun {base_directory}/scripts/backlog.ts "$ARGUMENTS"
13+
bun "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/backlog.ts" "$ARGUMENTS"
1414
```
1515

1616
Do not change your current focus or priorities. Continue with your work if there was a clear task you are working on.

commands/code-review.md

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(git:*), Bash(bun:*), Bash(mkdir:*), Task, Skill, AskUserQuestion, TodoWrite
2+
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(git:*), Bash(bun:*), Bash(mkdir:*), Task, AskUserQuestion, TodoWrite
33
description: Code review a pull request
44
---
55

@@ -12,18 +12,12 @@ Run validation checks and multi-agent code review without requiring a spec folde
1212
- Current branch: !`git branch --show-current`
1313
- Changes to review: !`git diff --stat`
1414

15-
## Step 1: Get Script Path via Skill
15+
## Step 1: Run Validation Script
1616

17-
First, invoke the `cc-track:cc-track-tools` skill to get the base directory for cc-track scripts.
18-
19-
Note the base directory provided (e.g., `/path/to/skills/cc-track-tools`).
20-
21-
## Step 2: Run Validation Script
22-
23-
Run the code-review script using the base directory from Step 1:
17+
Run the code-review script:
2418

2519
```bash
26-
bun {base_directory}/scripts/code-review.ts
20+
bun "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/code-review.ts"
2721
```
2822

2923
The script will:
@@ -32,7 +26,7 @@ The script will:
3226
- Run test suite
3327
- Run dead code detection (knip)
3428

35-
## Step 3: Interpret Validation Results
29+
## Step 2: Interpret Validation Results
3630

3731
The script returns JSON output. Parse and present the results:
3832

@@ -48,9 +42,9 @@ The script returns JSON output. Parse and present the results:
4842

4943
**If validation passed:**
5044
- Confirm: "✅ All validation checks passed"
51-
- Proceed to Step 4 for multi-agent code review
45+
- Proceed to Step 3 for multi-agent code review
5246

53-
## Step 4: Launch Review Agents
47+
## Step 3: Launch Review Agents
5448

5549
Launch the multi-agent code review using the Task tool.
5650

@@ -92,9 +86,9 @@ Use the Task tool to launch these agents simultaneously. Include the context abo
9286
- Launch all 5 agents in a single message without the `run_in_background` parameter
9387
- Orchestrator suspends until ALL agents complete
9488
- All results return together in the response
95-
- Deduplication in Step 5 has access to all findings at once
89+
- Deduplication in Step 4 has access to all findings at once
9690

97-
## Step 5: Collect and Deduplicate Issues
91+
## Step 4: Collect and Deduplicate Issues
9892

9993
After all agents complete:
10094

@@ -111,9 +105,9 @@ After all agents complete:
111105
- Observation: [evidence from reviewer]
112106
```
113107

114-
**If no issues found by any reviewer:** Skip to Step 8 with "No issues found - clean review!"
108+
**If no issues found by any reviewer:** Skip to Step 7 with "No issues found - clean review!"
115109

116-
## Step 6: Score Each Issue
110+
## Step 5: Score Each Issue
117111

118112
For each unique issue, launch a parallel **issue-scorer** agent (Haiku) to validate it.
119113

@@ -130,7 +124,7 @@ Reported by: {reviewer(s)}
130124
Observation: {what the reviewer observed}
131125
```
132126

133-
## Step 7: Filter and Present Results
127+
## Step 6: Filter and Present Results
134128

135129
After all scorers complete:
136130

@@ -169,7 +163,7 @@ After all scorers complete:
169163
- [N] issues were filtered as unverified or false positives
170164
```
171165

172-
## Step 8: Route Based on Issue Count
166+
## Step 7: Route Based on Issue Count
173167

174168
After filtering and scoring, route based on how many validated issues were found:
175169

@@ -205,13 +199,13 @@ Wait for user direction before proceeding. If they want it fixed, implement the
205199
📋 Found {N} validated issues. Starting structured triage...
206200
```
207201

208-
Proceed to Step 9 for inline fix-issues flow.
202+
Proceed to Step 8 for inline fix-issues flow.
209203

210-
## Step 9: Inline Fix-Issues Flow
204+
## Step 8: Inline Fix-Issues Flow
211205

212206
For >1 validated issues, handle triage directly (don't call `/cc-track:fix-issues` which requires a spec folder).
213207

214-
### 9a: Create Review File
208+
### 8a: Create Review File
215209

216210
1. Ensure `.cc-track/reviews/` directory exists:
217211
```bash
@@ -240,7 +234,7 @@ For >1 validated issues, handle triage directly (don't call `/cc-track:fix-issue
240234

241235
4. Add each issue to the file with Status = "pending"
242236

243-
### 9b: Check Existing State
237+
### 8b: Check Existing State
244238

245239
Read existing files to filter issues that were already triaged:
246240

@@ -257,7 +251,7 @@ Read existing files to filter issues that were already triaged:
257251
- Remove any issue matching a Deferred entry (match by location or description)
258252
- Keep all other issues for triage
259253

260-
### 9c: "Just Fix It" Protocol
254+
### 8c: "Just Fix It" Protocol
261255

262256
Before presenting issues to the user, scan for trivial fixes that don't need human decision-making.
263257

@@ -279,7 +273,7 @@ Before presenting issues to the user, scan for trivial fixes that don't need hum
279273
3. Update review file with Decision = "Just Fix It"
280274
4. Notify user briefly before continuing to triage
281275

282-
### 9d: Triage Loop
276+
### 8d: Triage Loop
283277

284278
For each remaining issue (sorted by score, highest first):
285279

@@ -329,7 +323,7 @@ multiSelect: false
329323
- **Dismiss:** Update review file with Decision = "Dismiss" and rationale
330324
- **Discuss:** Investigate using Explore agent, then re-present with Fix/Defer/Dismiss
331325

332-
### 9e: Action Summary
326+
### 8e: Action Summary
333327

334328
After all issues are triaged:
335329

@@ -352,7 +346,7 @@ After all issues are triaged:
352346

353347
Update review file Status to "triaged".
354348

355-
### 9f: Execute Fixes
349+
### 8f: Execute Fixes
356350

357351
**If no fixes needed:**
358352
```

commands/complete-task.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
allowed-tools: Read, Edit, Glob, Grep, Bash(git:*), Bash(gh:*), Bash(bun:*), Skill
2+
allowed-tools: Read, Edit, Glob, Grep, Bash(git:*), Bash(gh:*), Bash(bun:*)
33
description: Complete the current active task (Phase 2 of task completion workflow)
44
---
55

@@ -15,18 +15,12 @@ Finalize the current task by updating metadata, squashing commits, and creating
1515
- Git status: !`git status --short`
1616
- Recent commits on this branch: !`git log --oneline -5`
1717

18-
## Step 1: Get Script Path via Skill
18+
## Step 1: Run Complete Task Script
1919

20-
First, invoke the `cc-track:cc-track-tools` skill to get the base directory for cc-track scripts.
21-
22-
Note the base directory provided (e.g., `/path/to/skills/cc-track-tools`).
23-
24-
## Step 2: Run Complete Task Script
25-
26-
Run the complete-task script using the base directory from Step 1:
20+
Run the complete-task script:
2721

2822
```bash
29-
bun {base_directory}/scripts/complete-task.ts
23+
bun "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/complete-task.ts"
3024
```
3125

3226
The script will:
@@ -38,7 +32,7 @@ The script will:
3832
- Switch back to main branch
3933
- Update CLAUDE.md to reference no_active_task.md
4034

41-
## Step 3: Interpret Results
35+
## Step 2: Interpret Results
4236

4337
The script returns JSON-like output with messages and data. Parse and present the results:
4438

@@ -56,7 +50,7 @@ The script returns JSON-like output with messages and data. Parse and present th
5650
- Report PR status: URL if created, or existing PR if updated
5751
- Confirm branch switch to main
5852

59-
## Step 4: Enhance PR Description (if PR was created)
53+
## Step 3: Enhance PR Description (if PR was created)
6054

6155
If a new PR was created, enhance its description with details from the spec files:
6256

@@ -89,5 +83,5 @@ The script supports these optional flags:
8983

9084
Example with flags:
9185
```bash
92-
bun {base_directory}/scripts/complete-task.ts --no-squash
86+
bun "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/complete-task.ts" --no-squash
9387
```

commands/prepare-completion.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
allowed-tools: Read, Edit, Glob, Grep, Bash(git:*), Bash(bun:*), Task, Skill
2+
allowed-tools: Read, Edit, Glob, Grep, Bash(git:*), Bash(bun:*), Task
33
description: Prepare the current active task for completion (Phase 1 of task completion workflow)
44
---
55

@@ -12,18 +12,12 @@ Run validation checks and multi-agent spec-focused code review to ensure the tas
1212
- Current branch: !`git branch --show-current`
1313
- Changes to review: !`git diff --stat`
1414

15-
## Step 1: Get Script Path via Skill
15+
## Step 1: Run Validation Script
1616

17-
First, invoke the `cc-track:cc-track-tools` skill to get the base directory for cc-track scripts.
18-
19-
Note the base directory provided (e.g., `/path/to/skills/cc-track-tools`).
20-
21-
## Step 2: Run Validation Script
22-
23-
Run the prepare-completion script using the base directory from Step 1:
17+
Run the prepare-completion script:
2418

2519
```bash
26-
bun {base_directory}/scripts/prepare-completion.ts
20+
bun "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/prepare-completion.ts"
2721
```
2822

2923
The script will:
@@ -32,9 +26,9 @@ The script will:
3226
- Run test suite
3327
- Run dead code detection (knip)
3428

35-
**Note:** The script no longer runs code review - that's handled by the multi-agent review in Step 3.
29+
**Note:** The script no longer runs code review - that's handled by the multi-agent review in Step 2.
3630

37-
## Step 3: Interpret Validation Results
31+
## Step 2: Interpret Validation Results
3832

3933
The script returns JSON output. Parse and present the results:
4034

@@ -50,9 +44,9 @@ The script returns JSON output. Parse and present the results:
5044

5145
**If validation passed:**
5246
- Confirm: "✅ All validation checks passed"
53-
- Proceed to Step 4 for multi-agent code review
47+
- Proceed to Step 3 for multi-agent code review
5448

55-
## Step 4: Launch Review Agents (Phase 1 - Find Issues)
49+
## Step 3: Launch Review Agents (Phase 1 - Find Issues)
5650

5751
Launch the multi-agent spec-focused code review using the Task tool.
5852

@@ -108,11 +102,11 @@ Use the Task tool to launch these agents simultaneously. Include the context abo
108102
- Launch all 8 agents in a single message without the `run_in_background` parameter
109103
- Orchestrator suspends until ALL agents complete
110104
- All results return together in the response
111-
- Deduplication in Step 5 has access to all findings at once
105+
- Deduplication in Step 4 has access to all findings at once
112106

113107
This is different from the pipeline pattern in `/cc-track:tasks` - here we need ALL results before proceeding to deduplication, so foreground parallel is correct.
114108

115-
## Step 5: Collect and Deduplicate Issues
109+
## Step 4: Collect and Deduplicate Issues
116110

117111
After all agents complete:
118112

@@ -129,9 +123,9 @@ After all agents complete:
129123
- Observation: [evidence from reviewer]
130124
```
131125

132-
**If no issues found by any reviewer:** Skip to Step 8 with "No issues found - clean review!"
126+
**If no issues found by any reviewer:** Skip to Step 7 with "No issues found - clean review!"
133127

134-
## Step 6: Score Each Issue (Phase 2 - Validate Issues)
128+
## Step 5: Score Each Issue (Phase 2 - Validate Issues)
135129

136130
For each unique issue, launch a parallel **issue-scorer** agent (Haiku) to validate it.
137131

@@ -148,7 +142,7 @@ Reported by: {reviewer(s)}
148142
Observation: {what the reviewer observed}
149143
```
150144

151-
## Step 7: Filter and Present Results
145+
## Step 6: Filter and Present Results
152146

153147
After all scorers complete:
154148

@@ -187,7 +181,7 @@ After all scorers complete:
187181
- [N] issues were filtered as unverified or false positives
188182
```
189183

190-
## Step 8: Route Based on Issue Count
184+
## Step 7: Route Based on Issue Count
191185

192186
After filtering and scoring, route based on how many validated issues were found:
193187

commands/specify.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Create a feature specification through Socratic questioning and iterative refinement
3-
allowed-tools: Read, Edit, Write, Glob, Grep, Bash(git:*), Bash(gh:*), Bash(bun:*), Task, AskUserQuestion, WebSearch, WebFetch, Skill
3+
allowed-tools: Read, Edit, Write, Glob, Grep, Bash(git:*), Bash(gh:*), Bash(bun:*), Task, AskUserQuestion, WebSearch, WebFetch
44
---
55

66
# Creating Feature Specifications
@@ -25,9 +25,11 @@ allowed-tools: Read, Edit, Write, Glob, Grep, Bash(git:*), Bash(gh:*), Bash(bun:
2525
**CRITICAL**: Infrastructure must be created BEFORE any Socratic questioning or research begins. This prevents getting distracted before the branch/folder exist.
2626

2727
1. **Get task title**: Use from user's request and proceed to create infrastructure. Only ask for clarification if the title is genuinely unclear - do not ask for approval of the title itself.
28-
2. **Invoke skill**: `cc-track:cc-track-tools` to get base directory
29-
3. **Run script**: `bun {base_directory}/scripts/specify.ts "{title}"`
30-
4. **Confirm results**: Branch created, spec directory ready, CLAUDE.md updated, GitHub issue created (if enabled)
28+
2. **Run script**:
29+
```bash
30+
bun "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/specify.ts" "{title}"
31+
```
32+
3. **Confirm results**: Branch created, spec directory ready, CLAUDE.md updated, GitHub issue created (if enabled)
3133

3234
If script fails, report error and stop.
3335

commands/test-plugin-root.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

hooks/hooks.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@
2121
"command": "bun run ${CLAUDE_PLUGIN_ROOT}/hooks/pre-tool-validation.ts"
2222
}
2323
]
24-
},
25-
{
26-
"matcher": "Bash",
27-
"hooks": [
28-
{
29-
"type": "command",
30-
"command": "bun run ${CLAUDE_PLUGIN_ROOT}/hooks/powershell-guidance.ts"
31-
}
32-
]
3324
}
3425
],
3526
"UserPromptSubmit": [

0 commit comments

Comments
 (0)