How does Claude Code search code? 13,162 Grep calls. 92.8% use content mode. 28.6% request context lines. 98.6% specify a path.
Grep tool analysis — output modes, file types, context usage.
npx cc-grep
No install. No dependencies.
- Total Grep calls — across all sessions
- Output mode breakdown — content vs files_with_matches vs count
- File type distribution — what types Claude searches most
- Context line usage — -C/-A/-B flag frequency
- Path specificity — scoped vs global searches
- Case insensitivity rate — -i flag usage
cc-grep — Grep Tool Analysis
════════════════════════════════════════
▸ Overview
Total Grep calls: 13,162
Path specified: 12,977 (98.6%)
Case insensitive: 772 (5.9%)
Context lines used: 3,768 (28.6%)
▸ Output mode breakdown
content ████████████████ 92.8% (show matching lines)
files_with_matches █░░░░░░░░░░░░░░░ 6.5% (file paths only)
count ░░░░░░░░░░░░░░░░ 0.7% (match counts)
▸ What Claude Code searches
(any) ████████████████ 93.3% (12,275)
py █░░░░░░░░░░░░░░░ 3.0% (400)
gd ░░░░░░░░░░░░░░░░ 1.8% (237)
md ░░░░░░░░░░░░░░░░ 0.8% (100)
npx cc-grep # terminal output
npx cc-grep --json # JSON output for scripting
{
"version": "1.0.0",
"totalGrepCalls": 13162,
"withPathSpecified": 12977,
"withPathRate": 98.6,
"caseInsensitiveCount": 772,
"caseInsensitiveRate": 5.9,
"contextLinesUsed": 3768,
"contextRate": 28.6,
"outputModes": {
"content": 12216,
"files_with_matches": 856,
"count": 90
}
}Try it without installing: yurukusa.github.io/cc-grep
Drag-drop your ~/.claude/projects/ folder (or any subfolder) to analyze.
Reads ~/.claude/projects/**/*.jsonl session transcripts and extracts every Grep tool call. Analyzes output_mode, type/glob filters, -i flag, context line options (-C, -A, -B), and path specificity. Zero external dependencies.
Part of cc-toolkit — 71 tools for understanding your Claude Code sessions.