Skip to content

Commit 889f45e

Browse files
cahaselerclaude
andcommitted
feat: add test command for CLAUDE_PLUGIN_ROOT variable substitution
Test command to verify if the fix in Claude Code 2.1.0 for ${CLAUDE_PLUGIN_ROOT} substitution works in inline bash execution. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7529239 commit 889f45e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

commands/test-plugin-root.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
description: Test if ${CLAUDE_PLUGIN_ROOT} is substituted in bash execution
3+
allowed-tools: Bash(echo:*), Bash(ls:*), Bash(bun:*)
4+
---
5+
6+
# Test Plugin Root Variable
7+
8+
This command tests whether `${CLAUDE_PLUGIN_ROOT}` is properly substituted in bash execution.
9+
10+
## Test 1: Inline echo (immediate execution)
11+
12+
!`echo "Plugin root is: ${CLAUDE_PLUGIN_ROOT}"`
13+
14+
## Test 2: List scripts directory (inline)
15+
16+
!`ls "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/" 2>/dev/null || echo "FAILED: Cannot list scripts directory"`
17+
18+
## Analysis
19+
20+
If Test 1 shows the actual path (not the literal `${CLAUDE_PLUGIN_ROOT}`), the fix works.
21+
If it shows the literal string or empty, we still need the skill workaround.

0 commit comments

Comments
 (0)