code-chunker

Parse source files into navigable maps with sections, line ranges, and summaries.

175|26|Updated Aug 14, 2025
One-click install
npx skills add https://github.com/jmagly/aiwg --skill code-chunker-jmagly
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-chunker
Source: https://github.com/jmagly/aiwg/tree/main/agentic/code/frameworks/sdlc-complete/skills/code-chunker
Command: npx skills add https://github.com/jmagly/aiwg --skill code-chunker-jmagly

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Agents struggle to navigate large source files efficiently, leading to wasted context window space and slower development cycles. This skill provides a structured map of code files, enabling agents to quickly locate and process specific sections.

Core Features & Use Cases

  • File Structure Analysis: Parses code files to identify top-level declarations (functions, classes, etc.) and groups them into logical sections.
  • Navigable Map Generation: Produces a human-readable "table of contents" with section names, line ranges, and summaries.
  • Use Case: When an agent needs to refactor a large, unfamiliar file, it can use the code-chunker to get an immediate overview of its structure, allowing it to focus on specific methods or classes without reading the entire file.

Quick Start

Map the structure of the file located at src/main.ts.

Frequently Asked Questions about code-chunker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a structural overview of a large source file without reading the entire file?

To get a structural overview of a large source file, you can generate a navigable map that parses the code to identify top-level declarations like functions and classes. This produces a table of contents with section names, line ranges, and summaries for quick navigation.

Can I output the code structure analysis as JSON or a tree view?

Yes, code structure analysis can be output as JSON or tree views. The parser supports multiple output formats, allowing you to choose the structure representation that best fits your development workflow or downstream tooling requirements.

What is the best way to help an agent navigate unfamiliar code files efficiently?

The best way to help an agent navigate unfamiliar code files is to provide a structured map of the file's logical sections. This prevents wasted context window space by allowing the agent to quickly locate and process specific methods or classes instead of loading the entire file.

Does this code chunking tool cache generated maps for session reuse?

Yes, this code chunking tool caches generated maps for session reuse. Caching the navigable structure maps allows repeated access to the same source files without needing to reparse the code, speeding up development cycles.

When do I need to analyze file structure for logical sections and line ranges?

You need to analyze file structure for logical sections and line ranges when refactoring large or unfamiliar files. Generating a map of top-level declarations allows you to focus on specific methods or classes without reading the entire file, saving context and time.

Are there limitations when parsing source files to generate a navigable map?

Parsing source files to generate a navigable map focuses on identifying top-level declarations and grouping them into logical sections. Limitations may arise with highly dynamic or non-standard file structures that prevent clear static analysis of line ranges and section summaries.