Skill tool incorrectly parses markdown content as Bash command
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description
When invoking a skill via the Skill tool, the markdown content of the skill file is incorrectly
being run through Bash command permission checking. This causes skill loading to fail when the
content contains characters that look like Bash operators.
The skill fails to load with error:
Bash command permission check failed for pattern "!` non-null assertion without guards
- `": This Bash command contains multiple operations. The following parts require approval:
non-null assertion without guards, -
The ! character inside backticks is being interpreted as a Bash history expansion or negation
operator.
Workaround
Rephrase content to avoid isolated special characters in backticks:
- non-null assertion (!) without guards
Environment
- Claude Code CLI
- macOS (Darwin 24.6.0)
What Should Happen?
The skill content should load successfully. Markdown content should not be parsed as Bash commands.
Error Messages/Logs
Bash command permission check failed for pattern "!` non-null assertion without guards
- `": This Bash command contains multiple operations. The following parts require approval:
non-null assertion without guards, -
Steps to Reproduce
Steps to Reproduce
- Create a skill file (.claude/skills/example/SKILL.md) containing markdown with
backtick-wrapped special characters:
!non-null assertion without guards
- Invoke the skill using the Skill tool
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.55
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗