Explore Codebase

Navigate codebase structure using knowledge graph queries and semantic search.

Updated May 3, 2017
One-click install
npx skills add https://github.com/arnonmoscona/dot_files --skill explore-codebase-arnonmoscona
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Explore Codebase
Source: https://github.com/arnonmoscona/dot_files/tree/main/claude/projects/toolguard/.claude/skills/explore-codebase
Command: npx skills add https://github.com/arnonmoscona/dot_files --skill explore-codebase-arnonmoscona

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Understanding a large or unfamiliar codebase is slow when done by manually reading files. This Skill provides a structured workflow for exploring code through a knowledge graph, letting you quickly locate modules, trace call relationships, and understand execution flows without reading every file. ## Core Features & Use Cases - Architecture Discovery: Run graph statistics and architecture overview queries to see high-level module and community structure before diving into details. - Relationship Tracing: Query callers, callees, and imports of any function or class, and inspect execution flows to understand how code paths connect. - Token-Efficient Exploration: Enforces minimal-context retrieval rules so reviews, debugging, and refactoring tasks complete within a small number of tool calls and output tokens. - Use Case: When onboarding to a new repository, start with graph stats and the architecture overview, then use semantic search to find the specific function you need to modify and trace its callers before making changes. ## Quick Start Ask the AI to explore this repository's architecture and find which functions call the authentication module using the code knowledge graph.

Frequently Asked Questions about Explore Codebase

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

FAQPage Schema
How do I explore a large codebase efficiently?

Start with broad knowledge graph queries like graph statistics and architecture overviews, then narrow down using community listings and semantic search for specific functions. This top-down approach avoids reading files one by one and keeps context usage low.

How to find all callers of a function in a codebase?

Use the query_graph tool with the callers_of pattern to trace every function that invokes a target function. You can also use callees_of and imports_of to map dependencies in the opposite direction.

What is a code knowledge graph used for?

A code knowledge graph models functions, classes, files, and their relationships as queryable nodes and edges. It enables semantic search, architecture overviews, and execution flow analysis without manually parsing source files.

How do I reduce token usage when analyzing code with AI?

Begin every task with a minimal-context retrieval call and request minimal detail levels on graph queries, escalating only when necessary. The workflow targets completing review or debug tasks in five or fewer tool calls.

When should I not use graph-based code exploration?

Graph exploration requires the codebase to be indexed into the knowledge graph first, so it does not work on unindexed repositories. For single-file edits or trivial lookups, direct file reading may be faster.