{
  "markdown": "# Chat Auto Exporter\n\nA Claude Code plugin that automatically saves your conversations as readable text files before context compaction and when sessions end. Never lose a conversation again.\n\n## How it works\n\nClaude Code hooks fire automatically at three key moments:\n\n- **PreCompact** — right before the context window gets compressed, saving the full conversation before details are lost\n- **SessionEnd** — when you close a session, capturing everything from that run\n- **SessionEnd (clear)** — when you run `/clear`, saving the conversation before it's wiped\n\nEach export is saved as a `.txt` file inside the project's `.claude/chat-exports/` directory, so conversations stay with the project they belong to.\n\n## Output format\n\nExports use a terminal-style format that mirrors the Claude Code CLI:\n\n```\n────────────────────────────────────────────────────────────────────────────────\n ▐▛███▜▌   Claude Code · my-project\n▝▜█████▛▘  2026-03-20 14:00 · Branch: main\n  ▘▘ ▝▝    Session: a8f2c3d1\n────────────────────────────────────────────────────────────────────────────────\n\n❯ How do I add authentication to this API?\n\n⏺ You can add JWT-based authentication by installing jsonwebtoken and\n  creating middleware that validates the token on each request.\n\n⏺ Bash(Install jsonwebtoken)\n  ⎿  added 1 package, audited 312 packages in 2s\n\n⏺ Write(~/src/middleware/auth.ts)\n  ⎿  Wrote 42 lines to ~/src/middleware/auth.ts\n     import jwt from 'jsonwebtoken';\n     import { Request, Response, NextFunction } from 'express';\n     … +40 lines\n\n⏺ Update(~/src/app.ts)\n  ⎿  Added 2 lines, removed 1 line\n     import { authMiddleware } from './middleware/auth';\n\n────────────────────────────────────────────────────────────────────────────────\n```\n\n### What gets included\n\n- User messages (cleaned of internal system tags), prefixed with `❯`\n- Claude's text responses, prefixed with `⏺`\n- Tool usage rendered as CLI-style summaries:\n  - **Bash** — command description + first 8 lines of output\n  - **Edit** — file path, lines added/removed, added content preview\n  - **Write** — file path, line count, first 5 lines of content\n  - **Read/Grep/Glob** — collapsed when consecutive (e.g., `Read 3 files`)\n  - **Agent/Skill** — name and description\n\n### What gets excluded\n\n- Raw tool input/output JSON\n- System messages and internal metadata\n- Thinking blocks\n- File history snapshots and progress events\n\n## Installation\n\n### From the marketplace (recommended)\n\nInside a Claude Code session run:\n\n```\n/plugin marketplace add christancho/chat-autoexporter\n/plugin install chat-autoexporter@christancho\n/reload-plugins\n```\n\nThe hooks register automatically — no manual configuration needed.\n\n### From a local clone\n\nClone the repo, then inside a Claude Code session run:\n\n```\n/plugin install /path/to/chat-autoexporter\n/reload-plugins\n```\n\n## Where exports are saved\n\n```\nyour-project/\n└── .claude/\n    └── chat-exports/\n        ├── 2026-03-20-140000.txt\n        ├── 2026-03-20-153022.txt\n        └── 2026-03-21-091500.txt\n```\n\nEach 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.\n\n## Requirements\n\n- **Node.js** (primary) — produces the rich terminal-style format with diffs and output previews\n- **jq** (fallback) — if Node isn't available, falls back to a simpler `[USER]/[ASSISTANT]` format\n- If neither is available, the hook exits silently without blocking Claude Code\n\n## Error handling\n\nAll errors are non-fatal. The hook will never block Claude Code operation:\n\n- Missing or empty transcript: exits silently\n- Malformed JSONL lines: skipped\n- Missing Node and jq: exits with a stderr warning\n\n## Author\n\n[Christian Mendieta](https://christianmendieta.ca)\n\n## License\n\nMIT\n",
  "bytes": 3771,
  "sha": "ac06586cc05d0ebc4e214a640f221a4b151a0ec45302a6e90c8e091cfcef5782",
  "repo_slug": "christancho/chat-autoexporter",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_christancho_chat_autoexporter_chat_auto__0de5a177/readme"
}