page

page is a command for coding agents from letitbk/claude-academic-setup. It costs 0 tokens per session (1,683 once invoked), scanned A, original, MIT.

A command that saves a complete Claude Code conversation to files before you compact the session and free context space.

In plain words
What is it for?
Use it to create a session history dump, optionally giving it a filename prefix and output directory.
Why use it?
It preserves decisions, citations, file changes, and command output so important details are not lost when the conversation is shortened.

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/letitbk/claude-academic-setup/page
Clone the repo
git clone --depth 1 https://github.com/letitbk/claude-academic-setup

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 page

README.md
[![agentmods](https://agentmods.dev/badge/commands/letitbk/claude-academic-setup/page.svg)](https://agentmods.dev/commands/letitbk/claude-academic-setup/page)
Your own site
<a href="https://agentmods.dev/commands/letitbk/claude-academic-setup/page"><img src="https://agentmods.dev/badge/commands/letitbk/claude-academic-setup/page.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 1,683 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.01683
Opus 5 $0.00000 $0.00842
Sonnet 5 $0.00000 $0.00337
Haiku 4.5 $0.00000 $0.00168

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

Security

Grade A, and why

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

commands/page.md · 223 lines

How it starts

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

Page - Session History Dump with Citations and Memory Management

Like OS paging for processes, this command saves the entire conversation state to disk by extracting it from Claude Code's local storage (~/.claude/projects/). After running this command, you can use /compact to free up Claude's context memory.

Usage

/project:page [filename_prefix] [output_directory]

Arguments

  • filename_prefix (optional): Custom prefix for output files. Defaults to "session-dump"
  • output_directory (optional): Directory to save files. Defaults to current working directory

Description

This command implements a memory management strategy similar to OS paging:

  1. Page Out (Save to Disk):

    • Saves complete conversation state with full citations
    • Creates indexed source references for quick retrieval
    • Preserves all context before memory compaction
  2. Generated Files:

    • Full History File ({prefix}-{timestamp}-full.md):

      • Compact summary at top for quick reference
      • Complete conversation transcript with timestamps
      • All file operations with paths and content
      • Web resources with URLs and excerpts
      • Command executions with outputs
      • Full citation index for all sources
    • Compact Memory File ({prefix}-{timestamp}-compact.md):

      • Executive summary of session
      • Key decisions and outcomes
      • Important code changes made
      • Quick reference links
      • Optimized for future context loading
  3. Memory Management Workflow:

    • First: Run /project:page to save everything to disk
    • Then: Run /compact to free up Claude's context memory
    • Result: Fresh context while preserving full history
    • Essential for long development sessions

Note: This prepares for /compact by saving everything first. Run /compact after this command completes.

Implementation

Please execute this comprehensive session documentation process:

Phase 1: History Extraction from Claude Code Storage

  1. Download and use the extract-claude-session.py script from agent-guides:
    • Script URL: https://raw.githubusercontent.com/tokenbender/agent-guides/main/scripts/extract-claude-session.py
    • Download it to a temporary location and run it
    • This will automatically find and extract the current session

Read the full file on GitHub · 223 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 · 223 lines · 0 tokens per session scan A 38de2a749edc

Subscribe to this mod's changes

page is a command published in the GitHub repository letitbk/claude-academic-setup (43 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,683 tokens. 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.