[BUG] Claude Code runtime deletes project-level .claude/skills/ directory within seconds of file creation
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?
Claude Code's running process actively watches and deletes the entire .claude/skills/ directory within ~300ms of any file being created there, preventing project-level skills from being used. This contradicts the documented behaviour where project-level skills should coexist with plugin-provided skills.
The entire .claude/skills/ directory is deleted within ~300ms of any file appearing in it. This was confirmed by rapid polling:
mkdir -p .claude/skills/canary && echo "test" > .claude/skills/canary/SKILL.md
for i in $(seq 1 30); do
[ ! -f .claude/skills/canary/SKILL.md ] && echo "Deleted after ~$((i/10)).$((i%10))s" && break
sleep 0.1
done
# Output: Deleted after ~0.3s
What Should Happen?
Project-level skills in .claude/skills/ should persist on disk and be available as slash commands, as documented. Plugin skills use namespaced prefixes (e.g. /plugin-name:skill-name) and should not conflict with project-level skills.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Start a Claude Code session in a project directory
- Create a project-level skill:
mkdir -p .claude/skills/test-skill
echo '---
name: test-skill
description: "A test skill"
---
Test content' > .claude/skills/test-skill/SKILL.md
- Wait 1 second
- Check if the file exists:
ls .claude/skills/test-skill/SKILL.md
# Result: No such file or directory — entire .claude/skills/ directory is gone
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code v2.1.76.
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Cursor
Additional Information
Investigation
- No hooks configured (.claude/settings.json only contains {"voiceEnabled": true})
- No .claude/settings.local.json or .claude/hooks.json exists
- No git hooks (all .sample files only)
- No npm lifecycle scripts that touch .claude/
- .claude/commands/ directory is not affected — only .claude/skills/ is wiped
- Other .claude/ subdirectories (e.g. .claude/my-skills/) are not affected — only the exact path .claude/skills/ is targeted
- The running claude CLI process is the only candidate; no other file-watching tools are active
Impact
- Project-level skills committed to git show as permanently deleted in git status, creating an unresolvable dirty working directory
- Teams cannot share project-specific skills via version control
- The only workaround is to use .claude/commands/ instead, which doesn't support multi-file skills with reference directories
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗