Skill tool substitutes invocation args into literal "$0" text inside SKILL.md

Status Fixed / completed
Reported on v2.1.233
Maintainer reply None cached
Activity 1 comment · opened Aug 16, 2026 · closed Aug 17, 2026

Bug

When a skill is invoked through the Skill tool with an args value, every literal $0 substring in the SKILL.md body is replaced with the args string in the loaded content. Dollar amounts in prose are the common casualty: $0 and the $0 inside $0.06 both get rewritten.

Repro (Claude Code 2.1.233, macOS)

  1. Create .claude/skills/demo/SKILL.md containing:

The cache cost columns are always $0 and the typical delta is -$0.06/user.

  1. In a session, invoke the skill with args, e.g. Skill(skill="demo", args="FOO").
  1. The loaded skill content reads:

The cache cost columns are always FOO and the typical delta is -FOO.06/user.

The file on disk is untouched; only the loaded/rendered content is corrupted. Confirmed by diffing the disk file against the content served into the conversation. Observed repeatedly: five separate subagent sessions each invoked the same skill with different args and each saw its own args value spliced into the same sentences.

Expected

Only documented placeholders ($ARGUMENTS, $1..$9) should be substituted, or there should be an escape for literal dollar-digit text. $0 is not documented as a placeholder for skills, and dollar amounts are common in analysis/finance skills.

Impact

Skills that mention money silently serve corrupted instructions whenever invoked with args (e.g. "columns are always $0" becomes "columns are always <args>", which reads as nonsense or, worse, as a plausible wrong value).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗