🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

OpenClaw Codebase Intelligence

by @michealxie001

Intelligent codebase analysis and understanding with caching. Automatically explores project structure, identifies modules, analyzes dependencies, and answer...

Versionv1.1.0
💡 Examples

场景 1:接手新项目

# 1. 获取整体概览
python3 main.py analyze /path/to/project --stats

2. 了解主要模块

python3 main.py analyze --search "module"

3. 查找核心类

python3 main.py analyze --symbol "App" --symbol-type class

4. 了解工作流程

python3 main.py ask "How does data flow through the system?"

5. 生成架构图

python3 main.py diagram --format mermaid-component

场景 2:重构前分析

# 1. 检查谁依赖要重构的模块
python3 main.py deps src/old-module.py --reverse --depth 3

2. 了解影响范围

python3 main.py ask "What would break if I refactor the auth module?"

3. 查看修改建议

python3 main.py ask "How to migrate from class X to class Y?"

场景 3:代码审查

# 查看变更影响
python3 main.py ask "What depends on src/utils/helpers.py?"


⚙️ Configuration

忽略文件

.codebase-intelligence.json 中配置:

{
  "ignore": [
    "node_modules",
    ".git",
    "*.test.js",
    "vendor/"
  ],
  "entryPoints": [
    "src/main.py",
    "src/index.js"
  ]
}

缓存位置

默认缓存位置:/.codebase-intelligence/codebase_index.pkl

也可以指定:

python3 main.py analyze . --cache-dir /path/to/cache


View on ClawHub
TERMINAL
clawhub install oc-codebase-intelligence

🧪 Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

🔍 Can't find the right skill?

Search 60,000+ AI agent skills — free, no login needed.

Search Skills →