Explore area

From huzaifa525/claude-code-optimizer · View interactive version

Explore area is an AI agent skill from the GitHub repository huzaifa525/claude-code-optimizer. Use when you need to understand a module, feature, or directory before making changes.

How to use this skill

Skill file

Explore $ARGUMENTS using progressive disclosure to minimize token cost.

Progressive Disclosure (3 Layers)

Layer 1: File Index (cheapest — start here)

Get the file list WITHOUT reading contents:

# List all files in the target area
find [target] -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | head -50

Or use Glob to find relevant files. From this list alone, identify:

Decision point: Do you now have enough context? If yes, skip to Return Format. If no, proceed to Layer 2.

Layer 2: Entry Points & Signatures (moderate cost)

Read ONLY entry points and key files. Use targeted reads:

# Find exports
grep -rn "export" [target]/index.* 2>/dev/null
# Find class/function definitions
grep -rn "^export \(class\|function\|const\|interface\)" [target]/ 2>/dev/null

Decision point: Do you understand the module's API and structure? If yes, skip to Return Format. If no, proceed to Layer 3.

Layer 3: Deep Dive (expensive — only when needed)

Read full file contents, but only for files that are:

Use offset and limit for large files — read the relevant section, not the whole file.

Return Format

## Area: [name]

### Structure ([X] files)
- [file] → [purpose, 5 words max]

### Key Files (read these before editing)
- [file] → [what it does and why it matters]

### Dependencies
- Imports from: [external modules used]
- Exported to: [who consumes this module]

### Patterns to Follow
- [naming, structure, style patterns observed]
- [reference file] → follow this as template for new code

### Tests
- [test approach, test file locations, how to run]

### Gotchas
- [anything unusual, legacy code, known quirks]
- [things that look wrong but are intentional]

Rules

<!-- Skill by Huzefa Nalkheda Wala | github.com/huzaifa525 | claude-code-optimizer -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.