A read-only subagent tool designed to cheaply and quickly map the dependencies and Abstract Syntax Tree (AST) structure of a repository without requiring heavy LLM deductive reasoning for every file.
When tackling large repository refactoring or analyzing architecture, the “orchestrator” AI agent often struggles to hold the full repository structure in its context window. Opening and reading every file consumes thousands of tokens and can cause the agent to lose its core instructions.
The ask-ast-mapper is a specialized, read-only subagent skill. It is expressly designed to be run by a fast, low-cost model (e.g., Claude Haiku). Its single purpose is to grep through directories, read files, map class definitions, function signatures, and imports, and return a minified ast_map.json or concise Markdown equivalent to the parent orchestrator.
This skill enforces the Principle of Least Privilege.
ask-ast-mapper skill to analyze a specific directory.grep, glob, or CLI AST tools to build the map.Reading user_controller.ts (500 lines), user_service.ts (300 lines), and user_repository.ts (400 lines) entirely into context just to find out user_controller calls user_service.create().
{
"user_controller.ts": {
"imports": ["UserService"],
"methods": ["createUser", "getUser"]
},
"user_service.ts": {
"imports": ["UserRepository"],
"methods": ["create", "find"]
}
}
src/auth) rather than the entire src/ folder if the repository is massive.ask-system-architect-prime) to handle the reconnaissance phase.