context-compaction-verification-and-recovery

context-compaction-verification-and-recovery is a skill for Claude Code, Codex from ChrisLamDev/hermes-core-skills. It costs 21 tokens per session (2,695 once invoked), scanned A, original, MIT.

A verification procedure for checking whether file-changing tool commands really ran after the agent’s context was shortened or reorganized. Context compaction is when earlier conversation details are condensed to make room for more work.

In plain words
What is it for?
Use it after several patch or file-creation commands, after context compaction, or when a page or reported change is missing.
Why use it?
An agent may describe a change without actually applying it, especially after context compaction. This procedure helps detect and recover from that mismatch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it after several patch or file-creation commands, after context compaction, or when a page or reported change is missing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chrislamdev/hermes-core-skills/context-compaction-verification-and-recovery
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 ChrisLamDev/hermes-core-skills --skill context-compaction-verification-and-recovery
Clone the repo
git clone --depth 1 https://github.com/ChrisLamDev/hermes-core-skills

Made for: Claude Code, Codex.

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 context-compaction-verification-and-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/chrislamdev/hermes-core-skills/context-compaction-verification-and-recovery/github.svg)](https://agentmods.dev/skills/chrislamdev/hermes-core-skills/context-compaction-verification-and-recovery)
Your own site
<a href="https://agentmods.dev/skills/chrislamdev/hermes-core-skills/context-compaction-verification-and-recovery"><img src="https://agentmods.dev/badge/skills/chrislamdev/hermes-core-skills/context-compaction-verification-and-recovery/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 context-compaction-verification-and-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/chrislamdev/hermes-core-skills/context-compaction-verification-and-recovery"><img src="https://agentmods.dev/badge/skills/chrislamdev/hermes-core-skills/context-compaction-verification-and-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,695 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.00021 $0.02695
Opus 5 $0.00010 $0.01347
Sonnet 5 $0.00004 $0.00539
Haiku 4.5 $0.00002 $0.00269

Measured 11d ago against content hash f7274e494a59, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

context-compaction-verification-and-recovery 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 11d 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.

skills/context-compaction-verification-and-recovery/SKILL.md · 225 lines

How it starts

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

Context Compaction Verification & Recovery Protocol

When to Use

Use this protocol when:

  1. You've issued multiple patch, write_file, or create_file calls in a session
  2. Context compaction has occurred (handoff summary mentions "completed" work)
  3. User reports "偏翼唔到出嚟" (page doesn't render / doesn't work)
  4. You suspect some tool calls were "spoken but not executed" — written in responses but not actually made

Core Insight

Tool calls that exist only in your reply text but weren't actually invoked will NOT have modified any files. This is the most common failure mode during complex multi-step sessions across context compactions.

Pattern: AI describes what it will do in markdown text blocks, the user says "繼續", and in the next turn the AI treats that description as already done without having made the actual tool calls.

Warning Signs of Compaction-Induced Drift

These patterns strongly suggest patches never landed:

  1. Deferred tool calls — you say "first I'll X, then Y" in prose, then move on without actually calling the tools
  2. "As mentioned above" syndrome — you reference code that was typed in your response but never written to disk
  3. Excessive prose descriptions of code — if you're describing implementation in detail rather than doing it, check if tools were actually called
  4. User says it doesn't render after you think you've finished — this is the ultimate signal

Prevention: The "Did the tool fire?" Check

Before any "繼續" transition, mentally scan: for every file I claim to have modified, did I actually see a patch() or write_file() success response in my tool output? If you only remember typing it in prose, it didn't happen.

Step 1: Audit — File Existence Check

Before any repairs, run a comprehensive audit:

# Find all NEW files that should exist
# Check each one with ls or search_files

Key files to verify:

  • New utility files (utils/*.js)
  • New page directories (pages/*/)
  • New component files

Read the full file on GitHub · 225 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. 11d ago First seen · 225 lines · 21 tokens per session scan A f7274e494a59

Subscribe to this mod's changes

context-compaction-verification-and-recovery is a skill published in the GitHub repository ChrisLamDev/hermes-core-skills (9 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 2,695 once invoked, about $0.0001 per session on Opus 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-08-31.