chatlab-analyze-cn

Original🇨🇳 Chinese
Translated

Analyze local ChatLab chat records via clb CLI. Used when users ask external Agents to review conversations, find evidence, summarize topics, compare members, or analyze specified person or group relationships based on imported ChatLab data.

1installs
Added on

NPX Install

npx skill4agent add chatlab/chatlab chatlab-analyze-cn

SKILL.md Content (Chinese)

View Translation Comparison →

ChatLab Chat Analysis

Query and analyze chat records imported into ChatLab via the read-only
clb
CLI.

Applicable Scenarios

  • 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-cn
.
Installation command:
bash
npx skills add ChatLab/ChatLab --skill chatlab-analyze-cn -g

Workflow

1. Prepare the Query

Check the CLI, read the current command contract, and list sessions:
bash
clb --help
clb manifest
clb sessions list --format json
Use 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. Start with Dedicated Commands

Start 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 agent
Use
--format agent
when reading message text; use
--format json
when scouting structures like sessions, members, counts, and
--no-content
searches.

3. Supplement Context or Statistics

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 json
When
meta.hasMore
is true, keep the same query conditions and continue with
--cursor <meta.nextCursor>
. Only retrieve the context needed to answer the question through quantity and Token parameters.

4. Use SQL Only as a Last Resort

Use 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

  • Never use
    --raw
    , modify ChatLab data, import files, change configurations, or start long-running services.
  • 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]
    ,
    [#1021*]
    , or
    [#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
    error.hint
    only when the correction method is clear.
  • Prioritize answering using the Chinese variant currently used by the user; keep commands, parameters, JSON fields, and evidence tags unchanged.