Agent skill
analyze-code-structure
Examine code organization and identify structural patterns. Use when reviewing module design.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/analyze-code-structure
SKILL.md
Analyze Code Structure
Examine code organization, module hierarchy, and structural patterns to understand how components are organized.
When to Use
- Initial codebase review and orientation
- Understanding existing module organization
- Identifying code structure for documentation
- Planning refactoring or reorganization
Quick Reference
# Quick code structure analysis
find . -name "*.py" -o -name "*.mojo" | head -20
tree -L 2 --dirsfirst
grep -r "^class\|^def\|^fn\|^struct" --include="*.py" --include="*.mojo" | head -30
Workflow
- Survey the codebase: Identify top-level modules and packages
- Map module hierarchy: Create visual tree of module organization
- List main components: Classes, structs, major functions
- Trace imports: Understand module dependencies
- Document findings: Summarize structure for team
Output Format
Structure analysis:
- Module/package hierarchy (tree view)
- Key components per module
- Import dependencies
- Layer organization (if applicable)
- Notable patterns (MVC, singleton, factory, etc.)
References
- See
analyze-code-structuretier-2 skill for deeper analysis - See CLAUDE.md > Modularity for design principles
- See
identify-architectureskill for ML-specific structure
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?