state-reconciliation

state-reconciliation is a skill for Claude Code from naimkatiman/continuous-improvement. It costs 71 tokens per session (989 once invoked), scanned A, original, MIT.

A skill that checks whether the database, files on disk, and in-memory records agree before an automated unit runs.

In plain words
What is it for?
Use it before verification loops, after crashes or pauses, and when completion flags, locks, or worker records may be out of sync.
Why use it?
It prevents completed work from being run again because one state record is stale or missing.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the continuous-improvement plugin — 27 skills, 6 hooks shipped together

Good fit Use it before verification loops, after crashes or pauses, and when completion flags, locks, or worker records may be out of sync.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/naimkatiman/continuous-improvement/state-reconciliation
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 naimkatiman/continuous-improvement --skill state-reconciliation
Clone the repo
git clone --depth 1 https://github.com/naimkatiman/continuous-improvement

Made for: Claude Code.

Or install continuous-improvement, the plugin that ships this one along with the rest of its 27 skills, 6 hooks.

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 state-reconciliation

README.md
[![agentmods](https://agentmods.dev/badge/skills/naimkatiman/continuous-improvement/state-reconciliation/github.svg)](https://agentmods.dev/skills/naimkatiman/continuous-improvement/state-reconciliation)
Your own site
<a href="https://agentmods.dev/skills/naimkatiman/continuous-improvement/state-reconciliation"><img src="https://agentmods.dev/badge/skills/naimkatiman/continuous-improvement/state-reconciliation/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 state-reconciliation

Your own site · 80×15
<a href="https://agentmods.dev/skills/naimkatiman/continuous-improvement/state-reconciliation"><img src="https://agentmods.dev/badge/skills/naimkatiman/continuous-improvement/state-reconciliation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 989 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00071 $0.00989
Opus 5 $0.00036 $0.00495
Sonnet 5 $0.00014 $0.00198
Haiku 4.5 $0.00007 $0.00099

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

Security

Grade A, and why

state-reconciliation 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 8d 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.

plugins/continuous-improvement/skills/state-reconciliation/SKILL.md · 65 lines

How it starts

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

State Reconciliation Skill

A pre-dispatch invariant. Before the verification ladder runs (or any auto-loop unit dispatches), reconcile the three state sources — DB / disk / in-memory — and surface any divergence as a blocker, not a silent re-dispatch.

When to Use

  • Before Phase 1 of verification-loop if the project tracks runtime state outside source control (sqlite, KV, redis, completed-units.json, milestone JSON, lockfiles).
  • Before any auto-loop iteration in long-running sessions.
  • After a crash, pause/resume, or context compaction — the in-memory loop state is gone but DB and disk persist.
  • When a flag like is_sketch, in_progress, or a stale lock keeps re-firing the same unit.

Why This Skill Exists

GSD-2's CONTEXT.md names "State Reconciliation" as one of four runtime invariant modules. Common failure modes it catches:

  • Stale flags re-dispatch completed unitsis_sketch, stale worker rows, stale sequence/dependency rows that no one cleared.
  • Disk artifacts present, DB status lagsPROJECT.md milestone registration, completion timestamps, roadmap divergence.
  • Recovery helpers exist but aren't wired into dispatch — divergence accrues silently between iterations.

A verification ladder that runs against unreconciled state reports green on the wrong inputs.

The Reconciliation Contract

For every state class the project tracks, define and run before dispatch:

  1. Authority — which surface is the source of truth (DB, disk artifact, in-memory loop state).
  2. Projection — direction of state flow (DB → disk, disk → DB, or both with a named winner).
  3. Reconciliation — the deterministic check that proves authority and projection match.
  4. Failure mode — what happens on divergence (block dispatch, repair, ask operator).

Output a single fenced block before any dispatch, so the operator sees the resolved state before it costs a misread:

state-reconciliation (resolved):
  participants table:        DB authoritative; disk projection at data/participants.json — match (1247 rows)
  completed_units.json:      project root authoritative after crash; worktree projection — match
  is_sketch flag:            DB authoritative — clear (no re-dispatch risk)
  open lock at /tmp/foo.lck: stale (PID 1234 not running) — STALE, blocks dispatch
  milestone registration:    PROJECT.md authoritative; DB row — DIVERGED (DB shows in_progress, disk shows complete)

Read the full file on GitHub · 65 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. 8d ago First seen · 65 lines · 71 tokens per session scan A e3430d5ed3f6

Subscribe to this mod's changes

state-reconciliation is a skill published in the GitHub repository naimkatiman/continuous-improvement (7 stars, last pushed 2d ago), licensed MIT. It adds 71 tokens to every session and 989 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

ml-debug

Use when something is failing in ML/AI work — OOM, NaN, divergence, crashes, bad throughput, wrong outputs, dependency conflicts.

Leeroo-AI/superml · 32 tokens

agent-pitbook

Search and contribute to Agent Pitbook, a structured debugging pit knowledge base for coding agents. Use when Codex is diagnosing recurring local-development failures, sandbox issues, dependency installation errors, Docker or port problems, MCP/tool quirks, browser automation failures, or when a verified debugging…

laozhangzzz/agent-pitbook · 70 tokens

sglang-diffusion-benchmark-profile

Use when benchmarking denoise latency or profiling a diffusion bottleneck in SGLang.

sgl-project/sglang · 26 tokens

smiles-validation

Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.

synthetic-sciences/openscience · 24 tokens

binary-triage

Performs initial binary triage by surveying memory layout, strings, imports/exports, and functions to quickly understand what a binary does and identify suspicious behavior. Use when first examining a binary, when user asks to triage/survey/analyze a program, or wants an overview before deeper reverse engineering.

cyberkaida/reverse-engineering-assistant · 65 tokens

quota-debug

Diagnose Kubernetes native ResourceQuota and LimitRange admission rejections (exceeded quota, forbidden by LimitRange, FailedCreate). Checks namespace quotas, current usage, LimitRange constraints, and ReplicaSet events to identify why pods cannot be created. Not applicable to Volcano Queue — use…

scitix/siclaw · 69 tokens