Agent History

SKILLAI 工具
AI 工具 未标注权限 许可证不明确
安装这个技能

使用 `ochist` CLI 搜索并读取 AI 编码代理(如 OpenCode、Claude Code)的历史对话,先于全新研究或网络搜索使用。

累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

ClawHub 市场
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install clawhub_adlternative/agent-history

技能档案

AI 工具
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方clawhub_adlternative仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式ClawHub 市场安装包 clawhub
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791622662
正文体量5.2 KBSKILL.md 原文大小,越大说明说明书写得越细

SKILL.md 全文

5.2 KB
模型实际读到的说明书原文,来自技能仓库

What this skill does

ochist exposes past conversation history from local AI coding agents
(OpenCode, Claude Code, and any other registered source) as plain,
pipe-friendly text — so you can recover earlier research, commands, errors,
and decisions instead of redoing them.

It is READ-ONLY and never modifies any data store. By default it queries
EVERY agent whose data exists on this machine; restrict with --source.

When to use

Use it proactively when the user:
- Refers to earlier work: "之前/上次/我们讨论过/已经配置过", "what did we do", "recall".
- Asks to find a past command, error+fix, file change, or decision.
- Starts research you may have already done in a prior session.

Check history FIRST in these cases — it is cheaper than re-researching.

Scope: project vs global

sessions and grep default to the current project — sessions whose
working directory is the current directory or a subdirectory of it. Sibling
git worktrees of the same repo are included automatically, so a session run
in a linked worktree still shows up from the main checkout (and vice versa).
To widen or narrow:

  • --global / -g — search ALL sessions across every directory.
  • --dir <path> — scope to a specific directory instead of the cwd.
  • --no-worktrees — strict single-directory scope (don't expand to worktrees).

Rule of thumb: start project-scoped (more relevant, less noise); if you find
nothing, retry with --global.

Golden rule: page, don't dump

Sessions can have hundreds of parts and large tool outputs. NEVER read a
whole session blindly. Narrow first, then pull only what you need:

  1. Locate → ochist grep <pattern> or ochist sessions
  2. Orient → ochist meta <session> (cheap, reliable card)
  3. Scan → ochist show <session> (one line per part)
  4. Read → ochist part <part_id> (only the parts that matter)

Pipe through grep, head, wc -l, awk, jq to keep output small.

Commands

ochist sources
    List known agents and whether each has data on this machine.

ochist sessions [--source N] [--global|-g] [--dir PATH] [--no-worktrees] [--limit N] [--json]
    Recent sessions (current project by default; includes sibling worktrees).
    Columns: time<TAB>source<TAB>slug<TAB>id<TAB>dir<TAB>title

ochist grep <pattern> [--source N] [--global|-g] [--dir PATH] [--no-worktrees] [--session S] [--type text|tool|patch] [--limit N] [--json]
    Search across part content (current project by default).
    Output: part_id<TAB>source<TAB>slug<TAB>tag<TAB>match

ochist meta <session> [--source N] [--json]
    Reliable metadata card: tools, cost, tokens, todos, counts, time.

ochist show <session> [--source N] [--role user|assistant] [--type text|tool|patch] [--full] [--max N] [--json]
    Outline (default): #n<TAB>part_id<TAB>tag<TAB>chars<TAB>preview. --full prints content.

ochist part <part_id> [--source N] [--json]
    Full, untruncated content of a single part.

--source values: opencode, claudecode, qoder, codex (run ochist sources to see all).
<session>/<part_id> accept: agent id, slug/prefix, or latest.

Recommended workflow (copy these patterns)

Find which session touched a topic, then read the answer:

ochist grep "ssh" --limit 8                          # candidates + part_id + source
ochist meta silent-star                               # confirm the right session
ochist show silent-star | grep -i "authorized_keys"   # find the exact part id
ochist part prt_xxxxx                                  # read the full message

Browse recent work — current project, a specific dir, or everything:

ochist sessions                          # current project
ochist sessions --dir ~/code/myproject   # a specific project
ochist sessions --global                 # all projects
ochist sessions --source claudecode      # one agent only

Skim only the assistant's conclusions:

ochist show latest --role assistant | head -30

Tips

  • meta fields (tools, cost, tokens, todos, counts) are 100% reliable —
    prefer them for a quick, cheap overview.
  • grep returns one representative line + a part_id; follow up with
    ochist part <part_id> for full text.
  • Subagents are folded into their parent session (not listed separately):
    OpenCode (via parent_id), Codex (via parent_thread_id), and Claude Code
    subagent output all appear inside the parent's parts, prefixed with
    [subagent …]. A subagent id/slug resolves to its parent.
  • Use --json | jq for machine parsing.
  • If ochist is not on PATH, invoke via:
    node <repo>/dist/cli.js <args>.

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。