Custom sub agents in Claude Code are specialized AI assistants that can be invoked to handle specific types of tasks. They enable more efficient problem-solving by providing task-specific configurations with customized system prompts, tools and a separate context window.
File Splitter sub agent: intelligently chunk the minified JavaScript file and output numbered chunks with metadata. Each chunk should not exceed 200KB.
Structure Analyzer sub agent: identify code patterns and architecture, scan module systems, frameworks, and output a high-level code map and dependencies.
Tomorrow, I’ll drop my Youtube video showing this start-to-finish. Make sure you’re subbed to my free newsletter to get it:
While running, I monitored my sub agent teams’s progress and simply pressed "yes" to all the bash commands - ls commands, grep commands, echo commands. The sub agents wanted to split files, run Python scripts, create temporary directories, etc.
The chunking agent did a pretty good job! It created 101 chunks, each around 5400-6000 characters. It wrote its own tool to chunk, double-checked, and went back. Quite impressive!