[BUG] Skill parser executes `!` inside markdown backticks as bash commands

Resolved 💬 3 comments Opened Jan 9, 2026 by laramarcodes Closed Jan 13, 2026

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?

When a skill's SKILL.md file contains the exclamation mark character inside inline code backticks (e.g., documenting the bash execution feature), the parser incorrectly interprets it as a bash command and tries to execute the surrounding text.

Example: Having this line in a skill file:

  • Use ! prefix for bash commands

Results in the parser trying to execute "prefix" as a shell command, producing errors like:

(eval):1: command not found: prefix
(eval):2: command not found: Arguments

The exclamation mark bash execution feature should only trigger on actual lines starting with !, not on ! characters inside markdown inline code backticks or fenced code blocks.

What Should Happen?

The parser should respect markdown formatting and only trigger bash execution for ! at the start of a line outside of code formatting:

  1. ! inside inline code backticks should be treated as text
  2. ! inside fenced code blocks should be treated as text
  3. Only bare ! at line start should trigger bash execution

Error Messages/Logs

Error: Bash command failed for pattern "!` prefix
  - Arguments usage is consistent
  - Content quality and length

  Fix any errors before proceeding. Warnings are suggestions for improvement.

  Step 5: Create the File

  Write the command file to the appropriate location:

  - Project scope: `": [stderr]
  (eval):1: command not found: prefix
  (eval):2: command not found: Arguments
  (eval):3: command not found: Content
  (eval):5: command not found: Fix
  usage: write user [tty]
  (eval):11: no matches found: **Project

  The (eval):N: command not found: lines show zsh trying to execute markdown text as shell commands.

Steps to Reproduce

  1. Create a skill file at ~/.claude/skills/example/SKILL.md
  2. Include documentation text with ! inside backticks, e.g.:
  • Use ! prefix for bash commands
  1. Invoke the skill
  2. Observe the parser attempts to execute text after ! as bash commands

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗