pre-compact-backup

Back up Claude transcripts before context compaction with JSON metadata.

1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/hbvg234/jnmt.vn --skill pre-compact-backup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-compact-backup
Source: https://github.com/hbvg234/jnmt.vn/tree/main/.claude/skills/pre-compact-backup
Command: npx skills add https://github.com/hbvg234/jnmt.vn --skill pre-compact-backup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Back up Claude transcripts automatically before context compaction to prevent data loss and enable audit trails.

Core Features & Use Cases

  • Auto-backup on PreCompact: captures the current transcript from known paths and saves it as a timestamped file under logs/transcript_backups, with a metadata file alongside.
  • Manual backup trigger: can be invoked to save the session state prior to long tasks or when requested by the user.
  • Audit-friendly metadata: writes a JSON metadata file with timestamp, trigger, branch, and last_commit for traceability.

Quick Start

Invoke the pre-compact backup to save the current transcript before starting a long task.

Frequently Asked Questions about pre-compact-backup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I back up Claude transcripts before context compaction?

Back up Claude transcripts automatically before context compaction by capturing the current session state into a timestamped file under logs/transcript_backups, preventing data loss during long tasks.

What is PreCompact automation for session backups?

PreCompact automation is a trigger that automatically saves Claude session transcripts to logs/transcript_backups with accompanying JSON metadata right before context compaction occurs, ensuring no conversation history is lost.

Can I manually trigger a transcript backup before starting a long task?

Yes, you can manually trigger a transcript backup to save the current session state before starting a long task or whenever requested, creating a timestamped file with metadata for traceability.

What metadata is included when backing up session transcripts?

Transcript backups include a JSON metadata file containing the timestamp, trigger type, branch, and last_commit information, providing full traceability and an audit trail for each saved session state.

Does the transcript backup process support auditing and traceability?

Yes, transcript backups support auditing by writing a JSON metadata file alongside each backup that records the timestamp, trigger, branch, and last_commit, creating a complete audit trail for session state.