← Back to Skills Marketplace
omeletee

code-doc-guid

by Omeletee · GitHub ↗ · v1.0.2
cross-platform ✓ Security Clean
295
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install code-doc-guid
Description
Codebase navigation and documentation assistant. Helps AI locate code definitions, understand dependencies, and maintain documentation consistency. BLOCKING...
README (SKILL.md)

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:
    1. Read the JSON summary first.
    2. 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:

  1. Don't read whole files to find one function. Use search -> Read(limit=20, offset=N).
  2. Don't guess dependencies. Use inspect to see the exact relationship graph.
  3. 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.
Usage Guidance
This skill appears to be a local code-indexer and its requirements align with that purpose. Before allowing it to run: 1) Review the full scripts/codebase_manager.py for any subprocess/network calls (the visible portion imports subprocess but the file was truncated in the supplied content). 2) Expect the skill to create/modify .trae/ and a local SQLite DB (codebase.db) in your project — back up any important files if concerned. 3) If you run it, prefer doing so in a sandbox or a copy of the repository first. 4) If you do not want a tool writing runtime artifacts to the repo, decline or run it with a separate working directory. If you want higher assurance, provide the remaining portion of scripts/codebase_manager.py so it can be fully audited (particularly to confirm no network exfiltration or arbitrary shell execution).
Capability Analysis
Type: OpenClaw Skill Name: code-doc-guid Version: 1.0.2 The code-doc-guid skill is a legitimate codebase navigation and dependency analysis tool. It uses a local SQLite database (codebase.db) to index symbols and file relationships, employing Tarjan's algorithm for circular dependency detection and FTS5 for efficient searching. The Python script (codebase_manager.py) uses standard libraries and hardcoded git commands via subprocess to track changes, with no evidence of data exfiltration, network activity, or malicious intent. The instructions in SKILL.md are designed to enforce a 'recon-before-action' workflow for the AI agent, which serves as a safety measure to prevent unintended side effects during code modifications.
Capability Assessment
Purpose & Capability
Name/description match the observed behavior: an on-disk SQLite-based code index, search, inspect, graph, and update commands. No unrelated environment variables, binaries, or external services are requested.
Instruction Scope
SKILL.md prescribes that the agent MUST run this skill before any code modification and after modifications. This is consistent with a code-indexing workflow, but it is prescriptive and enforces a blocking step that can affect agent flows. The instructions operate on project files and expect reading many files and generating .trae artifacts—this behaviour is within the stated purpose.
Install Mechanism
Instruction-only skill (no install spec). A Python script is bundled; no external downloads or package installs are requested.
Credentials
No environment variables, credentials, or unrelated config paths are requested. The script will create/modify local files (.trae/, codebase.db) and expects filesystem write access — that's proportionate to a local indexer.
Persistence & Privilege
Skill is not always-enabled and does not request elevated platform privileges. It writes to project-local paths (e.g., .trae/) and manages its own DB; that is normal for this type of tool. The skill can be invoked autonomously (platform default) but that is not unusual by itself.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install code-doc-guid
  3. After installation, invoke the skill by name or use /code-doc-guid
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- Improved output format for search and inspect commands (now returns JSON/JSONL for easier parsing). - Inspect command now provides a risk score (HIGH/MEDIUM/LOW) and links to a Markdown report with dependency graphs. - Updated workflow: clarified actionable steps, especially for high-risk changes (including when to stop, review, or ask for confirmation). - Enhanced documentation for output expectations and user guidance on dependency impact and visualization. - Minor rephrasing for clarity in action guidelines.
v1.0.1
更新了说明。Updated instructions。
v1.0.0
- Initial release of code-doc-guid: a codebase navigation and documentation assistant. - Introduces a mandatory workflow to inspect dependencies before any file modify/move/delete and to update the index after changes. - Provides commands for searching symbols, inspecting dependency graphs, refreshing the index, and exporting visual architecture. - Enforces strict usage protocol to ensure codebase consistency and safe modifications. - Designed to improve project navigation, dependency analysis, and documentation maintenance.
Metadata
Slug code-doc-guid
Version 1.0.2
License
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is code-doc-guid?

Codebase navigation and documentation assistant. Helps AI locate code definitions, understand dependencies, and maintain documentation consistency. BLOCKING... It is an AI Agent Skill for Claude Code / OpenClaw, with 295 downloads so far.

How do I install code-doc-guid?

Run "/install code-doc-guid" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is code-doc-guid free?

Yes, code-doc-guid is completely free (open-source). You can download, install and use it at no cost.

Which platforms does code-doc-guid support?

code-doc-guid is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created code-doc-guid?

It is built and maintained by Omeletee (@omeletee); the current version is v1.0.2.

💬 Comments