consolidate-state

consolidate-state is a skill for Claude Code, Codex from dnlbox/ai-protocol. It costs 21 tokens per session (350 once invoked), scanned A, original, MIT.

A procedure for repairing BUILD_STATE.md, a project file that records the current build status, when it is outdated, contradictory, or too large to scan.

In plain words
What is it for?
Reconciling the status file with Git history, tests, and the running product; preserving unresolved issues; and removing completed procedural detail.
Why use it?
It keeps the recorded project state aligned with verified code, validation results, runtime information, ownership, and the next meaningful action.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Reconciling the status file with Git history, tests, and the running product; preserving unresolved issues; and removing completed procedural detail.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dnlbox/ai-protocol/consolidate-state"><img src="https://agentmods.dev/badge/skills/dnlbox/ai-protocol/consolidate-state.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 350 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.00350
Opus 5.5 $0.00008 $0.00140
Sonnet 5.5 $0.00004 $0.00070
Haiku 4.5 $0.00002 $0.00035

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

Security

Grade A, and why

consolidate-state 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 1mo 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.

.agents/skills/consolidate-state/SKILL.md · 55 lines

What it actually says

Consolidate state

Use this skill when the user requests state consolidation.

Use this skill when BUILD_STATE.md contradicts verified reality.

Use this skill when the current state no longer fits one screen.

Do not invoke this skill on a fixed packet cadence.

Reconciliation

  • Compare BUILD_STATE.md with recent git history.
  • Compare BUILD_STATE.md with current validation evidence.
  • Compare BUILD_STATE.md with the running product when practical.
  • Resolve current-state contradictions in favour of verified reality.
  • Preserve material unresolved findings.
  • Preserve the current approved objective.
  • Preserve active ownership.
  • Preserve the next meaningful action.
  • Remove completed procedural detail.
  • Rely on git history for completed implementation detail.
  • Move older milestone summaries to Archive only when they remain useful.

Runtime state

  • Treat a declared runtime ledger as authoritative for live worker state.
  • Treat repository evidence as authoritative for implemented behaviour.
  • Pause dispatch when runtime state contradicts repository evidence.
  • Reconcile the contradiction before updating durable state.
  • Keep live worker telemetry out of BUILD_STATE.md.

Result

  • Keep Now within one screen.
  • Keep one current objective in Now.
  • Keep one next meaningful action in Now.
  • Keep only material current decisions.
  • Keep only material current blockers.
  • Keep the execution frontier compact when one exists.
  • Apply the consolidation within the approved objective.
  • Report the resulting state boundary.

Boundaries

  • Avoid changing accepted product intent.
  • Avoid changing execution strategy.
  • Avoid editing protocol files.
  • Avoid reporting consolidation as implementation progress.
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. 1mo ago First seen · 55 lines · 21 tokens per session scan A f7b5438d3d2a

Subscribe to this mod's changes

consolidate-state is a skill published in the GitHub repository dnlbox/ai-protocol (19 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 350 once invoked, about $0.0001 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-08-30.

Related

Other skills, from other repositories

managing-mcp-servers

Use when the user asks to add, change, remove, enable or disable an MCP server, or when an MCP tool is missing, needs sign-in, fails, or was blocked. ThinkRail runs pi in-process, so there is no pi command to call.

JetBrains/thinkrail · 62 tokens

todos

Use when the user asks for a shared plan, a task needs at least three substantive execution steps, or a loose TODO is pending. Without an explicit plan request, not for one-shot answers or checks, or one- to two-step work that is not already in the list.

JetBrains/thinkrail · 58 tokens

writing-workflow-skills

Use when adding a new workflow skill to pi-thinkrail-workflow, changing an existing workflow skill's role, trigger, handoff, or structure, or checking a workflow skill against the workflow system's rules. Not for authoring general-purpose skills outside this package.

JetBrains/thinkrail · 60 tokens

writing-specs

Use when a workflow step drafts or revises a spec artifact — a goal-and-requirements, an architecture, or a module SPEC — or when a workflow skill names it at such a step. The shared quality bar for specs — not a workflow, nothing to execute.

JetBrains/thinkrail · 59 tokens

animate

Build a web animation: whether it should animate at all, the purpose, the tool, the properties, the easing curve, the duration, interruption and exit. Writes the CSS or Motion code for dropdowns, modals, toasts, tooltips, accordions, press feedback, stagger and scroll reveals. Use to animate something or make a…

ericrisco/rsc-harness · 75 tokens

postgresdb

Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…

ericrisco/rsc-harness · 91 tokens