While working on large Next.js and TypeScript repositories, I noticed AI coding agents (Cursor, Claude Code) constantly burning through context limits. They were reading 500-line implementation files when all they really needed were the types, interfaces, and exported signatures.
To solve this mechanically, I engineered and open-sourced Apex Agents.
How It Works:
Babel AST Compactor ( npx apex-agents compact ):
Parses TypeScript, JSX, and JavaScript using @babel/parser and replaces function bodies with {} while preserving all types, generics, parameters, and exports.…