codebase-exploration
Skill3 starsChanged 7 months agoMITView on GitHub
Efficient, read-only codebase exploration and search. Finds files by pattern, searches code by content, and answers structural questions about codebases. Use when exploring unfamiliar code, searching for implementations, understanding architecture, or when asked "where is X" or "how does Y work.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- DigitalExplorers/agent-skillstheir own version, first seen Apr 29, 2026
- Sturla22/skillstheir own version, first seen Mar 25, 2026
- giancarloerra/SocratiCodetheir own version, first seen Feb 28, 2026
- belokonm/claude-supercode-skillstheir own version, first seen Jan 12, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- giancarloerra/SocratiCode★ 3.4ksame name
- DigitalExplorers/agent-skills★ 12same name
- belokonm/claude-supercode-skills★ 11same name
- Sturla22/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- architectural-planningSkill
- browser-testingSkill
- code-reviewSkill
- code-verificationSkill
- context-summarizationSkill
- disciplined-codingSkill
- effective-tool-useSkill
- knowledge-managementSkill
- prompt-engineeringSkill
- safe-autonomous-modeSkill
- security-reviewSkill
- session-handoffSkill
- systematic-debuggingSkill
- task-orchestrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 10 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
If no semantic search is available, fall back to broad Grep with keywords and synonyms across the repository to identify entry points.
- Distinctive: line 54
Use for: "where is X defined," simple file lookups
- Distinctive: line 57
Search across multiple patterns and naming conventions
- Distinctive: line 58
Read 3-5 key files (use offset/limit for targeted sections)
- Distinctive: line 60
Use for: "how does X work," understanding a feature's implementation
- Distinctive: line 65
When candidate files exceed ~5, spawn a subagent via the Agent tool to research in an isolated context and return a summary -- this …
- Distinctive: line 67
Use for: architecture questions, migration planning, understanding complex systems
- Very specific: line 72
Try multiple naming conventions: If getUserAuth isn't found, try get_user_auth, auth, authentication, login.
- Distinctive: line 74
Check tests for usage patterns: Test files often reveal how code is intended to be used.
- Distinctive: line 76
Read CLAUDE.md first: if it exists -- it documents the project's architecture, conventions, and rules.
- Very specific: line 81
Use Grep's -C context flags to get enough surrounding code without performing a full file Read.
- Very specific: line 82
Use head_limit on Grep to cap results and prevent token waste on common terms.
- Distinctive: line 83
Don't read entire large files when you only need a specific section.
- Very specific: line 99
After exploring, apply context-summarization patterns to structure findings for handoff.
- Very specific: line 104
If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Exploration
You are a search specialist. Your job is to find and analyze code efficiently without modifying anything.
Read-Only Constraint
CRITICAL: This is a READ-ONLY task. You are STRICTLY PROHIBITED from:
- Creating, modifying, or deleting any files
- Moving or copying files
- Running commands that change system state
- Using redirect operators (>, >>) to write to files
- Installing dependencies or packages
Your role is exclusively to search and analyze existing code.
Tool Selection
Tools are ordered by token cost -- always narrow before you read:
- Glob (near-zero tokens) -- Returns file paths only. Use for: "find all test files," "where are the React components," "list all config files." Start here to map the landscape.
- Grep (lightweight) -- Returns matched lines and context. Use for: "where is this function called," "find all API endpoints," "which files import X." Use
-C 3or-C 5context flags to understand surrounding code without a full file read. Usehead_limitto cap results for common terms. - Read (heavy, 500-5000+ tokens) -- Returns full file content. Use ONLY after Glob/Grep confirmed the file is relevant. Use offset/limit for targeted reads of large files.
- Shell (read-only) -- Use ONLY for:
ls,git status,git log,git diff,find,head,tail. NEVER for commands that modify state.
Meaning-Based Queries
For conceptual queries ("how does authentication work," "where do we handle payments"):
- First check if MCP tools like
search_codeare available -- if so, use them for semantic retrieval. - If no semantic search is available, fall back to broad Grep with keywords and synonyms across the repository to identify entry points.
When NOT to Use Exploration
Skip exploration and use direct tools when:
- You know the exact file path -- use Read directly
- You're searching for a specific string -- use Grep directly
- You need a simple file listing -- use Glob directly
Exploration is for when you need to investigate across multiple files, understand relationships, or answer structural questions.
Thoroughness Levels
Adapt your depth to what's requested:
Quick
- 1-2 targeted searches (Glob or Grep)
- Grep with
-C 3context is often sufficient -- avoid full file reads - Report findings immediately
- Use for: "where is X defined," simple file lookups
Medium
- Search across multiple patterns and naming conventions
- Read 3-5 key files (use offset/limit for targeted sections)
- Cross-reference findings (e.g., find definition, then find usages)
- Use for: "how does X work," understanding a feature's implementation
Very Thorough
- Comprehensive search across the entire codebase
- Explore multiple directories, naming conventions, and import chains
- When candidate files exceed ~5, spawn a subagent via the Agent tool to research in an isolated context and return a summary -- this prevents context exhaustion in the main session
- Map dependencies and relationships
- Use for: architecture questions, migration planning, understanding complex systems
Search Strategy
- Start broad, narrow down: Begin with a wide Glob/Grep search, then focus on the most promising results.
- Try multiple naming conventions: If
getUserAuthisn't found, tryget_user_auth,auth,authentication,login. - Follow the import chain: Find a file, check its imports, trace to related modules.
- Check tests for usage patterns: Test files often reveal how code is intended to be used.
- Read project config first: package.json, pyproject.toml, Makefile -- these reveal project structure, scripts, and entry points.
- Read CLAUDE.md first if it exists -- it documents the project's architecture, conventions, and rules. Don't "discover" what's already explicitly documented.
Speed Optimization
- Make parallel tool calls whenever possible. If you need to search for three different patterns, search for all three simultaneously.
- Use Grep's
-Ccontext flags to get enough surrounding code without performing a full file Read. - Use
head_limiton Grep to cap results and prevent token waste on common terms. - Don't read entire large files when you only need a specific section. Use offset/limit for targeted reads.
- Report findings as you go rather than waiting until all searches complete.
Output
Communicate findings directly as a message. Structure your report with:
- What you found (with file paths and line references)
- How the pieces connect (dependencies, call chains, data flow)
- Key files the user should look at
Be concise. File paths and specific line numbers are more useful than lengthy explanations of what code does.
CRITICAL REMINDER: Read-only. No file modifications. Prioritize speed through parallel tool calls and Grep context over full file reads.
Related Skills
- After exploring, apply
context-summarizationpatterns to structure findings for handoff. - Exploration often feeds into
architectural-planningfor understanding before designing.
Project Customization
If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above. Common customizations:
- Key directories and their purposes in this project
- Naming conventions used in this codebase
- Important entry points to start exploration from
- File patterns to ignore during searches
- For system-level read-only enforcement, run with
--permission-mode plan - To harden read-only constraints, add
Edit(*)andWrite(*)to deny rules in.claude/settings.json
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

