/install code-doc-guid
Code Documentation & Navigation Guide
This skill provides a Codebase Knowledge Graph to help you navigate complex projects without reading thousands of files. It uses a local SQLite database to store file relationships, dependency layers, and symbol definitions.
⚠️ CRITICAL: BLOCKING REQUIREMENTS (触发条件)
STOP! READ THIS BEFORE PROCEEDING.
You MUST invoke this skill (code-doc-guid) as a BLOCKING STEP before performing any of the following actions. Failure to do so is a violation of protocol.
🔴 Mandatory Pre-Action Check (Recon Phase)
Trigger: You are about to:
- Modify any code file (
Write,SearchReplace). - Rename or move files (
RunCommand: mv/ren). - Delete files (
DeleteFile). - Refactor a class, function, or variable.
Action: You MUST run python ... codebase_manager.py inspect/search FIRST.
Reason: You cannot safely modify code without knowing who depends on it. "Guessing" is strictly prohibited.
🟢 Mandatory Post-Action Sync (Archive Phase)
Trigger: You have just finished a set of file modifications.
Action: You MUST run python ... codebase_manager.py update.
Reason: The knowledge graph must remain consistent with the disk state for the next turn.
Workflow & Commands
All commands are run via python scripts/codebase_manager.py \x3Ccommand> [args].
(Note: If running manually, adjust the path to where you saved the script)
1. search - Find Symbols & Concepts
Use this to locate code by name or intent (docstring).
- Command:
search \x3Cquery> - Example:
search "UserAuth" - Output: JSONL format containing file paths, symbol names, and docstrings.
- Action: Use this to find the exact file path before reading it.
2. inspect - Analyze Dependencies & Risk
Use this to understand the impact of a change.
- Command:
inspect \x3Cfilename_fragment> - Example:
inspect "auth_service" - Output (JSON):
risk_score: HIGH / MEDIUM / LOW.doc_file: Path to the detailed report (e.g.,.trae/codeguiddoc.md).
- Action Guidelines:
- Read the JSON summary first.
- IF RISK IS HIGH:
- STOP. Do not modify code yet.
- READ the generated markdown file (
doc_file). It contains a Mermaid Graph and full dependency list. - SHOW the Mermaid graph to the user (if possible) or summarize the impact: "This change affects 25 files, including core modules A and B."
- ASK for confirmation.
3. update - Refresh Index
Use this after ANY file modification.
- Command:
update - Output: "Processing X changed files..."
- Note: It is incremental and very fast (\x3C1s usually). Always run this before finishing your turn.
4. graph - Export Visuals (Optional)
Use this only when the user explicitly asks for an architecture overview.
- Command:
graph - Output: Generates
.trae/architecture_layers.md(Human readable) and.trae/dependency_graph.json(Machine readable).
Token Economy Strategy
To save tokens and time:
- Don't read whole files to find one function. Use
search->Read(limit=20, offset=N). - Don't guess dependencies. Use
inspectto see the exact relationship graph. - Trust the Layering. If you are modifying a Layer 0 file, be extremely careful—it breaks everything. If modifying Layer 5, it's likely safe.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install code-doc-guid - 安装完成后,直接呼叫该 Skill 的名称或使用
/code-doc-guid触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
code-doc-guid 是什么?
Codebase navigation and documentation assistant. Helps AI locate code definitions, understand dependencies, and maintain documentation consistency. BLOCKING... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 295 次。
如何安装 code-doc-guid?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install code-doc-guid」即可一键安装,无需额外配置。
code-doc-guid 是免费的吗?
是的,code-doc-guid 完全免费(开源免费),可自由下载、安装和使用。
code-doc-guid 支持哪些平台?
code-doc-guid 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 code-doc-guid?
由 Omeletee(@omeletee)开发并维护,当前版本 v1.0.2。