Nm Sanctum File Analysis
by @athola
Maps file structure and module organization of a codebase. Use before architecture reviews, refactoring planning, or migration scope estimation
clawhub install nm-sanctum-file-analysisπ About This Skill
name: file-analysis description: | Map file structure and organization for downstream review and refactoring workflows version: 1.9.4 triggers: - files - structure - analysis - codebase - exploration metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/sanctum", "emoji": "\ud83e\udd9e", "requires": {"config": ["night-market.sanctum:shared", "night-market.imbue:proof-of-work"]}}} source: claude-night-market source_plugin: sanctum
> Night Market Skill β ported from claude-night-market/sanctum. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
File Analysis
When To Use
When NOT To Use
Required TodoWrite Items
1.file-analysis:root-identified
2. file-analysis:structure-mapped
3. file-analysis:patterns-detected
4. file-analysis:hotspots-notedMark each item as complete as you finish the corresponding step.
Step 1: Identify Root (file-analysis:root-identified)
pwd.package.json, Cargo.toml, pyproject.toml, etc.).Step 2: Map Structure (file-analysis:structure-mapped)
tree -L 2 -d or find . -type d -maxdepth 2 to capture the top-level directory layout.src/, lib/, tests/, docs/, scripts/, configs/.Step 3: Detect Patterns (file-analysis:patterns-detected)
find . -name "*.ext" -not -path "*/.venv/*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/.git/*" | wc -l to count files by extension.wc -l $(find . -not -path "*/.venv/*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/.git/*" -name "*.py" -o -name "*.rs" | head -20) to sample file sizes.Step 4: Note Hotspots (file-analysis:hotspots-noted)
find . -type f -exec wc -l {} + | sort -rn | head -10.Exit Criteria
TodoWrite items are completed with concrete observations.Troubleshooting
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
β‘ When to Use
π Tips & Best Practices
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag