一键导入
source-command-compress-memory
Archive finished tasks, snapshot active memory, keep AGENTS.md under 40k chars
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Archive finished tasks, snapshot active memory, keep AGENTS.md under 40k chars
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | source-command-compress-memory |
| description | Archive finished tasks, snapshot active memory, keep AGENTS.md under 40k chars |
Use this skill when the user asks to run the migrated source command compress-memory.
Perform a memory compression pass on this project. Work through the four steps below in order. Report results at the end — do not ask for confirmation between steps.
Read AGENTS.md and count its characters (wc -c AGENTS.md).
AGENTS.md instead of to a .Codex/rules/ file, move them, and replace with a @.Codex/rules/<file>.md pointer. Target: back under 40,000 chars.Read .Codex/rules/roadmap-todo.md.
Find all items that are unambiguously done — marked with strikethrough (~~...~~), labelled RESOLVED, IMPLEMENTED, DONE, or already present in the codebase with no remaining action.
Move them to .Codex/rules/archive.md under a heading:
## Archived <YYYY-MM-DD>
Append to the file if it already exists; create it if it does not.
Remove the moved items from roadmap-todo.md. Do not remove items that are partially done or still have sub-tasks open.
Read MEMORY.md (the project memory index at /Users/jens/.Codex/projects/-Users-jens-develop-geberit-aquaclean/memory/MEMORY.md).
For each linked memory file:
.Codex/rules/ verbatim, remove the memory file and its MEMORY.md index entry.AGENTS.md or a rules file (e.g. a feedback rule that became a mandatory rule), remove it from MEMORY.md and its file.After pruning, write a one-line snapshot entry to .Codex/rules/archive.md:
## Memory snapshot <YYYY-MM-DD>
Active memory entries: N | Pruned: M | Snapshot taken by /compress-memory
Print a concise summary:
/compress-memory results
========================
AGENTS.md: <before> chars → <after> chars (limit: 40,000)
Tasks archived: N items moved to .Codex/rules/archive.md
Memory pruned: M entries removed from MEMORY.md
Files modified: list them
If nothing needed changing in a step, say so explicitly (e.g. "AGENTS.md: 3001 chars — within limit, no change").