Ev3lynx727/ghostclaw

GitHub: Ev3lynx727/ghostclaw

一款专注于系统级架构健康度评估的 AI 代码审查助手,帮助团队识别架构异味并生成重构蓝图。

Stars: 2 | Forks: 0

# Ghostclaw Ghostclaw 是一项 OpenClaw 技能,提供专注于系统级流程、内聚性和技术栈最佳实践的**架构代码审查助手**。 ## 前置条件 在安装 Ghostclaw 之前,您必须在系统上安装 [OpenClaw](https://openclaw.ai/) 和 [ClawHub](https://clawhub.ai/)。 ## 快速开始 (安装) ### 方法 1: NPM (推荐) 从 npm registry 全局安装 Ghostclaw: ``` npm install -g ghostclaw ``` ### 方法 2: NPX 无需显式全局安装即可运行: ``` npx ghostclaw /path/to/repo ``` 您也可以通过 OpenClaw skills 添加它: ``` npx skills add Ev3lynx727/ghostclaw ``` ### 方法 3: ClawHub 仅通过 ClawHub 安装 skills,运行: ``` clawhub install skill ghostclaw ``` ### 方法 4: 从源码构建 ``` git clone https://github.com/Ev3lynx727/ghostclaw.git cd ghostclaw pip install . ``` 有关详细的集成指南,请参阅 **[GUIDE.md](docs/GUIDE.md)**。 ## 用法 ### 对代码库运行审查 ``` # 如果通过 NPM 或 Python 全局安装 ghostclaw /path/to/your/repo # 如果从源代码运行 python3 src/ghostclaw/cli/ghostclaw.py /path/to/your/repo ``` ### 后台监控 在 `repos.txt` 文件中设置您的仓库,并将原生 watcher 二进制文件添加到您的 cron 作业中: ``` 0 9 * * * ghostclaw-watcher /path/to/repos.txt ``` ## Ghostclaw 的功能 - **Vibe Score**: 分配一个 0-100 的分数来代表架构健康状况。 - **Architectural Ghosts**: 检测诸如 "AuthGhost" 或 "ControllerGhost" 之类的代码异味。 - **Refactor Blueprints**: 在代码更改前建议高层计划。 - **Sub-agent Mode**: 可以通过 `openclaw sessions_spawn --agentId ghostclaw` 生成。 - **Watcher Mode**: 监控仓库并开启带有改进建议的 PR。 ## 文件 ``` ghostclaw/ ├── package.json — Package metadata for NPM and Skills CLI ├── SKILL.md — OpenClaw skill definition ├── docs/ — Documentation for Ghostclaw ├── scripts/ — Systemd service setup configuration └── src/ghostclaw/ — Main Python package source ├── core/ — Core analysis orchestration ├── ghostclaw_mcp/ — Model Context Protocol (MCP) server ├── lib/ — Utilities (GitHub, Cache, Notify) ├── stacks/ — Stack-specific analysis strategies ├── cli/ — CLI implementation └── references/ — Architectural patterns ``` ## 集成 ### 高级集成 (Phase 2) Ghostclaw 现在支持 several advanced extensions 和可选依赖项。 #### MCP Server Ghostclaw 现在可以作为 Claude、Cursor 和其他 AI 工具的 MCP server 使用。 安装 MCP 支持: ``` pip install ghostclaw[mcp] ``` 运行 MCP server: ``` ghostclaw-mcp ``` **暴露的工具:** - `ghostclaw_analyze`: 完整的 vibe 分析。 - `ghostclaw_get_ghosts`: 仅限架构异味。 - `ghostclaw_refactor_plan`: 自动化蓝图生成。 #### 高级上下文与 AST 索引 通过利用 `ai-codeindex` 引擎,Ghostclaw 可以提取完整的结构化语法树并构建广泛的调用图。 安装: ``` pip install ghostclaw[ai-codeindex] ``` #### 死代码与克隆检测 Ghostclaw 可以将死代码和几乎相同的代码块的语法级检查卸载到 `pyscn`。 安装: ``` pip install ghostclaw[pyscn] ``` #### Plugin 管理 CLI (v0.1.6) Ghostclaw 拥有原生的 plugin 生态系统。您可以通过 CLI 管理内置和外部适配器: ``` # 列出所有 active adapters ghostclaw plugins list # 从本地文件夹安装 external adapter ghostclaw plugins add ./path/to/custom_adapter # Scaffold 新的 developer template ghostclaw plugins scaffold my-new-adapter ``` ### Systemd Service (Phase 3) 对于持久的本地 MCP 服务,您可以使用提供的设置脚本,该脚本会在 Linux 上安装一个 `systemd` 单元: ``` # 从 source repository 目录运行 npm run install-service ``` ## 支持的技术栈 - Node.js / React / TypeScript - Python (Django, FastAPI) - Go (基础) ## 许可证 MIT
标签:AI 助手, ClawHub, MITM代理, NPM 包, OpenClaw, Python, 云安全监控, 人工智能, 代码健康度, 代码嗅探, 代码审查, 代码监控, 代码重构, 威胁情报, 工作流自动化, 开发者工具, 技术债务, 无后门, 最佳实践, 架构分析, 用户模式Hook绕过, 系统设计, 逆向工具, 静态分析