Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ay-bh/chat-history --skill chat-historygit clone --depth 1 https://github.com/ay-bh/chat-historyWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ay-bh/chat-history/chat-history)<a href="https://agentmods.dev/skills/ay-bh/chat-history/chat-history"><img src="https://agentmods.dev/badge/skills/ay-bh/chat-history/chat-history/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ay-bh/chat-history/chat-history"><img src="https://agentmods.dev/badge/skills/ay-bh/chat-history/chat-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00093 | $0.01557 |
| Opus 5 | $0.00046 | $0.00779 |
| Sonnet 5 | $0.00019 | $0.00311 |
| Haiku 4.5 | $0.00009 | $0.00156 |
Grade A, and why
chat-history scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
chat-history
Search, inspect, and export Claude Code, Cursor, and Codex conversation history. The short alias ch works identically. If the command is not found: cargo install chat-history.
When to use
- User asks about past conversations or sessions
- User wants to find something they discussed before
- User needs a summary of recent work / accomplishments
- User wants to resume or export a previous session
Process
Keyword question ("find that conversation where I..."):
chat-history search "<query>" --deep --json— always--deep --jsonfrom agents.--deepsearches full transcript content;--jsonreturns structured results (session_id,score,snippet,tools,files). Note--jsonexists only onsearch.- Shortlist by snippet, not by raw score (see "Choosing the best hit").
chat-history inspect <partial-uuid>on the top 2–3 candidates to confirm before answering.view/exportonly if the user needs the actual content.
Temporal question ("what did I work on yesterday?") — list, don't search:
chat-history --from yesterday --to yesterday— every row shows a short session ID;-sgroups by day for multi-day overviews.--from Xalone means X through today. Always pair with--towhen the user means a specific day.- Short IDs work everywhere a session ID is accepted (
inspect,view,export,find);-vadds full IDs and file paths.resumeworks forclaude/codexrows and for Cursor Agent CLI chats;cursor-iderows (and Agent transcripts without a CLI store) print the title andDIR:— tell the user to open that folder in Cursor and pick the chat in the sidebar.
chat-history inspect <id>for accomplishments, tools, files touched.
Choosing the best hit
- Scores rank keyword density, not intent. Use scores only to shortlist; decide from snippets and
inspect. - The conversation you are currently in can match its own query and score highest. Ignore hits whose session is the current one.
- When candidates are close,
inspecteach before picking — don't answer from the top score alone.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 83 lines · 93 tokens per session scan A ac740b613afd
chat-history is a skill published in the GitHub repository ay-bh/chat-history (11 stars, last pushed 2d ago), licensed MIT. It adds 93 tokens to every session and 1,557 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
ai-history
Search and browse AI coding assistant chat history across providers (Claude Code, Codex CLI, Cursor). Find past conversations, inject historical context into the current session, and search across all chat records. Powered by the ai-history CLI tool.
ai-history
Search and browse AI coding assistant chat history across providers (Claude Code, Codex CLI, Cursor). Find past conversations, inject historical context into the current session, and search across all chat records. Use when asked to find past conversations, load context from previous sessions, or search chat history.
mnemon
Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.
mnemon
Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.
mnemon
Persistent graph-based memory. Recall context before responding, remember insights after. Each group has private memory; global memory is read-only.
mnemon
Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.