跳到正文
TakoAPI
返回技能列表

mh-session-logs

由 mohdalhashemi98-hue 提供

Search & Research
242下载量由 clawskills.sh 提供
1浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Search and analyze your own session logs (older/parent conversations) using jq.

描述

该技能的功能

Searches and analyzes conversation history stored in OpenClaw session JSONL files using jq and ripgrep. Useful when a user references prior chats or needs context from older conversations not held in memory files.

Querying raw JSONL with jq gives precise, scriptable access to full conversation history without loading entire sessions into memory.

何时使用

  • Find what was discussed in a session from a specific date
  • Search all past sessions for a keyword or phrase
  • Calculate total API cost for a session or day
  • Count messages and token usage across a conversation
  • Identify which tools were used most in a session

示例工作流

输入

User asks: what did we decide about the database schema last week?

智能体
  1. 1

    Locate the agent ID from the system prompt Runtime line

  2. 2

    List sessions from the relevant date range using the date-sorting loop

  3. 3

    Search assistant messages across those sessions for 'schema' using rg

  4. 4

    Extract matching text blocks with jq select filters

  5. 5

    Return the relevant excerpts to the user

输出

Relevant assistant message excerpts referencing the database schema decision

安装

clawhub install mohdalhashemi98-hue/mh-session-logs

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接