Skill SKILL.md content with backticks causes shell evaluation errors

Resolved 💬 3 comments Opened Feb 9, 2026 by rafalwojcik Closed Feb 9, 2026

Bug Description

When loading skills from ~/.claude/skills/*/SKILL.md, inline code backticks containing shell-special characters (specifically !) are being interpreted by the shell, causing errors that prevent the skill from loading.

Error Message

Error: Bash command failed for pattern "!` force unwrap is a red flag - crashes if nil
     - Force casting `": [stderr]
     zsh: command not found: force
     (eval):cd:2: too many arguments

Steps to Reproduce

  1. Create a skill at ~/.claude/skills/my-skill/SKILL.md
  2. Include inline backticks with ! in the content, e.g.:

```markdown

  • ! force unwrap is a red flag
  • Force casting as! can crash
  • try! that will crash on error

```

  1. Try to invoke the skill with /my-skill
  2. The skill fails to load with a shell evaluation error

Root Cause

It appears that during skill loading or description matching, the SKILL.md content is being passed through a shell evaluation context (likely eval in zsh). The backtick characters in markdown inline code (` ``) are interpreted as command substitution by the shell, causing the text between them to be executed as commands.

Evidence from the error:

  • zsh: command not found: force — the word "force" from the text "force unwrap" is being executed as a command
  • (eval):cd:2: too many arguments — confirms eval is involved in processing the content

Expected Behavior

Skill SKILL.md content should be treated as plain text/markdown and never passed through shell evaluation. Backticks and other shell-special characters in skill content should not cause errors.

Workaround

Replace inline backticks containing ! with double quotes in the SKILL.md file:

  • ` ! "!"`
  • ` as! "as!"`
  • ` try! "try!"`

Environment

  • Claude Code: latest (as of 2026-02-09)
  • Shell: zsh
  • OS: macOS (Darwin 25.3.0)
  • Skills location: ~/.claude/skills/

View original on GitHub ↗

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