nap
GitHub清理和压缩代理工作区上下文,包括压缩历史记录、修剪旧日志、归档过时决策及清理孤立文件。在上下文窗口紧张或会话过长时使用,以释放资源并优化状态。
Trigger Scenarios
历史文件超过15KB
工作区总大小超过1MB
启动大量代理前
长会话结束后
Install
npx skills add microsoft/Generative-AI-for-beginners-dotnet --skill nap -g -y
SKILL.md
Frontmatter
{
"name": "nap",
"domain": "maintenance",
"source": "extracted",
"confidence": "medium",
"description": "Context hygiene — compress, prune, archive .squad\/ state"
}
Skill: nap
Context hygiene — compress, prune, archive .squad/ state
What It Does
Reclaims context window budget by compressing agent histories, pruning old logs, archiving stale decisions, and cleaning orphaned inbox files.
When To Use
- Before heavy fan-out work (many agents will spawn)
- When history.md files exceed 15KB
- When .squad/ total size exceeds 1MB
- After long-running sessions or sprints
Invocation
- CLI:
squad nap/squad nap --deep/squad nap --dry-run - REPL:
/nap//nap --dry-run//nap --deep
Confidence
medium — Confirmed by team vote (4-1) and initial implementation
Version History
- bd4e082 Current 2026-08-20 14:06


