chatlab-analyze-cn
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChatLab 聊天分析
ChatLab Chat Analysis
通过只读 CLI 查询和分析已经导入 ChatLab 的聊天记录。
clbQuery and analyze chat records imported into ChatLab via the read-only CLI.
clb适用场景
Applicable Scenarios
- 查找某段对话,或确认谁最先提到某件事。
- 总结近期话题,或分析与某个人的聊天关系。
- 比较成员活跃度、关键词或回复规律。
如果要导入新的聊天导出文件,请使用 。
chatlab-import-cn安装命令:
bash
npx skills add ChatLab/ChatLab --skill chatlab-analyze-cn -g- Locate a specific conversation, or confirm who first mentioned something.
- Summarize recent topics, or analyze chat relationships with a certain person.
- Compare member activity, keywords, or reply patterns.
To import new chat export files, please use .
chatlab-import-cnInstallation command:
bash
npx skills add ChatLab/ChatLab --skill chatlab-analyze-cn -g工作流程
Workflow
1. 准备查询
1. Prepare the Query
检查 CLI、读取当前命令契约并列出会话:
bash
clb --help
clb manifest
clb sessions list --format json只有一个相关会话时直接使用;多个会话或成员都可能匹配时,让用户从返回的候选项中选择。
Check the CLI, read the current command contract, and list sessions:
bash
clb --help
clb manifest
clb sessions list --format jsonUse directly when there is only one relevant session; when multiple sessions or members may match, ask the user to select from the returned candidates.
2. 从专用命令开始
2. Start with Dedicated Commands
先使用能直接回答问题的最简单命令:
bash
clb messages search "<keyword>" --session <session-id> --format agent
clb messages between --member me --member <member> --session <session-id> --last 90d --format agent
clb topics list --session <session-id> --last 30d --format agent读取消息文本时使用 ;侦察会话、成员、数量和 搜索等结构时使用 。
--format agent--no-content--format jsonStart with the simplest command that can directly answer the question:
bash
clb messages search "<keyword>" --session <session-id> --format agent
clb messages between --member me --member <member> --session <session-id> --last 90d --format agent
clb topics list --session <session-id> --last 30d --format agentUse when reading message text; use when scouting structures like sessions, members, counts, and searches.
--format agent--format json--no-content3. 补充上下文或统计
3. Supplement Context or Statistics
只有第一步结果不足时再深入:
bash
clb messages context --id 1021 --session <session-id> --window 10 --format agent
clb stats keywords --session <session-id> --member <member> --last 90d --top 20 --format json当 为 true 时,保持相同查询条件并使用 继续。通过数量和 Token 参数只获取回答问题所需的上下文。
meta.hasMore--cursor <meta.nextCursor>Dig deeper only when the results from the first step are insufficient:
bash
clb messages context --id 1021 --session <session-id> --window 10 --format agent
clb stats keywords --session <session-id> --member <member> --last 90d --top 20 --format jsonWhen is true, keep the same query conditions and continue with . Only retrieve the context needed to answer the question through quantity and Token parameters.
meta.hasMore--cursor <meta.nextCursor>4. 最后才使用 SQL
4. Use SQL Only as a Last Resort
只有专用命令无法回答时,才使用只读 SQL:
bash
clb schema --session <session-id> --format json
clb sql "SELECT COUNT(*) AS n FROM message" --session <session-id> --format jsonUse read-only SQL only when dedicated commands cannot answer the question:
bash
clb schema --session <session-id> --format json
clb sql "SELECT COUNT(*) AS n FROM message" --session <session-id> --format json隐私与回答
Privacy and Responses
- 绝不使用 、修改 ChatLab 数据、导入文件、更改配置或启动长期运行的服务。
--raw - 绝不泄露完整聊天记录。ChatLab 的安全输出会应用用户配置的隐私预处理。
- 使用 、
[#1021]或[#1021*]等可用标记引用消息证据。[#1021-1024] - 先直接回答,说明实际查询的会话和时间范围,再区分观察到的事实与解释。
- 分析关系时不要过度推断情绪意图。仅在修正方式明确时遵循 。
error.hint - 优先使用用户当前使用的中文变体回答,命令、参数、JSON 字段和证据标记保持原样。
- Never use , modify ChatLab data, import files, change configurations, or start long-running services.
--raw - Never disclose complete chat records. ChatLab's secure output applies privacy preprocessing configured by the user.
- Reference message evidence using available tags such as ,
[#1021], or[#1021*].[#1021-1024] - Answer directly first, specify the actual queried session and time range, then distinguish between observed facts and interpretations.
- Do not overinfer emotional intentions when analyzing relationships. Follow only when the correction method is clear.
error.hint - Prioritize answering using the Chinese variant currently used by the user; keep commands, parameters, JSON fields, and evidence tags unchanged.