[BUG] Skill with paths frontmatter is completely undiscoverable
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?
Adding a paths field to a skill's SKILL.md frontmatter causes the skill to be entirely excluded from discovery. It does not appear in the / autocomplete menu, is not listed as an available skill, and invoking it directly returns "Unknown skill: <name>".
Other skills in the same directory (~/.claude/skills/) without the paths field load correctly. Removing only the paths line, with no other changes, immediately restores discovery.
What Should Happen?
The paths field should limit when the skill auto-activates based on file patterns, not prevent the skill from being discovered. The skill should remain invokable via /name regardless of paths.
Steps to Reproduce
- Create a skill at
~/.claude/skills/test-skill/SKILL.md:
```yaml
---
name: test-skill
description: A test skill to reproduce the paths discovery bug
paths: "*.rs,Cargo.toml,Cargo.lock"
---
# Test Skill
If you can read this, the skill loaded successfully.
```
- Restart Claude Code
- Type
/test-skill→ returns "Unknown skill: test-skill" - Remove the
paths:line from frontmatter - Restart Claude Code
- Type
/test-skill→ works correctly
Is this a regression?
I don't know
Claude Code Version
2.1.92 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- The
pathsfield was introduced for skills in v2.1.84 (changelog: "Rules and skillspaths:frontmatter now accepts a YAML list of globs") - Tested with comma-separated string format (
paths: "*.rs,Cargo.toml,Cargo.lock"); did not test YAML list format - Skills were symlinked (
~/.claude/skills/test-skill→ another directory), but symlinks resolve correctly and other symlinked skills withoutpathsload fine - Related: #45587 (
pathswith multiple patterns only matches first, for rules not skills), #39105 (pathsmissing from skill frontmatter docs)
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗