Skills file-analysis
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/athola/nm-sanctum-file-analysis" ~/.claude/skills/openclaw-skills-file-analysis && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/athola/nm-sanctum-file-analysis" ~/.openclaw/skills/openclaw-skills-file-analysis && rm -rf "$T"
manifest:
skills/athola/nm-sanctum-file-analysis/SKILL.mdsource content
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
- Before architecture reviews to understand module boundaries and file organization.
- When exploring unfamiliar codebases to map structure before making changes.
- As input to scope estimation for refactoring or migration work.
When NOT To Use
- General code exploration - use the Explore agent
- Searching for specific patterns - use Grep directly
Required TodoWrite Items
file-analysis:root-identifiedfile-analysis:structure-mappedfile-analysis:patterns-detectedfile-analysis:hotspots-noted
Mark each item as complete as you finish the corresponding step.
Step 1: Identify Root (file-analysis:root-identified
)
file-analysis:root-identified- Confirm the analysis root directory with
.pwd - Note any monorepo boundaries, workspace roots, or subproject paths.
- Capture the project type (language, framework) from manifest files (
,package.json
,Cargo.toml
, etc.).pyproject.toml
Step 2: Map Structure (file-analysis:structure-mapped
)
file-analysis:structure-mapped- Run
ortree -L 2 -d
to capture the top-level directory layout.find . -type d -maxdepth 2 - Identify standard directories:
,src/
,lib/
,tests/
,docs/
,scripts/
.configs/ - Note any non-standard organization patterns that may affect downstream analysis.
Step 3: Detect Patterns (file-analysis:patterns-detected
)
file-analysis:patterns-detected- Use
to count files by extension.find . -name "*.ext" -not -path "*/.venv/*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/.git/*" | wc -l - Identify dominant languages and their file distributions.
- Note configuration files, generated files, and vendored dependencies.
- Run
to sample file sizes.wc -l $(find . -not -path "*/.venv/*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/.git/*" -name "*.py" -o -name "*.rs" | head -20)
Step 4: Note Hotspots (file-analysis:hotspots-noted
)
file-analysis:hotspots-noted- Identify large files (potential "god objects"):
.find . -type f -exec wc -l {} + | sort -rn | head -10 - Flag deeply nested directories that may indicate complexity.
- Note files with unusual naming conventions or placement.
Exit Criteria
items are completed with concrete observations.TodoWrite- Downstream workflows (architecture review, refactoring) have structural context.
- File counts, directory layout, and hotspots are documented for reference.
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