From 1dff4ff0c7b2c0c29e592a42efdead5e558196c7 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sun, 12 Oct 2025 18:40:45 +0800 Subject: [PATCH] docs: add template reference rule - use $(cat ...) directly, never read first --- .claude/workflows/intelligent-tools-strategy.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/workflows/intelligent-tools-strategy.md b/.claude/workflows/intelligent-tools-strategy.md index 41bc2460..159c12eb 100644 --- a/.claude/workflows/intelligent-tools-strategy.md +++ b/.claude/workflows/intelligent-tools-strategy.md @@ -212,6 +212,7 @@ RULES: $(cat "~/.claude/workflows/cli-templates/prompts/[category]/[template].tx **⚠️ CRITICAL: Command Substitution Rules** When using `$(cat ...)` for template loading in actual CLI commands: +- **Template reference only, never read**: When user specifies template name, use `$(cat ...)` directly in RULES field, do NOT read template content first - **NEVER use escape characters**: `\$`, `\"`, `\'` will break command substitution - **In -p "..." context**: Path in `$(cat ...)` needs NO quotes (tilde expands correctly) - **Correct**: `RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt)`