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).

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.

agentmods
npx agentmods add skills/dnlbox/ai-protocol/consolidate-state
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00010 $0.00175
Sonnet 5 $0.00004 $0.00070
Haiku 4.5 $0.00002 $0.00035

Measured 6d ago against content hash f7b5438d3d2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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. 6d 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 27d ago), licensed MIT. It adds 21 tokens to every session and 350 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-30.

Related

Other skills, from other repositories

moai-workflow-worktree

Git worktree management for parallel SPEC development with isolated workspaces, automatic branch registration, and seamless MoAI-ADK integration. Use when setting up parallel development environments.

modu-ai/moai-adk · 41 tokens

moai-kanban-foreman

One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 76 tokens

moai-workflow-thinking

Sequential Thinking MCP for structured step-by-step analysis via --deepthink flag. Separate from UltraThink which is Claude's native extended reasoning mode. Use for multi-step analysis or architecture decisions.

modu-ai/moai-adk · 43 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

moai-domain-uiux

UI/UX design systems specialist covering accessibility, icons, theming, design tokens, and user experience patterns. Use when working on design systems, WCAG compliance, ARIA patterns, or dark mode theming.

modu-ai/moai-adk · 49 tokens

todos

This chat has a shared, live TODO plan — your tasks for the conversation, which the user also edits. Read this skill and reach for the todo tools whenever a request takes more than a couple of steps. It covers the plan model (group = task, items = its steps; loose items are the user's lane), how to work it: propose…

JetBrains/thinkrail · 127 tokens