index-knowledge

Generate hierarchical AGENTS.md knowledge bases from codebases.

Updated Jun 12, 2025
One-click install
npx skills add https://github.com/stevoland/dotfiles --skill index-knowledge-stevoland
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: index-knowledge
Source: https://github.com/stevoland/dotfiles/tree/main/opencode/skill/index-knowledge
Command: npx skills add https://github.com/stevoland/dotfiles --skill index-knowledge-stevoland

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of a hierarchical knowledge base by generating AGENTS.md files at the project root and in selected subdirectories, helping teams navigate large codebases.

Core Features & Use Cases

  • Root + Subdirectory Documentation: Produces a root AGENTS.md and per-subdirectory AGENTS.md with clear structure and governance.
  • Discovery + Scoring: Analyzes project structure and domain boundaries to decide where AGENTS.md is most needed.
  • Regeneration & Sync: Supports full regeneration or incremental updates to keep documentation in sync with code.

Quick Start

Run the knowledge-generation workflow on your repository to produce AGENTS.md files for the root and key subdirectories.

Frequently Asked Questions about index-knowledge

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

FAQPage Schema
How do I auto-generate an AGENTS.md knowledge base for my codebase?

You can generate an AGENTS.md knowledge base by running the knowledge-generation workflow on your repository, which produces a root AGENTS.md and complexity-scored subdirectory documents to capture hierarchical domain structure.

What is the purpose of hierarchical AGENTS.md files in a repository?

Hierarchical AGENTS.md files provide a root and per-subdirectory knowledge base with clear structure and governance, helping teams navigate large codebases by capturing domain boundaries and structural complexity.

Can I incrementally update documentation instead of regenerating AGENTS.md files?

Yes, you can perform incremental updates to sync AGENTS.md files with code changes, or you can execute a full regeneration to completely rebuild the root and subdirectory knowledge base from scratch.

How does the skill decide which subdirectories need an AGENTS.md file?

The skill discovers project structure via filesystem analysis and optional LSP/AST parsing, scoring subdirectories by complexity and domain boundaries to determine where AGENTS.md documentation is most needed.

Do I need existing AGENTS.md files to generate a knowledge base?

No, existing AGENTS.md files are optional; the skill relies on filesystem discovery and optional AST analysis to generate documentation, but it can use existing references to guide the knowledge base structure.

What's the best way to document large codebases for AI agents?

Generating a hierarchical AGENTS.md knowledge base is an effective way to document large codebases, using filesystem discovery and complexity scoring to map domain boundaries and create navigable structure.