nap
GitHub清理和压缩代理上下文,通过归档旧日志、修剪历史文件和清理孤立文件来释放上下文窗口预算。适用于会话过长或状态目录过大时,以优化系统性能。
Trigger Scenarios
history.md 超过 15KB
.squad/ 总大小超过 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


