code-archaeology

Index and query codebase knowledge graphs using Python and JSONL.

Updated May 3, 2025
One-click install
npx skills add https://github.com/taylrfnt/dotfiles --skill code-archaeology-taylrfnt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-archaeology
Source: https://github.com/taylrfnt/dotfiles/tree/main/modules/hjem/files/amp/skills/code-archaeology
Command: npx skills add https://github.com/taylrfnt/dotfiles --skill code-archaeology-taylrfnt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python, ctags, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a navigable knowledge graph for understanding and navigating large, legacy, or undocumented codebases.

Core Features & Use Cases

  • Persistent Knowledge Graph: Create a comprehensive, reusable graph for a codebase.
  • Indexing: Generate the graph from a codebase, capturing relationships and summaries.
  • Querying: Retrieve focused context bundles based on symbols, paths, and tags.
  • Use Case: When working with a complex codebase, use this Skill to quickly find and understand functions, classes, and dependencies.

Quick Start

Run the index.py script to build the knowledge graph for the codebase. Then, use query_graph.py to retrieve context for a specific symbol or path.

Frequently Asked Questions about code-archaeology

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

FAQPage Schema
How do I navigate a large undocumented codebase to understand its structure?

To navigate a large undocumented codebase, you can index it into a persistent knowledge graph. This graph captures relationships and summaries, allowing you to retrieve focused context bundles based on symbols, paths, and tags for easier understanding.

What is the best way to extract and retrieve context from a complex codebase?

The best way to extract and retrieve context from a complex codebase is by querying a knowledge graph. By indexing the codebase first, you can retrieve focused context bundles based on specific symbols, paths, and tags.

How does a knowledge graph help with codebase analysis?

A knowledge graph helps with codebase analysis by indexing the codebase to capture relationships and summaries. This creates a comprehensive, reusable graph that facilitates understanding and navigation of functions, classes, and dependencies.

Do I need Python and ctags to index a codebase knowledge graph?

Yes, you need Python and ctags to index a codebase knowledge graph. Python is required for script execution, while ctags is used for language-specific symbol extraction during the indexing process.

Can I reuse the indexed knowledge graph for future codebase navigation?

Yes, you can reuse the indexed knowledge graph for future codebase navigation. The graph is persistent and comprehensive, allowing you to repeatedly query it to retrieve focused context bundles without re-indexing the entire codebase.

What format does the codebase knowledge graph use for metadata?

The codebase knowledge graph uses JSONL file formats for metadata. This format supports the storage of node, edge, and file metadata generated during the indexing process.