code-rag

Build a structured code wiki from repository source and design docs.

5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tiancaiamao/ai --skill code-rag-tiancaiamao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-rag
Source: https://github.com/tiancaiamao/ai/tree/main/skills/code-rag
Command: npx skills add https://github.com/tiancaiamao/ai --skill code-rag-tiancaiamao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you understand a large codebase systematically instead of re-reading source files from scratch every time. It turns repository knowledge into a reusable expert wiki that can answer architecture, design, and implementation questions quickly.

Core Features & Use Cases

  • Repository-to-Wiki Compilation: Organizes source code, design docs, and official docs into structured subsystem and feature pages.
  • Frozen Snapshot Expert Agent: Loads the compiled knowledge into a persistent agent so you can ask follow-up questions with low latency.
  • Source Search Fallback: Uses semantic code search when the wiki does not cover a detail, making it useful for deep repository exploration.
  • Use Case: Ideal for onboarding into a large unfamiliar repo, documenting architecture, or creating a reusable code-expert assistant for a project team.

Quick Start

Use this skill to analyze a large repository and build a structured code wiki that can be loaded into an expert agent for instant questions.

Frequently Asked Questions about code-rag

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

FAQPage Schema
How do I understand a large codebase and map its architecture without reading source files manually?

To understand a large codebase, you can build a structured knowledge base that compiles source code and design docs into subsystem and feature pages. This creates a reusable expert wiki for architecture mapping without manual source reading.

How do I create a reusable expert agent for repository onboarding and codebase analysis?

You can create an expert agent by loading a frozen snapshot of compiled repository knowledge into a persistent assistant. This enables new team members to ask follow-up onboarding and codebase analysis questions with low latency.

Can I use semantic search to explore undocumented implementation details in a repository?

Yes, you can use semantic source search as a fallback. It queries the repository directly to find implementation details when the compiled code wiki lacks coverage of specific undocumented gaps.

What is the best way to document subsystem architecture and features for a large software repository?

The best way to document subsystem architecture is compiling source code, design docs, and official docs into structured subsystem and feature pages. This builds a reusable expert wiki for instant architecture and design questioning.

Does this codebase analysis approach work for exploring gaps not covered in the generated wiki?

Yes, this codebase analysis approach uses semantic code search to explore gaps. When the generated wiki lacks specific implementation details, the source search fallback queries the repository to provide deep exploration results.