compact-s

compact-s is a skill for Claude Code from 0fuk/OpenACCP. It costs 120 tokens per session (2,210 once invoked), scanned A, original, MIT.

A context-saving procedure that writes important conversation state to a checkpoint file before context is shortened. Context shortening removes older conversation detail to make room for more work.

In plain words
What is it for?
Saving owner decisions, acceptance rules, active tasks, wake-up arrangements, and key paths before and after context compaction.
Why use it?
It reduces the risk of losing decisions, goals, file paths, and unfinished work when a long session is compacted.

Skill for Claude Code

Written for Claude Code: PreCompact hook event. Also seen: reads .claude/ paths.

Good fit Saving owner decisions, acceptance rules, active tasks, wake-up arrangements, and key paths before and after context compaction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0fuk/openaccp/compact-s
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 0fuk/OpenACCP --skill compact-s
Clone the repo
git clone --depth 1 https://github.com/0fuk/OpenACCP

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compact-s

README.md
[![agentmods](https://agentmods.dev/badge/skills/0fuk/openaccp/compact-s/github.svg)](https://agentmods.dev/skills/0fuk/openaccp/compact-s)
Your own site
<a href="https://agentmods.dev/skills/0fuk/openaccp/compact-s"><img src="https://agentmods.dev/badge/skills/0fuk/openaccp/compact-s/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for compact-s

Your own site · 80×15
<a href="https://agentmods.dev/skills/0fuk/openaccp/compact-s"><img src="https://agentmods.dev/badge/skills/0fuk/openaccp/compact-s.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,210 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.02210
Opus 5.5 $0.00048 $0.00884
Sonnet 5.5 $0.00024 $0.00442
Haiku 4.5 $0.00012 $0.00221

Measured 2d ago against content hash f5d9d977d09a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

compact-s scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

field/skills/compact-s/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/compact-s — 先外置,再压缩:compact 不再丢东西

平台自动 compact 是盲目摘要——owner 原话被压成「做了一些决定」。本 skill 不挑刺复核 compact,而是让它无所谓:凡只活在对话里的高价值状态,先高保真落盘。项目事实(协调目录/台账路径)读项目根 PROJECT-PROFILE.md。

0 · 判据:什么进 checkpoint

唯一标准:这条信息是否只存在于本会话对话流里? 已落台账/memory/协调目录的只登记路径+一句钩子;本会话新发生未外置的逐字转录;判断不了当作只在对话里。

1 · Checkpoint(固定结构,高保真区禁摘要)

路径:值守项目=<coordination>/<角色>-COMPACT-CHECKPOINT-<YYYYMMDD-HHMM>.md;非项目会话=args 指定目录或 ~/.claude/compact-checkpoints/<cwd-slug>-<时间戳>.md。

  1. owner 决策:本会话每次拍板/裁决/授权的原话+时刻;已入台账的只记条号+路径。
  2. 编排计划与目标态:值守计划/交接件的目标态原文+路径;基面 SHA/tag/冻结态等会话内刚更新的数字;走五门发版范式的项目必写当前门次:本车在第几门、哪些卡缺哪一门、五门台账(工单集)绝对路径——compact 后第一动作就靠这行定位。
  3. 验收目标与宪法级判准:硬门清单+「合流≠验收/回归门≠决策完成度」类判准原文+出处。
  4. 关键文件路径:本会话读过/写过的载重文件绝对路径,一行一个+一句说明。
  5. 在飞与叫醒:在飞表(开放目标 + 执行体:子代理写 agentId 与 output 文件路径,跨会话写会话名与候回执件名 + 最近动作 mtime)+ 已挂 ScheduleWakeup 的时刻与 prompt 原文(没挂 = 违规,先挂再压)+ 本窗跑偏 / 违规记录。叫醒机制只认两种:子代理完成通知 / 跨会话直推(主信号)与 ScheduleWakeup(兜底);Monitor 文件信箱仅在项目仍用它时登记。

可压缩区:一段话列出可被摘要压掉的工程往返(已固化的命令输出/报错现场)。 纪律:零编造;记不清原话就 Read 回原件;写不满如实写「无此类增量」。

2 · 压缩(checkpoint 落盘并亲验之后)

  1. ls/Read 回首尾亲验。
  2. /compact 是否吃自定义指引因版本而异,现场验证;不确定就普通 compact,checkpoint 在盲压也不丢。
  3. 模型不能自己执行 /compact;自动 compact 逼近时不等 owner,立刻落 checkpoint。

2.5 · 固定交付:两段可粘贴 prompt(回复末尾原样给出,尖括号换真值,不加解释;20261010 修订)

A. compact 指引(给平台的压缩指令:只说留什么、压什么,一行)

/compact 保留:owner 决策原话与时刻;当前门次 + 基面 SHA/tag;在飞子代理 agentId 与其 output 文件路径、在飞跨会话令与候回执件名;已挂 ScheduleWakeup 时刻;验收硬门原文;关键文件绝对路径。可压:已固化进文件的命令输出 / 报错现场 / 被拦细节 / 已收货的交回正文。checkpoint=<checkpoint 绝对路径>

B. compact 后启动短 prompt(给自己的第一条指令:先定位、再看活性、再挂表、再干活;不重做一次性 setup)

你是 <角色>。按序做,不问我:① date;全文读 <checkpoint 绝对路径>,摘要与它冲突以它为准。② 按 checkpoint 时刻前 30 分钟至今的 mtime 窗口 ls 文件信箱,逐件补收。③ 列在飞执行体:每个子代理 ls 其 output 文件 mtime、每条跨会话令 ls 其回执 / 进行中件 mtime;> 30 分钟无变化的按 /keep-pushing §7 停掉重派;然后挂 ≤ 30 分钟 ScheduleWakeup。④ 读五门台账定位门次。⑤ 向我发一条「记忆恢复确认」(人话,≤ 8 行):当前目标链(到哪一门、下一步是什么、终点是什么)、在飞几人各几分钟没动、候我的事(没有就写没有)、第一批动作头三条;与 checkpoint 对不上的地方如实标出。⑥ 不等我回复,按 checkpoint「compact 后第一批动作」逐条执行。不重跑已做过的一次性动作(建 Monitor、写值守计划、通告 lane)。

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 55 lines · 120 tokens per session scan A f5d9d977d09a

Subscribe to this mod's changes

compact-s is a skill published in the GitHub repository 0fuk/OpenACCP (2 stars, last pushed 2d ago), licensed MIT. It adds 120 tokens to every session and 2,210 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

Other skills, from other repositories

hive-mind-advanced

Queen-led collective-intelligence coordination with consensus mechanisms and persistent shared memory. Use when orchestrating a large swarm of agents under a lead coordinator, building consensus across agents, or maintaining durable cross-agent memory.

frankxai/claude-skills-library · 47 tokens

sema-usage

Content-addressed vocabulary protocol via the sema MCP server. Use when reasoning through a problem that a named pattern could structure, such as a decision, design, diagnosis, forecast or disagreement, and when working with shared vocabulary: searching, resolving, minting, and verifying meaning across agents and…

emergent-wisdom/sema · 68 tokens

hive-mind-advanced

Advanced Hive Mind collective intelligence system for queen-led multi-agent coordination with consensus mechanisms and persistent memory.

ruvnet/agentic-flow · 25 tokens

cross-agent-handoff

Transfer context between AI agent sessions with structured handoff protocols, state serialization, and decision log preservation. Covers multi-agent coordination, context compression, and continuity patterns. Triggers on agent handoff, session transfer, or multi-agent continuity requests.

organvm-iv-taxis/a-i--skills · 53 tokens

hive-mind-advanced

Advanced Hive Mind collective intelligence system for queen-led multi-agent coordination with consensus mechanisms and persistent memory.

foryourhealth111-pixel/Vibe-Skills · 25 tokens

handoff-mesh

Built-in communication layer for multi-agent setups. Full-mesh handoff folders (any agent can hand off to any other), an hourly watcher that surfaces open handoffs, weekly archive cleanup, and a completion-reporting loop so every handoff is handled AND verified. The durable 'brain' counterpart to real-time channels…

Gentech-Labs/genTech-agent-kit · 71 tokens