wiki
它能做什么
这项技能教智能体如何为由众多仓库和服务组成的大型软件项目绘制地图。它会建立一个解释各部分关系的知识库,使人和 AI 都能理解整个系统。
适用场景
- ✓当团队拥有十个或更多仓库,且已经没有人完全理解整个系统的时候。
- ✓当用户需要把跨多个服务的业务规则追溯回代码的时候。
- ✓当用户希望在保留文件名的前提下,更新现有的团队知识库的时候。
技能链接
https://github.com/Tencent/teamai-cli/blob/main/skill-data/wiki/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们团队有十五个微服务,分布在多个仓库中。能帮我梳理它们之间如何协作,并把每个结论与代码对应起来吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会借助脚本阅读代码,建立组件之间关系的图。它会撰写文档,其中每个结论都引用代码行,每条关系都带有置信度标签。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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 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":
default Standard: single-session core path
--deep Full K1~K4 + G1~G9
--update Incremental update of an existing knowledge/
continue Resume from the _review/progress.json checkpoint
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.
IF the user input contains "--update" or "incremental update":
→ Update mode
ELSE IF the user input contains "continue" or "resume":
→ Continue mode
ELSE:
→ Check whether _review/progress.json exists under the user-specified directory
IF it exists → report the state, wait for "resume last run" or "start over"
ELSE → Phase 0
Continue mode
Step 1: Locate progress.json
Step 2: Read and parse it, show a resume summary
Step 3: Jump according to current_phase:
"phase0_done" → Phase K1
"phasek1_waiting_confirm" → Show k1-architecture-map.md, wait for confirmation ①
"phasek1_confirmed" → Phase K2
"phasek2_batch_N" → Continue Phase K2 from batch N (skip completed ones)
"phasek2_waiting_confirm" → Wait for confirmation ②
"phasek2_confirmed" → Phase K3
"phasek3_done" → Phase K4
"phasek4_done"/"completed" → Report completion, ask whether to --update or rerun a component
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.
Step 1: Read progress.json, get file_hash_cache
Step 2: Scan project_root, compute the current SHA256 of every file
Step 3: Compare hashes, classify: added / modified / deleted
Step 4: Show the change summary, wait for user confirmation:
┌────────────────────────────────────┐
│ Change summary │
│ Added: N files │
│ Modified: N files (incl. Aurora.py)│
│ Deleted: N files │
│ Affected components: [list] │
│ Affected graph documents: G1/G2/G6/G7 │
└────────────────────────────────────┘
Step 5: Rerun only the affected scope:
- Phase K2: regenerate t
常见问题
这项技能适合多大的项目?
这项技能说明它适用于拥有十个或更多仓库、并且经历多年演变的项目。
它需要额外的软件吗?
这项技能说明它需要 Python 3 和 teamai CLI,不需要额外的插件。
文档使用什么语言撰写?
这项技能说明它与之前的版本一样,使用简体中文撰写。
详情
作者的原始描述
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, archite
repo: Tencent/teamai-cli
热度
- GitHub 星标
- 5.7k
- 排名
- #14744
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
core
5.7k帮你的智能体通过拉取和推送,同步团队共享的 AI 技能和规则,检查其状态,运行健康检查,并调用其他 TeamAI 工作流。
setup
5.7k帮你的智能体为团队设置 TeamAI,可以作为管理员创建新的团队仓库,也可以加入已有的仓库,并管理成员、角色和移除。
share
5.7k帮你的智能体把编程会话中学到的内容整理成简短的团队学习笔记,并通过 teamai contribute 命令发布到团队知识库。
workflow-local
5.7k帮你的智能体在这台机器上无人值守地运行团队工作流,适用于 CI 任务或云端智能体,且所有答案都在运行开始前确定。