← 返回 Skills 市场
dr-xiaoming

BlueHex Data Monitoring

作者 Dr-xiaoming · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
50
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install bluehex-data-monitoring
功能描述
BlueHex AI PM 项目
使用说明 (SKILL.md)

BlueHex Data Monitoring · 会话持续录制

把每个 OpenClaw 龙虾与用户(包括飞书直聊和群聊)的全量对话与交换媒体,每 2 小时一批:脱敏 → 写本地 markdown → 滚动 daily PR 推送到 BlueFocusContentUniverse/bluehex-data-monitoring

这是 ai-pm 体系的数据底座:监控保持纯原始捕获,项目识别、retroactive 标签、vector RAG、SOP 自改进全部由 ai-pm skill 在下游消费时完成。

用途与边界

做什么

  • 每 2h 扫描本机 OpenClaw transcript(~/.openclaw/agents/main/sessions/),把窗口期内的对话提取出来。
  • process-catl.py --monitor 脱敏:凭证字面值就地\x3Ccredential>,PII 掩码,high/medium/toxic 只 flag 不丢 turn。
  • \x3Cslug-name>_\x3Copen_id>/YYYY-MM-DD/HHMM-\x3Chost>.md 写入。
  • 滚动 daily PR:每 host 每天一个分支 monitoring/\x3Chost>/YYYY-MM-DD,2h flush 累加 commits,一天一个 PR(fork + cross-repo)。

不做什么 / 别人做

  • ❌ 项目标签(project:) → 下游 ai-pm 蒸馏时做。原因:2h 时间片切割导致上下文丢失,session-level 也不够可靠。
  • ❌ vector 索引 / RAG → ai-pm 监听 git repo 起 indexer。
  • ❌ 每 turn 实时拦截 → OpenClaw 无 per-turn hook(仅 agent:bootstrap / command / 会话生命周期 + 注册式 JS 插件),不走这条路。
  • ❌ 群聊里 bot 自己跨用户合并 → 群聊 sender 仅 prompt 文本前缀 ou_\x3C32hex>:,每条独立归属。

触发词

「录制对话」「monitoring 数据」「bluehex data 底座」「持续录制」「推到 monitoring 仓库」「2h 数据沉淀」

装机入口

# 1. 安装 skill(一次性)
clawhub install bluehex-data-monitoring   # 或本仓直接 cp 到 ~/.openclaw/workspace/skills/

# 2. 首次安装(交互式:拼音/host 名 + GitHub user + 飞书 open_id + 注册 2h cron)
bash ~/.openclaw/workspace/skills/bluehex-data-monitoring/scripts/install-cron.sh

# 3. 手动测试一次(dry-run,不真发 PR)
bash ~/.openclaw/workspace/skills/bluehex-data-monitoring/scripts/record.sh --dry-run

架构

~/.openclaw/agents/main/sessions/
  ├─ \x3Csid>.jsonl              ← direct: type=message 行直接读
  └─ \x3Csid>.trajectory.jsonl   ← group: prompt.submitted 文本里解析 ou_\x3C32hex>: 前缀
            │
            ▼
   ┌──────────────────┐
   │ extract-turns.py │ direct + group 两条路径 → 统一 turns JSON
   └──────────────────┘
            │
            ▼  按 open_id 分组
   ┌──────────────────┐  ┌────────────────────┐
   │  resolve-name.sh │←→│ lark-cli contact   │(缓存到 ~/.openclaw/cache/)
   └──────────────────┘  └────────────────────┘
            │  open_id → display name
            ▼
   ┌─────────────────────────────────┐
   │ process-catl.py --monitor       │  全量录制:凭证就地改、PII 掩码、敏感打 flag
   └─────────────────────────────────┘
            │  sanitized text + report
            ▼
   \x3Cslug-name>_\x3Copen_id>/YYYY-MM-DD/HHMM-\x3Chost>.md   ← 写文件(frontmatter)
            │
            ▼
   preflight.sh --sync-only → fetch upstream + push fork main
            │
            ▼
   commit on monitoring/\x3Chost>/YYYY-MM-DD branch → push fork → ensure PR open
            │
            ▼
   watermark 推进(仅在 PR push 成功后)

数据布局

仓库 BlueFocusContentUniverse/bluehex-data-monitoring

qizhang_ou_2165be6a.../
  ├─ 2026-06-01/
  │   ├─ 0015-\x3Chost>.md          ← 一个 2h flush
  │   ├─ 0215-\x3Chost>.md
  │   ├─ media/
  │   │   └─ om_\x3Cid>.png         ← 交换媒体(outbound + 有落盘的 inbound)
  │   └─ ...
  └─ 2026-06-02/
shejinming_ou_8d3f.../
  └─ ...
group_oc_8da3.../                ← 群聊(无法逐用户解析时的兜底)
  └─ ...

每个 .md 的 frontmatter:

---
user_name: Qi Zhang
user_open_id: ou_2165be6a...
window: ["2026-06-01T00:15+08:00", "2026-06-01T02:15+08:00"]
host: \x3Chost-id>
chat_type: feishu:direct         # 或 feishu:group:oc_\x3Cchatid>
session_ids: [f5b13ff7-..., ...]
message_ids: [om_x100b50dd7..., ...]
sensitivity: medium              # process-catl.py 给的标签
flagged: true                    # high_hits 或 is_toxic 命中
credentials_redacted: 0
pii_masked: 3
high_hits: ["中创新航"]
---

## conversation

[user 09:51:02] [REDACTED → sanitized content]
[assistant 09:51:12] ...
...

每 2h 流程(record.sh)

每次 cron 触发:

  1. 读 watermark:~/.openclaw/state/bluehex-monitor/watermark.txt(首次 = 2h 前)。
  2. ~/.openclaw/agents/main/sessions/\x3Cuuid>.jsonl白名单:跳过 *.trajectory**.locksessions.json.usage-cost-cache.json*.deleted.**.reset.**.bak-**.clobbered.*
  3. 每个 candidate session:调 extract-turns.py --jsonl \x3Cp> --trajectory \x3Cp> --since \x3Cws> --until \x3Cnow> → JSON 数组 of turns。
  4. 把所有 turns 按 open_id 分桶(direct → sessionKey;group → 行内 ou_xxx: 前缀)。
  5. 每桶:调 resolve-name.sh \x3Copen_id> 拿 slug-name → 组装 markdown 文本 → process-catl.py --monitor 脱敏 → 写文件。
  6. preflight.sh --sync-only 同步 fork 上 main。
  7. git checkout -B monitoring/\x3Chost>/$(date +%F)(首次 flush)/ git checkout monitoring/\x3Chost>/$(date +%F)(同一天后续);git add … && git commit -m "record(\x3Chost>): \x3Cts> — N users, M turns"
  8. git push -u origin monitoring/\x3Chost>/\x3Cdate>;如果当天还没 PR:gh pr create --repo BlueFocusContentUniverse/bluehex-data-monitoring --base main --head \x3Cgh-user>:monitoring/\x3Chost>/\x3Cdate> ...;浏览器兜底。
  9. 仅在以上全部成功后才推进 watermark。失败 → watermark 不动 → 下一次自动重做该窗口。

凭证 / 鉴权

  • GitHub fork 推送:每台 host 用自己的 GitHub 身份(fork + cross-repo PR),不共享凭证。SSH key 已 ssh -T [email protected] 验证。
  • PR 创建gh auth login / glab / GH_TOKEN,三者皆无则浏览器兜底。
  • lark-cli:必须 contact:user.base:readonly scope(用于 open_id → display name)。
  • BlueAI relayprocess-catl.py --monitor 跑分类用,配置同 catl-harness-pr~/.openclaw/openclaw.json 里的 models.providers.openai-compat.apiKey)。
  • 任何 token 出问题:联系金明(@Dr-xiaoming),不要自己改、不要在 commit/PR/聊天里贴。

故障排查

  • record.sh 没生成 PR → 查 watermark 是否动了;查 ~/.openclaw/state/bluehex-monitor/record.log
  • "open_id 解析为空 name" → lark-cli 没拿到 contact:user.base:readonly scope,或没 lark-cli auth login --as user。folder 会兜底为 open_id-only。
  • "群聊 sender 全是 unknown" → 新版 OpenClaw 改了 prompt 格式(不再 ou_\x3C32hex>: 前缀),看 references/transcript-schema.md 是否需要扩展 extract-turns.pyinbound_meta 分支。
  • "PR 没自动开" → 没装 gh/glab,浏览器兜底链接已经打到 log 里;或当天分支已存在但首条 commit 没建 PR,手动 gh pr create 一次后续会自动复用。
  • "cron 没触发" → openclaw cron listopenclaw cron runs --id \x3Cjobid>

Bundled resources

  • scripts/record.sh — 2h cron 主入口
  • scripts/extract-turns.py — direct + group transcript 解析
  • scripts/process-catl.pybundled from catl-harness-pr v0.6.0+(带 --monitor
  • scripts/resolve-name.shopen_id → display-name(lark-cli + 缓存)
  • scripts/preflight.sh — 环境检查 + fork 同步(adapted from catl-harness-pr)
  • scripts/setup-fork.sh — fork 创建 / remote 布局(adapted)
  • scripts/install-cron.sh — 首次安装向导,注册单条 15 */2 * * * cron
  • references/recorder-pipeline.md — record.sh 流程详解
  • references/transcript-schema.md — OpenClaw transcript 格式备忘(direct 与 group 差异)
  • references/monitor-sanitization.mdprocess-catl.py --monitor 在本 skill 中的行为速查

CHANGELOG

v0.1.0 (2026-06-01)

  • 初始发布 — bluehex AI PM 项目数据底座
  • 直读 transcript(无 hook)+ direct/group 双解析路径
  • --monitor 脱敏(bundled process-catl.py from catl-harness-pr v0.6.0)
  • fork + cross-repo PR,rolling daily PR per host
  • watermark 推进仅在 PR 成功后,避免数据丢失
  • folder = \x3Cslug-name>_\x3Copen_id>(lark-cli 解析 name);ai-pm 在下游做项目标签、向量与蒸馏
安全使用建议
Install only if you intentionally want a scheduled recorder that can collect local OpenClaw conversations/media, associate them with user identifiers, use API credentials, send content to an external LLM service, and publish processed records to GitHub. Before use, confirm the exact repository and relay host, who can access the output, how to disable the cron job, how to delete retained records and identifiers, and whether all affected users have consented.
能力标签
cryptorequires-walletrequires-sensitive-credentials
能力评估
Purpose & Capability
The described capabilities go beyond a simple PM or monitoring helper: they include collecting full local conversations and media, resolving user identities, classifying/sanitizing content, and exporting records to GitHub and an external LLM relay.
Instruction Scope
The workflow appears broad, especially monitor mode that can record all conversations and bypass the CATL relevance gate; the available evidence does not show clear per-run user consent or tight scope controls.
Install Mechanism
The installer reportedly persists configuration under ~/.openclaw/.env and registers recurring cron execution, while setup helpers may mutate local and remote GitHub state; these are lasting host and account changes that need explicit disclosure.
Credentials
The skill uses local environment/config secrets, GitHub identity, Feishu identifiers, and external API credentials in a workflow that handles private conversation data, which is high-impact and only proportionate with strong opt-in and destination controls.
Persistence & Privilege
Recurring cron jobs, watermarks, logs, persistent identifiers, repository commits, pushes, and PR creation create ongoing background behavior and durable records of sensitive communications.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bluehex-data-monitoring
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bluehex-data-monitoring 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
v0.1.1: 缩短 description 为「BlueHex AI PM 项目」(注:自然语言触发能力随之关闭,技能仅适合手动/cron 调用)。
v0.1.0
初始发布 v0.1.0 — bluehex AI PM 数据底座。每 2h 直读 OpenClaw transcript(direct .jsonl + group .trajectory.jsonl)→ process-catl.py --monitor 脱敏 → 按 <name>_<open_id> 滚动 daily PR 到 BlueFocusContentUniverse/bluehex-data-monitoring。监控保持纯原始捕获,标签/向量/蒸馏交给 ai-pm 下游。注意:design-stage,未在真实 host 实跑,第一次 dry-run 预期会触发 0.1.1 patch。
元数据
Slug bluehex-data-monitoring
版本 0.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

BlueHex Data Monitoring 是什么?

BlueHex AI PM 项目. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 50 次。

如何安装 BlueHex Data Monitoring?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bluehex-data-monitoring」即可一键安装,无需额外配置。

BlueHex Data Monitoring 是免费的吗?

是的,BlueHex Data Monitoring 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

BlueHex Data Monitoring 支持哪些平台?

BlueHex Data Monitoring 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 BlueHex Data Monitoring?

由 Dr-xiaoming(@dr-xiaoming)开发并维护,当前版本 v0.1.1。

💬 留言讨论