iterative-code-exploration
Skill17 starsChanged 5 months agoApache-2.0Archived repositoryView on GitHub
Progressive context retrieval pattern for understanding unfamiliar codebases through iterative refinement
1 other project uses a version of this.
Other versions1 project uses a version of this.
Word for word · 1
- organvm-iv-taxis/a-i--skills★ 17100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository170 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- algorithmic-artSkill
- audio-engineering-patternsSkill
- canvas-designSkill
- creative-writing-craftSkill
- generative-art-algorithmsSkill
- generative-art-deploymentSkill
- generative-music-composerSkill
- interactive-theatre-designerSkill
- modular-synthesis-philosophySkill
- movement-notation-systemsSkill
- narratological-algorithmsSkill
- natural-center-extractionSkill
- react-three-fiber-patternsSkill
- reality-tv-narrative-analyzerSkill
- script-analysis-dramaturgicalSkill
- theme-factorySkill
- three-js-interactive-builderSkill
- corpus-persona-extractionSkill
- data-ingestion-pipelineSkill
- data-pipeline-architectSkill
- data-storytelling-analystSkill
- market-gap-analysisSkill
- ml-experiment-trackerSkill
- prompt-atom-formalizationSkill
- sql-query-optimizerSkill
- systemic-product-analystSkill
- time-series-analystSkill
- accessibility-patternsSkill
- agent-testing-patternsSkill
- api-design-patternsSkill
- artifacts-builderSkill
- backend-implementation-patternsSkill
- browser-extension-patternsSkill
- cli-tool-designSkill
- code-refactoring-patternsSkill
- code-review-checklistSkill
- coding-standards-enforcerSkill
- community-platform-patternsSkill
- configuration-managementSkill
- continuous-learning-agentSkill
- data-backup-patternsSkill
- database-migration-patternsSkill
- deployment-cicdSkill
- docker-containerizationSkill
- dotfile-systems-architectSkill
- error-handling-logging-patternsSkill
- fastapi-patternsSkill
- feature-workflow-orchestratorSkill
- frontend-design-systemsSkill
- fullstack-starter-packSkill
- gcp-resource-optimizerSkill
- htmx-interaction-patternsSkill
- json-schema-designSkill
- mcp-builderSkill
- mcp-server-orchestratorSkill
- mobile-platform-architectSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
When working with new codebases, you often don't know:
- Distinctive: line 51
Start with broad exploration:
- Distinctive: line 148
Refine: Check tests and edge cases
- Distinctive: line 168
Refine: Check call sites and callers
- Distinctive: line 193
Loop: Ensure all references found
- Distinctive: line 197
After each loop iteration, document:
- Distinctive: line 228
Start wide, then narrow focus
- Distinctive: line 229
Document assumptions to validate
- Distinctive: line 230
Use tests as documentation
- Distinctive: line 232
Check git history for context
- Distinctive: line 233
Look for comments explaining "why"
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Iterative Code Exploration
A systematic pattern for progressively exploring and understanding unfamiliar codebases through iterative context refinement.
The Problem
When working with new codebases, you often don't know:
- Which files contain relevant code
- What patterns and conventions exist
- What terminology the project uses
- How components interact
Standard approaches fail:
- Read everything: Time-consuming and overwhelming
- Guess locations: Often misses critical context
- Ask broad questions: Returns too much irrelevant information
The Solution: 4-Phase Iterative Loop
┌─────────────────────────────────────────────┐
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ DISCOVER │─────▶│ EVALUATE │ │
│ └──────────┘ └──────────┘ │
│ ▲ │ │
│ │ ▼ │
│ ┌──────────┐ ┌──────────┐ │
│ │ LOOP │◀─────│ REFINE │ │
│ └──────────┘ └──────────┘ │
│ │
│ Max 3-4 cycles, then synthesize │
└─────────────────────────────────────────────┘Phase 1: DISCOVER
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 -20Document initial findings:
- Project type (web app, library, service, etc.)
- Tech stack (languages, frameworks)
- Architecture hints (monorepo, microservices, etc.)
Phase 2: EVALUATE
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/nullScoring Criteria:
- Critical (★★★): Entry points, core logic, main configs
- Important (★★): Utilities, shared components, types
- Supporting (★): Tests, docs, examples
- Noise (-): Generated files, vendored code
Phase 3: REFINE
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 -10Build mental model:
- How components connect
- What patterns are used consistently
- Where similar functionality lives
Phase 4: LOOP
Decision point - do you need more context?
Continue if:
- Key functionality still unclear
- Dependencies not fully traced
- Patterns inconsistent or confusing
Stop if:
- Core logic understood
- Can explain main flows
- Ready to make changes confidently
Practical Workflow
For Feature Implementation
- 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
For Bug Fixing
- 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
For Refactoring
- 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
Output Template
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: DescriptionIntegration Points
Complements:
- knowledge-architecture: For documenting discoveries
- second-brain-librarian: For saving exploration notes
- project-orchestration: For planning exploration strategy
- testing-patterns: For learning through tests
Tips
- Start wide, then narrow focus
- Document assumptions to validate
- Use tests as documentation
- Follow imports/exports
- Check git history for context
- Look for comments explaining "why"
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.

