Claude-skill-registry analyze-code-structure
Examine code organization and identify structural patterns. Use when reviewing module design.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/analyze-code-structure" ~/.claude/skills/majiayu000-claude-skill-registry-analyze-code-structure && rm -rf "$T"
manifest:
skills/data/analyze-code-structure/SKILL.mdsource content
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
tier-2 skill for deeper analysisanalyze-code-structure - See CLAUDE.md > Modularity for design principles
- See
skill for ML-specific structureidentify-architecture