stash CLAUDE.md

stash CLAUDE.md is an instructions file for coding agents from jaredgizersky/stash. It costs 1,201 tokens per session, scanned A, original, MIT.

A project instruction file for Stash, a command-line and text-based interface for naming, bookmarking, browsing, previewing, and resuming Claude Code and Codex sessions. It also documents how session data, indexes, caches, and the interface are organized.

In plain words
What is it for?
Working on Stash architecture, session scanning, cache updates, live-process detection, transcript reading, stored bookmarks, or the terminal interface.
Why use it?
It helps contributors understand where session information comes from and how the application moves it through its cache, index, and display. This reduces the risk of breaking session loading or resume behaviour when changing the code.

Instructions file

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 instructions/jaredgizersky/stash/claude-md
Clone the repo
git clone --depth 1 https://github.com/jaredgizersky/stash

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 stash CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jaredgizersky/stash/claude-md.svg)](https://agentmods.dev/instructions/jaredgizersky/stash/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jaredgizersky/stash/claude-md"><img src="https://agentmods.dev/badge/instructions/jaredgizersky/stash/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,201 This file is loaded in full into every session.
When invoked 1,201 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01201 $0.01201
Opus 5 $0.00600 $0.00600
Sonnet 5 $0.00240 $0.00240
Haiku 4.5 $0.00120 $0.00120

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

Security

Grade A, and why

stash CLAUDE.md 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 5d 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.

CLAUDE.md · 83 lines

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.

stash

CLI/TUI for managing Claude Code and Codex sessions. Lets you name, bookmark ("stash"), browse, preview transcripts, and resume sessions.

Architecture

cmd/stash/main.go            CLI entry point (cobra). Subcommands: (default TUI), hook, list
internal/claude/sessions.go   Session loading from ~/.claude/projects/*/*.jsonl. Parallel scanning with file-level cache (~/.stash/session-cache.json)
internal/claude/cache.go      mtime+size-based cache for scanned JSONL metadata. Bump cacheVersion const if Session struct changes
internal/claude/active.go     Reads ~/.claude/sessions/*.json for live processes (PID, alive check, cwd)
internal/codex/sessions.go    Codex session loading from ~/.codex/state_5.sqlite (threads table). Pure-Go SQLite via modernc.org/sqlite
internal/codex/transcript.go  Codex JSONL transcript reader (response_item format → TranscriptEntry)
internal/store/store.go       Stash index (~/.stash/index.json) — the ledger of explicitly stashed sessions
internal/tui/tui.go           Bubble Tea TUI. Three tabs (Stash/History/Active), unified update handler, transcript preview

How Claude sessions work

  • Sessions stored as JSONL at ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl
  • Encoding: absolute path with every non-alnum char replaced by - (lossy — cannot be reversed)
  • Some project dirs have sessions-index.json but it's incomplete (only covers ~5% of sessions). We ignore it and scan all JONLs directly.
  • Session names set via /rename or claude -n appear as {"type": "agent-name", "agentName": "..."} entries in the JSONL
  • Active sessions: ~/.claude/sessions/<pid>.json — contains pid, sessionId, cwd, name. File keyed by PID.
  • Resume: claude --resume <session-id> in the correct cwd

Data flow

  1. LoadAllSessions() scans all JSONL files across all project dirs, parallelized, cached by mtime+size
  2. LoadActiveSessions() reads ~/.claude/sessions/*.json, checks PIDs alive via kill -0
  3. LinkTranscripts() matches active sessions to their transcript Session objects
  4. Stash index (~/.stash/index.json) marks which sessions are "stashed" — populated by the hook
  5. TUI enriches sessions with stash names, renders three tabs

Read the full file on GitHub · 83 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. 5d ago First seen · 83 lines · 1,201 tokens per session scan A 9a6e34df77b2

Subscribe to this mod's changes

stash CLAUDE.md is an instructions file published in the GitHub repository jaredgizersky/stash (11 stars, last pushed 4mo ago), licensed MIT. It adds 1,201 tokens to every session, about $0.0060 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.