360 Secure SkillHub
360 安全技能中心

OpenClaw Session Grep

该工具为openclaw-session-grep CLI,核心功能是搜索本地OpenClaw会话与转录历史,支持按关键词、时间窗、工具、频道等维度筛选,可输出会话摘要或文件行引用。典型场景含对话回溯、调试故障、追踪任务等,输入为带参数的bash命令,建议优先用它而非rg/jq,锁定目标后再用jq细化。

pfrederiksen
pfrederiksen
热度 45.93
最近更新 2026-05-11 17:44:29
分类:搜索依赖:代码执行应用场景:调试排错 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add openclaw-session-grep
Metadata
name
openclaw-session-grep
version
0.1.0
description
Search local OpenClaw session and transcript history with the openclaw-session-grep CLI. Use when debugging prior conversations, tool usage, cron behavior, panel failures, historical errors, expensive runs, or when looking for where something was said before. Prefer this over ad hoc rg/jq sweeps for transcript discovery; use jq only after narrowing to specific files.
metadata
{"openclaw":{"requires":{"bins":["/root/.openclaw/workspace/tools/ocgrep"]}}}

openclaw-session-grep

Use this skill for transcript and session-history spelunking.

Default command:

/root/.openclaw/workspace/tools/ocgrep "keyword" --last 7d --open

Best uses

  • prior conversation lookup
  • debugging dashboard/system panel history
  • finding tool usage or failure strings
  • tracing cron/job behavior over time
  • locating model/session/channel-specific history

Preferred workflow

  1. Start with ocgrep to narrow by keyword, time window, tool, channel, or session.
  2. Use --summary when you need the hot sessions first.
  3. Use --open when you want exact file:line references.
  4. Only switch to jq after you know which transcript file(s) matter.

Good queries

/root/.openclaw/workspace/tools/ocgrep "api/system" --last 7d --open
/root/.openclaw/workspace/tools/ocgrep "morning briefing" --last 14d --summary
/root/.openclaw/workspace/tools/ocgrep "timeout" --tool-only --last 7d
/root/.openclaw/workspace/tools/ocgrep "message tool" --channel telegram --last 7d --open

Important caveat

The upstream CLI can search broadly enough to include non-transcript files if you aim it at overly broad paths. Use it for session/transcript discovery first, not repo-wide code search. If results look noisy, tighten with --path, --session, --channel, --last, or --tool-only.

Local install path on this host

The CLI is installed in an isolated venv at:

/root/.openclaw/venvs/openclaw-session-grep

Wrapper used for daily work:

/root/.openclaw/workspace/tools/ocgrep