chat-autoexporter

Chat Auto Exporter

A Claude Code plugin that automatically saves your conversations as readable text files before context compaction and when sessions end. Never lose a conversation again.

How it works

Claude Code hooks fire automatically at three key moments:

Each export is saved as a .txt file inside the project’s .claude/chat-exports/ directory, so conversations stay with the project they belong to.

Output format

Exports use a terminal-style format that mirrors the Claude Code CLI:

────────────────────────────────────────────────────────────────────────────────
 ▐▛███▜▌   Claude Code · my-project
▝▜█████▛▘  2026-03-20 14:00 · Branch: main
  ▘▘ ▝▝    Session: a8f2c3d1
────────────────────────────────────────────────────────────────────────────────

❯ How do I add authentication to this API?

⏺ You can add JWT-based authentication by installing jsonwebtoken and
  creating middleware that validates the token on each request.

⏺ Bash(Install jsonwebtoken)
  ⎿  added 1 package, audited 312 packages in 2s

⏺ Write(~/src/middleware/auth.ts)
  ⎿  Wrote 42 lines to ~/src/middleware/auth.ts
     import jwt from 'jsonwebtoken';
     import { Request, Response, NextFunction } from 'express';
     … +40 lines

⏺ Update(~/src/app.ts)
  ⎿  Added 2 lines, removed 1 line
     import { authMiddleware } from './middleware/auth';

────────────────────────────────────────────────────────────────────────────────

What gets included

What gets excluded

Installation

Inside a Claude Code session run:

/plugin marketplace add christancho/chat-autoexporter
/plugin install chat-autoexporter@christancho
/reload-plugins

The hooks register automatically — no manual configuration needed.

From a local clone

Clone the repo, then inside a Claude Code session run:

/plugin install /path/to/chat-autoexporter
/reload-plugins

Where exports are saved

your-project/
└── .claude/
    └── chat-exports/
        ├── 2026-03-20-140000.txt
        ├── 2026-03-20-153022.txt
        └── 2026-03-21-091500.txt

Each file is timestamped (YYYY-MM-DD-HHMMSS.txt). If two exports happen in the same second (e.g., PreCompact + SessionEnd), the second gets a -2 suffix.

Requirements

Error handling

All errors are non-fatal. The hook will never block Claude Code operation:

Author

Christian Mendieta

License

MIT