返回 Skill 列表
extension
分类: 开发与工程无需 API Key

blackbox

用于恢复以前的文件版本、查询文件修改历史、从意外编辑中恢复,或了解黑匣子飞行记录器如何工作以进行文件快照和灾难恢复

person作者: jakexiaohubgithub

Blackbox Flight Recorder

Zero-dependency telemetry plugin that captures file snapshots before modifications.

What It Captures

  • PreToolUse (Write/Edit/MultiEdit) - Snapshots file before modification
  • UserPromptSubmit - Logs user prompts
  • SessionStart - Logs session boundaries

Scripts

Query Events

python3 scripts/query.py --last 10           # Last 10 events
python3 scripts/query.py --event-type PreToolUse  # Filter by type
python3 scripts/query.py --file myfile.py    # Filter by file
python3 scripts/query.py --stats             # Storage statistics

Restore Files

python3 scripts/restore.py --list            # List recent snapshots
python3 scripts/restore.py --search myfile   # Find snapshots by pattern
python3 scripts/restore.py --hash <sha1> > restored.py  # Restore by hash

Scripts location: skills/blackbox/scripts/

Limitations

  • Files >2MB skipped
  • Binary files skipped
  • No automatic rotation

References