claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Skill tool incorrectly parses markdown content as shell commands

Open LeekJay opened this issue 1 month ago • 2 comments

Bug Description

The Skill tool incorrectly interprets markdown content within skill files (.md) as shell commands, causing activation failures when the markdown contains certain characters like backtick-wrapped exclamation marks.

Steps to Reproduce

  1. Create a skill file (SKILL.md) with the following markdown content:
## Quick Reference Checklist

- [ ] No `!` non-null assertions
- [ ] All function parameters have types
  1. Try to activate the skill using the Skill tool

  2. Observe the error

Expected Behavior

The Skill tool should read and display the markdown content of the skill file without attempting to parse it as shell commands.

Actual Behavior

The Skill tool fails with this error:

Bash command permission check failed for pattern "!` non-null assertions
- [ ] All function parameters have types
...
`": This command uses shell operators that require approval for safety

Analysis

The tool appears to be:

  1. Extracting text between backticks in the markdown
  2. Interpreting the extracted text as potential bash commands
  3. Flagging the ! character (bash history expansion operator) as a dangerous shell operator

The problematic pattern is the markdown checkbox syntax combined with inline code:

- [ ] No `!` non-null assertions

Environment

  • Claude Code CLI
  • Windows 11
  • Skill file location: plugins/typescript-strict-typing/skills/typescript-strict-typing/SKILL.md

Workaround

Rewrite the markdown to avoid using backticks around the exclamation mark:

- No non-null assertion operator (the exclamation mark)

However, this workaround limits the ability to use standard markdown formatting in skill files.

LeekJay avatar Dec 11 '25 07:12 LeekJay