← Back to Skills Marketplace
dr-xiaoming

BlueHex Data Monitoring

by Dr-xiaoming · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
50
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install bluehex-data-monitoring
Description
BlueHex AI PM 项目
README (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 在下游做项目标签、向量与蒸馏
Usage Guidance
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.
Capability Tags
cryptorequires-walletrequires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install bluehex-data-monitoring
  3. After installation, invoke the skill by name or use /bluehex-data-monitoring
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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。
Metadata
Slug bluehex-data-monitoring
Version 0.1.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is BlueHex Data Monitoring?

BlueHex AI PM 项目. It is an AI Agent Skill for Claude Code / OpenClaw, with 50 downloads so far.

How do I install BlueHex Data Monitoring?

Run "/install bluehex-data-monitoring" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is BlueHex Data Monitoring free?

Yes, BlueHex Data Monitoring is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does BlueHex Data Monitoring support?

BlueHex Data Monitoring is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created BlueHex Data Monitoring?

It is built and maintained by Dr-xiaoming (@dr-xiaoming); the current version is v0.1.1.

💬 Comments