Working Notes on Agent Systems/Brad Zhang

@teach_fireworks / X longform

Why do many claude code query tasks require the use of file search commands? Is there no other better way? I

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...

March 23, 2026 · 2 min read

Why do many claude code query tasks require the use of file search commands? Is there no other better way? I
Figure 1 / source image

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

Visual summary

Article argument map

Generated from the post's content graph

FORMATTOPICCAPABILITYMARKETcoverscoverscoverscoverscoverssignalssignalssignalsFORMATarticle featureTOPICagentsTOPICai workbenchesTOPICtechnical distributionTOPICmemoryTOPICretrievalCAPABILITYagent workflowCAPABILITYAI-native workbenchCAPABILITYdeveloper tooling
Mermaid outline
flowchart LR
  format-article["article feature"]
  topic-agents["agents"]
  topic-ai-workbenches["ai workbenches"]
  topic-technical-distribution["technical distribution"]
  topic-memory["memory"]
  topic-retrieval["retrieval"]
  capability-agent-workflow["agent workflow"]
  capability-ai-native-workbench["AI-native workbench"]
  capability-developer-tooling["developer tooling"]
  format-article -->|covers| topic-agents
  format-article -->|covers| topic-ai-workbenches
  format-article -->|covers| topic-technical-distribution
  format-article -->|covers| topic-memory
  format-article -->|covers| topic-retrieval
  format-article -->|signals| capability-agent-workflow
  format-article -->|signals| capability-ai-native-workbench
  format-article -->|signals| capability-developer-tooling

Visual structure

Essay structure map

Built from summary and key paragraph positions

Why do many claude code query tasks require the use of file search commands? Is there...THESISWhy do many claudecode query tasksrequire the use offile search commands?SIGNALWhy do many claudecode query tasksrequire the use offile search commands?OPERATOR4. Your skills-updateris already doing this.The skills-updaterskill in yourIMPLICATION3. Read one file whensearching, saving 5-10tool calls
Mermaid outline
flowchart LR
  thesis["Why do many claude code query tasks require the use of file search commands? Is there no other better way?..."]
  signal["Why do many claude code query tasks require the use of file search commands? Is there no other better way?..."]
  operator["4. Your skills-updater is already doing this. The skills-updater skill in your repository is actually the p..."]
  implication["3. Read one file when searching, saving 5-10 tool calls"]
  thesis -->|frames| signal
  signal -->|develops| operator
  operator -->|lands in| implication

Source: View the original post