[BUG] Project-local skills interfere with global slash command fuzzy matching
Status Fixed / completed
Reported on v2.1.29
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Jan 31, 2026 · closed Feb 3, 2026
Bug Report
Issue: Skills fuzzy matching cache not cleared after removing project-local skills
Version: 2.1.29
Description:
After defining project-local skills in .claude/skills/ and then removing them:
- Claude Code prompts to install the removed skills
- The fuzzy matching still finds the old skill names (case-insensitive matching appears broken)
Root Cause: Found a skill file that was not UTF-8 encoded. After deleting this specific skill file, the issue was resolved.
Steps to Reproduce:
- Create a
.claude/skills/directory with custom skills - Use the skills in a session
- Remove the skills directory
- Claude still prompts for the removed skills
Expected Behavior: Skills should be fully cleared from memory when removed
Workaround: Delete any non-UTF-8 encoded skill files
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This issue should NOT be closed as a duplicate. While the symptoms overlap with #21924, #19107, and #18898, my report provides critical new information that helps identify the ROOT CAUSE:
Key Differences
.claude/skills/. The other reports do not identify this trigger.This suggests the bug is in how project-local skills are merged with global commands, and how that state is cached/persisted. This is valuable information for fixing the actual root cause, not just the symptom.
Please keep this issue open as it provides unique diagnostic value that the other issues do not.
Root Cause Found & Workaround
I was able to reproduce this issue and discovered the root cause:
The Hidden Problem: File Encoding Corruption
My folder is shared between Claude Code and another tool (Codex). When Codex modifies skill files, it writes them using incorrect encoding (likely GBK/ANSI instead of UTF-8), causing the files to become corrupted with garbled characters.
How This Triggers the Slash Command Bug
Solution
Fix the file encoding:
After fixing the encoding, the slash commands work correctly again.
Suggestion for Developers
Consider adding:
/reload-commands)Hope this helps others facing the same issue!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.