灵感来自 Claude Code 的 LSP 代码智能架构,实现完全原创。 使用标准开源工具:ripgrep、pyright、AST 解析。
操作Claude Code LSPToolOpenClaw Code Intel搜索定义textDocument/definitionripgrep + 正则模式匹配查找引用textDocument/referencesripgrep 全局搜索符号列表documentSymbolAST 解析 (Python)类型检查hover (类型信息)pyright 类型检查调用图callHierarchy静态分析 (import/function graph)
bash
# 安装依赖
pip install pyright # Python 类型检查
bash
# 分析 Python 文件结构
python3 {{SKILL_DIR}}/scripts/analyze.py symbols path/to/file.py
# 搜索定义
python3 {{SKILL_DIR}}/scripts/analyze.py define "ClassName.method" path/to/
# 生成函数调用图
python3 {{SKILL_DIR}}/scripts/analyze.py calls path/to/file.py
# 代码复杂度报告
python3 {{SKILL_DIR}}/scripts/analyze.py complexity path/to/file.py