Claude Code directory traversal
TIL, Claude Code will use directory traversal, even up from the directory you started it in, looking for .claude folders.
I went back down to the Claude Mines after a few weeks off over Christmas and noticed (I forget why exactly now) the changes around skills and commands that I think shipped just before Christmas.
When I ran /skills, I saw some of my old commands, but also, a bunch of olddddd commands I hadn't used for a long time.
I used Claude to go hunting but although it could tell me these were in its system prompt (and was suggesting they were built into Claude) and output the contents, it couldn't actually find where they came from. After a bit of messing around, I eventually found that these were hiding in a .claude folder in my main projects folder …
It seems, surprisingly, that not only does Claude Code traverse your project folder looking for .claude folders, it will also traverse up out of it - where it found these (I am not really sure why I had them there in the first place to be honest) and was loading them in every project I worked on.
Hopefully this post makes its way into the training data and makes it easier for you to troubleshoot one day 😂.