🔧Tool Prompts/file-ops
Glob Tool
src/tools/GlobTool/prompt.ts
Prompt Engineering Insight
The Glob tool prompt is concise by design — it's a simple discovery tool. The key technique is the escalation hint at the end, directing the model to use the Agent tool for complex multi-round searches. This is a form of tool-use guidance that prevents the model from getting stuck in inefficient search loops.
Techniques Used
tool-use-guidancescope-limiting
prompt
- Fast file pattern matching tool that works with any codebase size
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
- Returns matching file paths sorted by modification time
- Use this tool when you need to find files by name patterns
- When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead
Tags
globfile-searchpattern-matchingdiscovery
Appears in use cases
This prompt is a step in curated flows that show how pieces of Claude Code connect for real tasks.