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 SummerSec/AI-Inner-Os --skill agent-chat-historygit clone --depth 1 https://github.com/SummerSec/AI-Inner-OsWrote 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/summersec/ai-inner-os/agent-chat-history)<a href="https://agentmods.dev/skills/summersec/ai-inner-os/agent-chat-history"><img src="https://agentmods.dev/badge/skills/summersec/ai-inner-os/agent-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/summersec/ai-inner-os/agent-chat-history"><img src="https://agentmods.dev/badge/skills/summersec/ai-inner-os/agent-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.00094 | $0.00952 |
| Opus 5 | $0.00047 | $0.00476 |
| Sonnet 5 | $0.00019 | $0.00190 |
| Haiku 4.5 | $0.00009 | $0.00095 |
Grade A, and why
agent-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.
Copies of this mod
1 near-identical copy found in the catalogue:
- agent-chat-history — 91% identical, 10 lines differ
What it actually says
agent-chat-history:本地 Agent 历史对话按日检索(中文)
执行顺序(Agent 照做)
- 已有日期
YYYY-MM-DD:进入 skill 根目录agent-chat-history/,运行下方命令;需要给下游贴结果时优先--json。 - 没有日期:只问用户一句,确认要查询的
YYYY-MM-DD(本地时区日界),再问是否只要提示词、是否限定某一客户端。 - 任务匹配:只要用户提示词 →
--prompts-only(可加--include-claude-global-history);只要路径/文件线索 → 默认列表模式,必要时加--sqlite-keys。 - 无命中或偏少:提示尝试
--claude-scan all;仍不对则读 references/storage-paths.md 核对自定义安装路径。
优先:固定日期用脚本(省 token)
不要先把本文件整篇读进上下文。 在仓库或已安装 skill 的 agent-chat-history/ 下执行:
python scripts/query_history.py --date YYYY-MM-DD
python scripts/query_history.py --date YYYY-MM-DD --prompts-only --json
常用参数(完整表与 JSON 形状见 references/query-history-script.md):
| 参数 | 含义 |
|---|---|
--date |
必填,本地日历日 YYYY-MM-DD |
--prompts-only |
只提取用户侧提示词(Cursor 为启发式,可能不全) |
--json |
结构化输出,便于原样贴回或只摘 prompts 数组 |
--mode |
all(默认)或 claude / codex / cursor 只查一类 |
路径规则与手工命令见 references/storage-paths.md、references/query-examples.md。
Gotchas(易错点)
- Cursor:从
state.vscdb已知 key 启发式抽取,版本变更后可能漏项或混入非纯用户句。 - Codex:依赖
history.jsonl行内ts(Unix 秒);无ts的行不会进入结果。 - 非默认数据目录(
CODEX_HOME、CLAUDE_CONFIG_DIR、Cursor--user-data-dir、Flatpak/Snap):脚本只覆盖常见布局,须对照storage-paths.md自行定位后再查。
何时仍需要读正文 / references
- 要在 SQLite 里深挖 JSON 或新版本 key 名。
- 用户只描述「上周某次」等模糊时间:先澄清日期再跑脚本。
摘要(三客户端)
| 客户端 | 要点 |
|---|---|
| Claude Code | ~/.claude/projects/**/*.jsonl + 可选 history.jsonl;列表模式用 mtime 落在本地日 |
| Codex | history.jsonl 行内 ts(Unix 秒)落在本地日 |
| Cursor | workspaceStorage/<hash>/ 目录 mtime + state.vscdb;--sqlite-keys 仅列表模式下列 key |
边界
路径与 DB key 随版本变化;未开启持久化或清理缓存可能导致无命中。只读;勿删改他人数据。
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 58 lines · 94 tokens per session scan A 106d9f22d2d9
agent-chat-history is a skill published in the GitHub repository SummerSec/AI-Inner-Os (17 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 94 tokens to every session and 952 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
himalaya
Himalaya CLI: IMAP/SMTP email from terminal.
browser-use
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work.
apple-reminders
Apple Reminders via remindctl: add, list, complete.
apple-notes
Manage Apple Notes via memo CLI: create, search, edit.
box
Box manages cloud files, sharing, search, and metadata.
obsidian
Read, search, create, and edit notes in the Obsidian vault.