history

history is a command for coding agents from mirinodev/maestro. It costs 0 tokens per session (2,438 once invoked), scanned C, original, MIT.

A command for managing Claude Code conversation history for each Git worktree. It can list, display, search, export, combine, clean up, and synchronize saved histories.

In plain words
What is it for?
Use it to inspect a branch's history, search for a topic, export histories as JSON or Markdown, or merge them into one file.
Why use it?
It keeps development discussions available after switching between branches or worktrees. This makes it easier to find earlier decisions and troubleshooting details.

Command

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.

agentmods
npx agentmods add commands/mirinodev/maestro/history
Clone the repo
git clone --depth 1 https://github.com/mirinodev/maestro

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 history

README.md
[![agentmods](https://agentmods.dev/badge/commands/mirinodev/maestro/history.svg)](https://agentmods.dev/commands/mirinodev/maestro/history)
Your own site
<a href="https://agentmods.dev/commands/mirinodev/maestro/history"><img src="https://agentmods.dev/badge/commands/mirinodev/maestro/history.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,438 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00000 $0.02438
Opus 5 $0.00000 $0.01219
Sonnet 5 $0.00000 $0.00488
Haiku 4.5 $0.00000 $0.00244

Measured 4d ago against content hash 3ca83d88794a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

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 4d 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.

rm -rf "$BACKUP_DIR"
docs/commands/history.md · 459 lines

How it starts

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

🔸 history

Command to manage Claude Code conversation history. You can save, search, and export development history for each orchestra member (Git worktree).

Overview

mst history [options]
mst h [options]  # alias

Usage Examples

Basic Usage

# List all histories
mst history --list

# Show history for specific branch
mst history --show feature-auth

# Export histories
mst history --export all-histories.json
mst history --export all-histories.md

# Merge all histories into one file
mst history --merge merged-history.md

History Management

# Cleanup unnecessary histories
mst history --cleanup

# Sync history paths
mst history --sync

# Search histories
mst history --search "authentication"

# Output in JSON format
mst history --list --json

Options

Option Short Description Default
--list -l Display history list false
--show <branch> -s Show history for specific branch none
--export <file> -e Export histories none
--merge <file> -m Merge all histories into one file none
--cleanup -c Cleanup unnecessary histories false
--sync Sync history paths false
--search <query> Search histories none
--json -j Output in JSON format false
--days <n> -d Only histories within specified days none

History Storage Format

Claude Code histories are saved in the following format:

Directory Structure

~/.claude/history/
├── feature-auth.md
├── bugfix-login.md
├── experiment-ml.md
└── main.md

History File Content

# Claude Code History - feature/auth

## Session: 2025-01-20 10:30:00

### Human

Please implement authentication functionality. Use JWT.

### Assistant

I'll implement authentication functionality with JWT. First, let's install the necessary packages...

---

## Session: 2025-01-20 14:00:00

### Human

Please add tests.

### Assistant

I'll add tests for the authentication functionality...

Read the full file on GitHub · 459 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. 4d ago First seen · 459 lines · 0 tokens per session scan C 3ca83d88794a

Subscribe to this mod's changes

history is a command published in the GitHub repository mirinodev/maestro (9 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,438 tokens. 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.