OpenClaw Self Analyzer - 自分析工具
v1.0.0自动分析OpenClaw架构,检测钩子点,生成钩子代码,扫描代码并生成详细分析报告。
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (self-analysis, hook detection/generation, report creation) align with the included Python/JS code: architecture_analyzer, code_scanner, hook_generator, and report_generator implement the advertised features. Hardcoded paths target an installed OpenClaw package and the workspace, which is reasonable for this purpose.
Instruction Scope
SKILL.md directs running the bundled Python scripts from /root/.openclaw/workspace/skills/openclaw-self-analyzer and the scripts read the OpenClaw install tree and workspace files and write reports and generated hooks. This is expected, but the instructions assume specific root paths and file locations; the analyzer will read many files under the OpenClaw package and may log context contents (generated hooks use console.log), so generated output can contain sensitive data from scanned code or runtime contexts.
Install Mechanism
No install spec or network download; all code is bundled with the skill. There is no external package installation or archive extraction, so install risk is low.
Credentials
The skill declares no required environment variables, credentials, or config paths. The code does use hardcoded filesystem paths (e.g., /root/.nvm/.../node_modules/openclaw and /root/.openclaw/workspace) to find and save data, which is consistent with its stated purpose.
Persistence & Privilege
always is false and the skill does not modify other skills or global agent configuration. It writes generated hooks and reports to its workspace area; those files could execute if the user installs them into a running OpenClaw instance, so they should be reviewed before deployment.
Assessment
This package appears coherent with its description: it scans an OpenClaw installation and workspace, generates a JSON/Markdown report and example JS hooks. Before running or deploying generated hooks: (1) run in an isolated environment if possible because the scripts read many files under the OpenClaw install and may log context data, (2) review generated hook code for any logic you don't expect before installing them into a live OpenClaw instance, (3) update the hardcoded paths if your OpenClaw is installed elsewhere, and (4) avoid running it as a privileged account unless necessary. No credentials or network endpoints are requested by the skill itself.Like a lobster shell, security has layers — review code before you run it.
latest
OpenClaw Self Analyzer - 自分析工具
深度分析OpenClaw架构,自动生成钩子和扩展。
功能
- 架构分析
- 钩子点检测
- 自动生成钩子
- 代码扫描
- 报告生成
使用
完整分析
cd /root/.openclaw/workspace/skills/openclaw-self-analyzer
python3 core/architecture_analyzer.py
生成钩子
from generators.hook_generator import HookGenerator
generator = HookGenerator()
hook = generator.generate_hook_package(
hook_name='my_hook',
hook_type='pre',
stage='context_gather',
logic='// your logic'
)
生成报告
from reporters.report_generator import ReportGenerator
generator = ReportGenerator()
files = generator.save_reports(Path('./reports'))
架构映射
OpenClaw处理流水线:
- input_receive - 接收用户输入
- context_gather - 收集历史上下文
- memory_retrieve - 检索记忆
- prompt_assemble - 组装prompt
- token_check - token检查
- context_compress - 上下文压缩
- llm_submit - 提交给LLM
- response_process - 处理响应
- memory_store - 存储新记忆
每个阶段支持三种钩子:
- pre - 前置处理
- post - 后置处理
- replace - 完全替换
Copyright © 2025-2026 Edison Wang (fofo365/edisonw@163.com) Authors. All Rights Reserved.
Comments
Loading comments...
