tencent/teamai-cli/wiki
Claude Code and agent skill by tencent/teamai-cli
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install tencent/teamai-cli/wikiSKILL.md
The same SKILL.md was published earlier as tencent/teamai-cli/wiki.
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. Runteamai skill path wikito get their absolute path;{SKILL_DIR}in this document refers to that path; a reference file you open on its own writes that directory asSKILL_DIRin 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.pyaccepts both the current English and the earlier Chinese headings.The Phase 0 structural baseline usesteamai 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":
Agent architecture
| Agent | File | When started | |
|---|---|---|---|
| Knowledge base document generator Agent | {SKILL_DIR}/references/agents/kb-doc-generator.md | Phase K2, every component batch | |
| Graph RAG Agent | {SKILL_DIR}/references/agents/graph-rag-agent.md | Phase K3 |
Main agent responsibilities: workflow orchestration, confirmation point management, progress.json maintenance, quality report aggregation.
Entry decision
This decision must run first on every activation.
Continue mode
Update mode (incremental update)
Trigger: the user asks for an "incremental update", or specifies the --update mode in this skill. Precondition: an existing progress.json in the completed state.
progress.json specification
Path: <output_dir>/../_review/progress.json
accuracy_statsaccumulates after every Phase K2 batch and is the global trust indicator of the knowledge base.
Core principles (accuracy first)
- Code is the single source of truth: every conclusion must cite a code file:line as evidence; anything unverifiable is marked
[UNVERIFIED] - Three-state confidence is mandatory: every relation in the graph is labelled
EXTRACTED(1.0)/INFERRED(0.6~0.9)/AMBIGUOUS(0.1~0.3); no invention out of thin air, no 0.5 default - Two-level accuracy verification: Phase K2 self-checks every document right after generation; Phase K4 verifies the whole knowledge base
- Two human-in-the-loop confirmations: architecture understanding (K①) and component document quality (K②) must be confirmed by a human to stop systematic errors from spreading
- Parallel generation + resume from checkpoint: Type-4 component documents are dispatched in parallel (all Agent calls in the same message); progress.json is persisted after every batch
- Token economy: the
Glob → Grep → Readthree-step method; full directory scans are forbidden - Honest auditing:
[UNVERIFIED]must not be hidden; quality numbers are shown in full; when unsure, mark AMBIGUOUS instead of deleting - Cognitive boundary declaration: the knowledge base README must state explicitly what is covered and what is not, so AI knows when to say "not sure"
- Cross-document consistency: Phase K3 must cross-check relation descriptions between components; contradictions count as "consistent" only after they are fixed
- End-to-end verifiable: Phase K4 tests the knowledge base's actual answering ability with standardised questions; E2E accuracy target ≥ 80%
Phase workflow (loaded on demand)
The full steps of each phase live in separate files. Load a file when its phase comes up; do not read them all at once:
| Phase | File | Content | |
|---|---|---|---|
| Phase 0 | {SKILL_DIR}/references/phases/phase0-init.md | Initialisation, teamai import --dir structural baseline, repository inventory | |
| Phase K1 | {SKILL_DIR}/references/phases/k1-reverse-engineering.md | Architecture reverse-engineering and source material collection, scan script, architecture analysis report | |
| Phase K2 | {SKILL_DIR}/references/phases/k2-documents.md | Document generation (parallel batches + intermediate quality confirmation) | |
| Phase K3 | {SKILL_DIR}/references/phases/k3-ai-native.md | AI-Native enhancement + Graph RAG graph document set | |
| Phase K4 | {SKILL_DIR}/references/phases/k4-quality.md | Quality assessment, validation script, quality report |
Methodology background (optional, for reference while writing documents): {SKILL_DIR}/references/methodology/; sub-agent prompts: {SKILL_DIR}/references/agents/; knowledge base README template: {SKILL_DIR}/references/templates/project-overview.md.
Human-readable overview (not for execution): {SKILL_DIR}/references/overview.md.
teamai skill get wiki --full prints every reference file in one go (about 130 KB). Use it only when you need to read everything.
Output directory layout
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill-data/wiki/SKILL.md
Popularity
- Repository stars
- 5,097
- Repository forks
- 384
- 7-day trend score
- 48
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tencent/teamai-cli/wiki)