Skill template processor incorrectly substitutes $1 in code blocks
Resolved 💬 3 comments Opened Feb 9, 2026 by dejanb Closed Feb 13, 2026
Description
When a skill is loaded, the skill template processor incorrectly substitutes $1 placeholders within code blocks with user input text. This corrupts shell function examples in skill documentation.
Steps to Reproduce
- Create a skill with shell functions that use
$1for arguments, e.g.:
``bash``
jira-get() {
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/$1" | jq
}
- Invoke the skill with arguments like:
get all my open issues
- Observe the rendered skill content
Expected Behavior
The $1 in the code block should remain as $1:
"$JIRA_URL/rest/api/2/issue/$1" | jq
Actual Behavior
The $1 is replaced with part of the user input (in this case all):
"$JIRA_URL/rest/api/2/issue/all" | jq
Impact
- Shell function examples in skills become incorrect/misleading
- Users copying these examples will have broken functions
- The substitution appears to take a word from the user's input string
Environment
- Claude Code CLI
- Skill: jira-pat-skill (custom skill using PAT authentication for Jira)
- The actual SKILL.md file contains the correct
$1- the corruption happens during skill loading/rendering
Workaround
None currently - the skill content is corrupted before it reaches the model.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗