Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Emasoftv1.1.7MITIn 1 marketplace
Saves the full chat transcript as markdown before each compaction, so the conversation survives after context is summarized. Runs automatically as a PreCompact hook and writes files to .claude/chat_history in your project.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Automatically exports the full chat transcript before every compaction event, preserving conversation history that would otherwise be summarized and lost.
The export captures four layers of conversation data:
~/.claude/debug/<session_id>.txt (if debug mode was active), interleaved into the main conversation by timestamp.A PreCompact hook fires before every compaction (manual via /compact or automatic when the context window fills). The hook runs a Python script that:
<session_id>/subagents/<details> sectionsThe export is saved to .claude/chat_history/export-YYYYMMDD-HHMMSS.md in the current working directory.
The hook is defined in hooks/hooks.json:
{
"hooks": {
"PreCompact": [
{
"matcher": "auto|manual",
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pre_compact_export.py"
}
]
}
]
}
}
The script receives hook input via stdin (JSON with session_id, transcript_path, etc.) and writes the export file.
Files are saved as:
.claude/chat_history/export-20260212-193045.md
.claude/chat_history/export-20260213-104512.md
Each export contains:
## USER / ## ASSISTANT headings and timestamps<details> sections (subagent Tasks are expanded by default)Install from the Emasoft marketplace. Use --scope user to install for all Claude Code instances, or --scope global for all projects.
# Add Emasoft marketplace (first time only)
claude plugin marketplace add emasoft-plugins --url https://github.com/Emasoft/emasoft-plugins
# Install plugin (--scope user = all Claude Code instances, recommended for utility plugins)
claude plugin install emasoft-chat-history@emasoft-plugins --scope user
# RESTART Claude Code after installing (required!)
Utility plugins are installed once with --scope user and become available to all Claude Code instances.
This is a utility plugin — it provides pre-compaction chat export hooks. No --agent flag needed; just start Claude Code normally and chat history will be automatically exported before context compaction.
--plugin-dir loads a plugin directly from a local directory without marketplace installation. Use only during plugin development.
claude --plugin-dir ./OUTPUT_SKILLS/emasoft-chat-history
match-free syntax, compatible with 3.10+)emasoft-chat-history/
.claude-plugin/
plugin.json # Plugin manifest
hooks/
hooks.json # PreCompact hook configuration
scripts/
pre_compact_export.py # Main export script (674 lines)
LICENSE
README.md
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
emasoft-chat-history@emasoft-plugins is listed by emasoft/emasoft-plugins — review the source before installing
npx claudepluginhub emasoft/emasoft-plugins --plugin emasoft-chat-historyPlugins from other owners that cover similar ground