code-chunker
code-chunker
Analyze a source file's structure and produce a navigable map with logical sections, line ranges, and summaries for efficient agent navigation.
Triggers
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
- "map this file" → structural chunking for navigation
- "chunk for navigation" → file structure mapping
Purpose
Agents encounter large files they cannot immediately refactor — third-party code, generated code, legacy files awaiting decomposition. Without a structural map, agents must read the entire file to find relevant sections, wasting context window space.
The code-chunker produces a "table of contents" for source files, enabling agents to read only the sections they need. The doc-splitter does this for documentation; code-chunker does it for source code.
This skill complements /decompose-file — chunker maps files for navigation, decomposer splits them permanently.