nap

Compresses agent histories, prunes logs, and archives stale .squad state files.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/codebytes/btt --skill nap-codebytes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nap
Source: https://github.com/codebytes/btt/tree/main/.squad/templates/skills/nap
Command: npx skills add https://github.com/codebytes/btt --skill nap-codebytes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long-running agent sessions accumulate oversized history files, stale decisions, and orphaned inbox files that consume context window budget and slow down multi-agent workflows. ## Core Features & Use Cases - History Compression: Compresses agent history.md files that exceed 15KB to reclaim context budget. - State Pruning & Archiving: Prunes old logs, archives stale decisions, and cleans orphaned inbox files when .squad/ exceeds 1MB. - Dry-Run & Deep Modes: Preview changes with --dry-run or perform thorough cleanup with --deep. - Use Case: Before spawning many agents for a fan-out task, run a cleanup pass so each new agent starts with a lean, well-organized .squad/ state directory. ## Quick Start Run the squad nap command with the dry-run flag to preview which history files, logs, and inbox files would be compressed or archived.

Frequently Asked Questions about nap

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

FAQPage Schema
How do I clean up .squad state files before spawning agents?

Run squad nap from the CLI or /nap from the REPL to compress histories, prune logs, and clean orphaned inbox files. Use the --dry-run flag first to preview what will change before applying it.

When should I run context hygiene on agent state?

Run it before heavy fan-out work where many agents will spawn, when history.md files exceed 15KB, when the .squad directory exceeds 1MB, or after long-running sessions and sprints.

What is the difference between squad nap and squad nap --deep?

The default squad nap performs standard compression and pruning of agent state. The --deep flag triggers a more thorough cleanup pass for heavily accumulated state, while --dry-run previews changes without applying them.

Can I preview cleanup changes before deleting agent history?

Yes, both the CLI and REPL support a dry-run mode via squad nap --dry-run or /nap --dry-run. This shows which files would be compressed, pruned, or archived without modifying any state.

Does the nap cleanup delete decision records permanently?

Stale decisions are archived rather than deleted outright, and old logs are pruned according to the cleanup rules. Use --dry-run to confirm exactly which items are affected before committing to a run.