Why do many claude code query tasks require the use of file search commands? Is there no other better way? I asked CC this question, and it gave me a very detailed answer, and then gave me a feasible solution. You can also try it: This is a core pain point of Claude Code's current architecture. Why use file search? Claude Code is essentially a stateless agent - it knows nothing about the environment in each conversation and can only "see" the world through tool calls: The user says "update skill Local index file (most practical) Create a skills-manifest.json, which is automatically maintained when installing/updating skills, so that only one file (~2KB) needs to be read when searching, instead of Glob + Read 49 directories.
- MCP Server provides structured query and packages skill management into MCP tools: mcp://skill-manager/list → Return all skills mcp://skill-manager/get/name → Return single skill information mcp://skill-manager/update/name → Perform update Claude can directly adjust one tool to complete the task without multiple rounds of file searches.
- SessionStart Hook preloading automatically generates the environment summary injection context when the session starts: # SessionStart hook python3 > /tmp/claude-env-summary.json In this way, Claude knows "which skills are installed, in which directory, and what version" from the beginning.
- Your skills-updater is already doing this. The skills-updater skill in your repository is actually the prototype of option 1 - it has the check_updates.py script to scan and manage skills. It can be further optimized to automatically maintain the manifest. --- Practical suggestions The simplest and most effective solution is the combination of solution 1 + solution 3:
- Write a ~/.claude/skills-manifest.json, which will be automatically updated when installing/uninstalling the skill
- Generate it in the SessionStart hook, so that Claude will have a global view every time the conversation starts
- Read one file when searching, saving 5-10 tool calls
