ai-history

ai-history is a skill for Claude Code from jiantao88/ai-history. It costs 52 tokens per session (939 once invoked), scanned C, original, MIT.

A tool for searching and browsing past coding-assistant conversations from Claude Code, Codex CLI, and Cursor.

In plain words
What is it for?
Use it to list projects and sessions, open previous conversations, or search all saved coding chats for a word or phrase.
Why use it?
It helps you find earlier decisions, explanations, and context instead of repeating work or searching chat records manually.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to list projects and sessions, open previous conversations, or search all saved coding chats for a word or phrase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiantao88/ai-history/claude
Install

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.

Any agent
npx skills add jiantao88/ai-history --skill claude
Clone the repo
git clone --depth 1 https://github.com/jiantao88/ai-history

Made for: Claude Code.

Wrote 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.

agentmods badge for ai-history

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiantao88/ai-history/claude/github.svg)](https://agentmods.dev/skills/jiantao88/ai-history/claude)
Your own site
<a href="https://agentmods.dev/skills/jiantao88/ai-history/claude"><img src="https://agentmods.dev/badge/skills/jiantao88/ai-history/claude/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.

agentmods 80×15 button for ai-history

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiantao88/ai-history/claude"><img src="https://agentmods.dev/badge/skills/jiantao88/ai-history/claude.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 939 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00939
Opus 5 $0.00026 $0.00469
Sonnet 5 $0.00010 $0.00188
Haiku 4.5 $0.00005 $0.00094

Measured 12d ago against content hash 69567cae7994, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

ai-history scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

git clone https://github.com/jiantao88/ai-history.git /tmp/ai-history && /tmp/ai-history/setup && rm -rf /tmp/ai-history
skills/claude/SKILL.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

This skill provides access to AI coding assistant chat history across multiple providers (Claude Code, Codex CLI, Cursor). It uses the ai-history CLI tool installed at ~/.cargo/bin/ai-history.

Prerequisites

The ai-history binary must be installed. If not found, guide the user:

Run this to install:
  git clone https://github.com/jiantao88/ai-history.git /tmp/ai-history && /tmp/ai-history/setup && rm -rf /tmp/ai-history

Commands

/ai-history or /ai-history list

List all projects that have chat history.

~/.cargo/bin/ai-history list --json 2>/dev/null

Parse the JSON output and present as a readable table.

/ai-history sessions <project>

List sessions for a project. The <project> argument supports fuzzy matching (substring).

~/.cargo/bin/ai-history sessions "<project>" --json 2>/dev/null

/ai-history show <session-id>

Show messages from a specific session. Session ID can be abbreviated (first 8+ chars).

~/.cargo/bin/ai-history show "<session-id>" --compact --json 2>/dev/null

/ai-history search <query>

Search across all chat history for a keyword or phrase.

~/.cargo/bin/ai-history search "<query>" --limit 10 --json 2>/dev/null

/ai-history context <session-id>

Load a past session as structured context (digest format — compressed summary of intent, decisions, code changes, and conclusions). This is the recommended way to inject history.

~/.cargo/bin/ai-history context "<session-id>" 2>/dev/null

After fetching:

  1. Read and understand the digest
  2. Present a brief summary:
    CONTEXT LOADED (Digest)
    ════════════════════════════════════════
    Session:  <summary>
    Provider: <provider>
    Project:  <project>
    Date:     <date>
    ════════════════════════════════════════
    
  3. Tell the user you now have the context and can continue the work.

For full uncompressed conversation (when digest isn't enough):

~/.cargo/bin/ai-history context "<session-id>" --full 2>/dev/null

Read the full file on GitHub · 129 lines

Changes

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.

  1. 12d ago First seen · 129 lines · 52 tokens per session scan C 69567cae7994

Subscribe to this mod's changes

ai-history is a skill published in the GitHub repository jiantao88/ai-history (3 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 939 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.