distributions/codex/skills/iterative-code-exploration/SKILL.md
Progressive context retrieval pattern for understanding unfamiliar codebases through iterative refinement
npx skillsauth add a-organvm/a-i--skills iterative-code-explorationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A systematic pattern for progressively exploring and understanding unfamiliar codebases through iterative context refinement.
When working with new codebases, you often don't know:
Standard approaches fail:
┌─────────────────────────────────────────────┐
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ DISCOVER │─────▶│ EVALUATE │ │
│ └──────────┘ └──────────┘ │
│ ▲ │ │
│ │ ▼ │
│ ┌──────────┐ ┌──────────┐ │
│ │ LOOP │◀─────│ REFINE │ │
│ └──────────┘ └──────────┘ │
│ │
│ Max 3-4 cycles, then synthesize │
└─────────────────────────────────────────────┘
Start with broad exploration:
# Find entry points
find . -name "main.*" -o -name "index.*" -o -name "app.*" | head -20
# Discover project structure
tree -L 3 -I 'node_modules|dist|build'
# Find configuration
find . -name "*.config.*" -o -name "package.json" -o -name "*.toml"
# Identify key patterns
grep -r "export class" --include="*.ts" src/ | head -20
grep -r "def " --include="*.py" . | head -20
Document initial findings:
Assess discovered files for relevance:
# Read high-value files
cat README.md
cat ARCHITECTURE.md 2>/dev/null
cat docs/overview.md 2>/dev/null
# Check package manifests
cat package.json | jq '.dependencies, .scripts'
cat Cargo.toml 2>/dev/null
cat requirements.txt 2>/dev/null
Scoring Criteria:
Focus on specific areas identified as relevant:
# Dive into specific modules
ls -la src/core/
cat src/core/index.ts
# Trace dependencies
grep -r "import.*from.*core" --include="*.ts" src/ | head -20
# Find related patterns
grep -A 5 -B 5 "class UserService" src/**/*.ts
# Check tests for usage examples
find . -name "*.test.*" -o -name "*.spec.*" | head -10
Build mental model:
Decision point - do you need more context?
Continue if:
Stop if:
Discover: Find similar existing features
grep -r "feature-name" src/
find . -name "*feature*"
Evaluate: Review implementation patterns
cat src/features/similar-feature/index.ts
Refine: Check tests and edge cases
cat src/features/similar-feature/*.test.ts
Loop: Trace dependencies until clear
Discover: Locate error origin
grep -r "error message" src/
git log -S "error message"
Evaluate: Understand surrounding context
cat path/to/file.ts | grep -A 20 -B 20 "error location"
Refine: Check call sites and callers
grep -r "functionName" --include="*.ts" src/
Loop: Expand context as needed
Discover: Map current structure
find src/ -name "*.ts" | xargs wc -l | sort -n
grep -r "class\|interface" --include="*.ts" src/ | wc -l
Evaluate: Identify coupling points
grep -r "import.*from.*module" src/ | cut -d: -f2 | sort | uniq -c | sort -rn
Refine: Find all usages
grep -r "ComponentName" --include="*.ts" src/
Loop: Ensure all references found
After each loop iteration, document:
## Iteration N
**Query**: What I was looking for
**Found**: X files, Y patterns, Z components
**Relevance**: High/Medium/Low with reasons
**Gaps**: What's still unclear
**Next**: What to explore in next iteration
**Key Files**:
- path/to/file.ts - Core implementation (★★★)
- path/to/other.ts - Supporting utility (★★)
**Mental Model Update**:
- New understanding of X
- Connection between Y and Z
- Pattern: Description
Complements:
development
Create algorithmic and generative art using mathematical patterns, noise functions, particle systems, and procedural generation. Covers flow fields, L-systems, fractals, and creative coding foundations. Triggers on generative art, algorithmic art, creative coding, procedural generation, or mathematical visualization requests.
development
Audits web applications and architectures for compliance with GDPR, CCPA, and other privacy regulations, focusing on consent, data minimization, and user rights.
development
Optimize Google Cloud Platform resource allocation and manage cloud credits efficiently. Use when planning GCP deployments, analyzing cloud spend, maximizing value from expiring credits, right-sizing instances, or designing cost-effective architectures. Triggers on GCP cost optimization, credit management, resource allocation planning, or cloud budget concerns.
testing
Designs engaging gameplay loops, economies, and progression systems, balancing challenge and reward for interactive experiences.