# Wiki

Make AI truly understand large codebases: for multi-repository, multi-microservice...

- Repository: https://github.com/Tencent/teamai-cli (5729 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Tencent/teamai-cli --skill wiki -g -a claude-code -y`
Codex: `npx skills add Tencent/teamai-cli --skill wiki -g -a codex -y`
Cursor: `npx skills add Tencent/teamai-cli --skill wiki -g -a cursor -y`
Gemini CLI: `npx skills add Tencent/teamai-cli --skill wiki -g -a gemini-cli -y`

## Description

Make AI truly understand large codebases: for multi-repository, multi-microservice projects that have evolved over years, run architecture reverse-engineering + a Graph RAG graph + multi-language AST to compress a huge codebase into a structured knowledge base, where every conclusion traces back to a code line and every relation carries a confidence label. Suited to projects with 10+ repositories or microservices that AI cannot understand globally by reading the code directly. Triggers: architecture analysis, architecture reverse-engineering, codebase knowledge base, code-to-knowledge, architecture wiki, large multi-repo codebase. Loaded on demand by the teamai discovery stub.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# wiki: AI cognition engineering for large codebases

> Prerequisites: an accessible source directory (multiple repositories supported), Python 3, and an installed teamai CLI.
> The methodology, sub-agent prompts, templates and scripts ship with the CLI. Run `teamai skill path wiki` to get their absolute path;
> `{SKILL_DIR}` in this document refers to that path; a reference file you open on its own writes that directory as `SKILL_DIR` in braces.
> Write the knowledge-base documents in Simplified Chinese, as earlier releases did. When updating an existing knowledge base, keep its file names and headings; `validate_kb.py` accepts both the current English and the earlier Chinese headings.
> The Phase 0 structural baseline uses `teamai import --dir`. TeamAI does not ship a separate team-wiki CLI. No extra plugin is required.

**The problem**: large projects (10+ repositories, dozens of microservices, years of iteration) defeat global understanding by AI. The context window cannot hold all the code, component relations are scattered everywhere, and business rules hide deep in call chains. Letting AI read the code directly is both slow (huge token counts) and inaccurate (no global view).

**The solution**: use architecture reverse-engineering to systematically compress a huge codebase into a **structured, verifiable, AI-Native** deep knowledge base. Every conclusion traces back to a code line, every relation carries a confidence label, and every update is incrementally verified. AI reads the knowledge base instead of the source, and gains global architecture awareness for about **1/50 of the tokens**.

For recalled source freshness, `current` means only that the cited file matches the scan baseline; check current source when available before relying on claims marked `stale`, `missing` or `unknown`.

## Usage

The user states the mode in natural language, or simply says "build a codebase knowledge base":

The rest: https://github.com/Tencent/teamai-cli/blob/HEAD/skill-data/wiki/SKILL.md
