history-pruner
OfficialTrim Claude Code history to reclaim disk space.
AuthorFolly-Partners
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Prunes old Claude Code conversation history to save disk space by trimming large JSONL files and old thinking blocks.
Core Features & Use Cases
- Conservative pruning: Keeps the last 7 days of history and truncates tool results to 500 characters for older entries.
- Aggressive pruning: Keeps the last 3 days and removes tool_results content entirely for older entries, plus pruning thinking blocks and old file-history snapshots.
- Automation & safety: Backups created before pruning; supports dry-run mode and manual pruning steps.
- Use Case: Maintain lean local Claude Code histories across multiple Macs to prevent disk bloat when syncing.
Quick Start
Check current sizes: du -sh ~/.claude/projects/**/*.jsonl | sort -hr | head -10 Run pruning: ~/.claude/plugins/marketplaces/Folly/skills/history-pruner/prune-history.sh [conservative|aggressive] Dry run: ~/.claude/plugins/marketplaces/Folly/skills/history-pruner/prune-history.sh --dry-run
Dependency Matrix
Required Modules
jq
Components
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: history-pruner Download link: https://github.com/Folly-Partners/claudesync/archive/main.zip#history-pruner Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.