← 返回 Skills 市场
640
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install black-box
功能描述
Indestructible audit logs for agent actions, stored in TiDB Zero.
使用说明 (SKILL.md)
Black Box (Powered by TiDB Zero)
Overview
Black Box is an indestructible audit log for AI Agents. It acts as a "Flight Data Recorder" that streams critical actions, errors, and reasoning chains to a persistent cloud database (TiDB Zero) in real-time.
Security & Provisioning
- Bring Your Own Database (Recommended): Set
TIDB_*environment variables. - Auto-Provisioning (Fallback): If no credentials are found, this skill uses the TiDB Zero API to create a temporary database for logging. The connection string is cached in
~/.openclaw_black_box_dsn.
Why use this?
- Crash Survival: Local logs vanish when containers crash. Cloud logs persist.
- Audit Trail: Prove exactly what your agent did and why (compliance).
- Debugging: Retrieve the last 100 actions leading up to a failure.
Prerequisites
- TiDB Credentials: Standard MySQL connection parameters (
TIDB_HOST,TIDB_USER, etc.). - Network: Outbound access to TiDB Cloud (port 4000).
Usage
1. Log an Event
Record a critical action or error:
python {baseDir}/run.py --action log --level ERROR --message "System crash imminent: Memory leak detected"
2. Read Logs
Retrieve the last N logs (default: 10):
python {baseDir}/run.py --action read --limit 20
Schema
This skill creates a table agent_logs with columns: timestamp, level, message, metadata (JSON).
安全使用建议
This skill is coherent with remote audit logging, but you should not install it without consideration: it will transmit agent actions to an external TiDB service and persist a DSN file (~/.openclaw_black_box_dsn) that may contain credentials. Verify you trust the TiDB provider (zero.tidbapi.com), prefer supplying your own DB credentials instead of relying on auto-provisioning, and audit run.py to confirm what exactly is logged (avoid logging raw commands or secrets). If you proceed, restrict network access and rotate any credentials used for the logger; consider running it in an environment where agent logs won't leak sensitive data.
功能分析
Type: OpenClaw Skill
Name: black-box
Version: 1.0.0
The skill is classified as suspicious due to a critical security vulnerability in `run.py`. Despite a comment stating 'Security Fix: Use standard SSL', the `pymysql.connect` calls do not explicitly enable or enforce SSL/TLS, meaning database credentials and sensitive log data could be transmitted in plaintext or without proper encryption, making it vulnerable to eavesdropping. Additionally, the database connection string (DSN), which may contain credentials, is cached in a plain text file `~/.openclaw_black_box_dsn`, posing a risk if the local system is compromised. While the skill's stated purpose is legitimate logging and it uses safe practices like parameterized queries, the lack of secure transport for database connections is a significant flaw.
能力评估
Purpose & Capability
The declared requirements (TiDB env vars, python3, curl) and included code align with a remote audit-logging purpose. Small mismatches exist: SKILL.md mentions a table named `agent_logs` while the code and DESIGN.md use `flight_recorder`/`flight_recorder` schema. Otherwise the required pieces are proportionate to the stated goal.
Instruction Scope
The SKILL.md and PROTOCOL instruct the agent to log 'before executing High-Risk commands' which means potentially sensitive commands/intents may be transmitted to a remote DB. The runtime code writes/reads a DSN from ~/.openclaw_black_box_dsn and will auto-provision an instance by POSTing to https://zero.tidbapi.com — both behaviors are within the stated purpose but increase exposure of agent activity and credentials. Also the SKILL.md/schema name mismatch is an incoherence to note.
Install Mechanism
No install spec; code is instruction-only with a bundled run.py and a simple external dependency (pymysql) listed. The script uses curl to contact a third-party API (tidbapi.com) but does not download or execute arbitrary archives. Risk is limited to runtime network interactions rather than arbitrary install-time code fetches.
Credentials
Requested env vars are TiDB connection parameters, which are appropriate for a remote-DB logger. However, the skill caches a connection string to ~/.openclaw_black_box_dsn in plaintext (including credentials from auto-provisioning), which is a persistence-of-secrets risk. Also logs may contain sensitive agent context or secrets if the agent logs full command text.
Persistence & Privilege
The skill does not request always:true and does not modify other skills. It persists a DSN file in the user's home and can auto-provision an external DB — these enable long-lived access to logged data and credentials, which increases blast radius if the external service or DSN file is compromised.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install black-box - 安装完成后,直接呼叫该 Skill 的名称或使用
/black-box触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
v1.0.0: Official release
v0.0.1
Initial release via Agent Cloud Memory automation
元数据
常见问题
black-box 是什么?
Indestructible audit logs for agent actions, stored in TiDB Zero. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 640 次。
如何安装 black-box?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install black-box」即可一键安装,无需额外配置。
black-box 是免费的吗?
是的,black-box 完全免费(开源免费),可自由下载、安装和使用。
black-box 支持哪些平台?
black-box 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 black-box?
由 Lux(@lilyjazz)开发并维护,当前版本 v1.0.0。
推荐 Skills