Skill tool fails when SKILL.md contains markdown tables with pipe characters
Description
The Skill tool fails to load skills when the SKILL.md file contains markdown tables. Pipe characters (|) in tables are incorrectly interpreted as bash shell pipe operators during skill processing.
Error Message
Bash command failed for pattern "!` | `": [stderr]
/usr/bin/bash: eval: line 1: syntax error near unexpected token `|'
/usr/bin/bash: eval: line 1: `| < /dev/null'
Steps to Reproduce
- Create a skill with a SKILL.md containing a markdown table:
``markdown$variable_name;
| Extension | Syntax | Scope |
|-----------|--------|-------|
| Variables | | Inline |``
- Invoke the skill using the Skill tool
- Observe the bash syntax error
Expected Behavior
The Skill tool should properly escape or handle markdown content without passing it through bash shell interpretation.
Actual Behavior
Pipe characters in markdown tables are interpreted as shell pipes, causing a syntax error.
Environment
- OS: Windows 11
- Claude Code: Latest version
- Shell: Git Bash / PowerShell
Additional Context
The error pattern "! | " suggests the tool is combining content from:
- Inline code containing
!a(example: `!a`) - Table pipe characters on adjacent lines
This creates an invalid shell command when the skill content is processed.
Workaround
Converting markdown tables to bullet lists avoids the issue, but this shouldn't be necessary.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗