codebase-comprehension

Maps symbols, callers, call chains, and dependencies before modifying code.

Updated May 21, 2026
One-click install
npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill codebase-comprehension-cagesthrottleus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-comprehension
Source: https://github.com/CagesThrottleUs/private-ai-harness/tree/main/skills/codebase-comprehension
Command: npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill codebase-comprehension-cagesthrottleus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Making changes to unfamiliar code without understanding its structure leads to broken callers, violated invariants, and unexpected blast radius. This Skill builds a confirmed structural map of the target area before any edit happens. ## Core Features & Use Cases - Structural Mapping: Locates symbols, callers, callees, and impact radius using indexed tools like codegraph or Scout, with LSP, ctags, and ripgrep as portable fallbacks. - Lane-Based Depth: Adjusts analysis depth by task size — inline summaries for quick fixes, full comprehension.md artifacts for tasks and epics. - Confirmed Output: Produces a structured summary of entry points, key symbols, dependencies, invariants, blast radius, and flagged assumptions, confirmed with the user before work proceeds. - Use Case: Before fixing a bug in a payment module, run this Skill to map the broken function, its callers, and what depends on its current behavior, then save the map to .ai/<id>/comprehension.md for downstream planning phases. ## Quick Start Ask the AI to map the area of the codebase you are about to change, including callers, dependencies, and blast radius, before writing any code.

Frequently Asked Questions about codebase-comprehension

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

FAQPage Schema
How do I understand a codebase before making changes?

Run a structural mapping pass that locates the target symbols, finds their callers and callees, and identifies dependencies and blast radius. Confirm the resulting map with the requester before editing any code.

What tools can find function callers and references in code?

Indexed tools like codegraph or Scout provide AST-accurate caller and reference lookups in one call. When no index exists, fall back to LSP find-references, ctags, or ripgrep searches for call sites.

Does codebase comprehension work without a code index?

Yes, it falls back to portable tools in order: LSP go-to-definition and find-references, then ctags or tree-sitter, then ripgrep. The operation matters more than the specific tool, so no single index is required.

When should I use structural analysis instead of grep?

Prefer indexed structural tools whenever available because AST parsing is more accurate than text search. Use grep only as a fallback when no index exists, not as a double-check of indexed results.

What is the difference between codebase comprehension and code review?

Comprehension maps what exists and what would break before changes are made, while code review evaluates already-written changes. Comprehension is a pre-change mapping step, not a review or debugging session.