Claude-Book: Agent for Claude Code

.claude/agents/state-updater.md

state-updater is an agent for Claude Code from ThomasHoussin/Claude-Book. It costs 379 tokens per session (1,601 once invoked), scanned A, original, MIT.

An agent that records changes in a validated story chapter into structured continuity files. It tracks characters, events, relationships, new information, tension, and unresolved story threads.

In plain words
What is it for?
Use it after reviewers approve a chapter to update locations, emotions, goals, relationships, timeline details, stakes, and open narrative hooks.
Why use it?
It keeps later chapters aligned with what has already happened and preserves a reliable record of the story's evolving state.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is ThomasHoussin/Claude-Book's own configuration. It tells Claude Code how to work on Claude-Book itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Claude-Book configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ThomasHoussin/Claude-Book. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ThomasHoussin/Claude-Book/main/.claude/agents/state-updater.md
Clone the repo
git clone --depth 1 https://github.com/ThomasHoussin/Claude-Book

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/thomashoussin/claude-book/state-updater/github.svg)](https://agentmods.dev/agents/thomashoussin/claude-book/state-updater)
Your own site
<a href="https://agentmods.dev/agents/thomashoussin/claude-book/state-updater"><img src="https://agentmods.dev/badge/agents/thomashoussin/claude-book/state-updater/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-updater

Your own site · 80×15
<a href="https://agentmods.dev/agents/thomashoussin/claude-book/state-updater"><img src="https://agentmods.dev/badge/agents/thomashoussin/claude-book/state-updater.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 379 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,601 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.00379 $0.01601
Opus 5.5 $0.00152 $0.00640
Sonnet 5.5 $0.00076 $0.00320
Haiku 4.5 $0.00038 $0.00160

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

Security

Grade A, and why

state-updater 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.

.claude/agents/state-updater.md · 163 lines

How it starts

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

You are an expert narrative state analyst specializing in tracking story progression and maintaining precise continuity records. Your role is to extract every meaningful state change from validated chapters and translate them into structured, consistent state files that will guide future writing.

Your Core Mission

After each validated chapter, you meticulously analyze the text to identify:

  • Changes in character locations, emotions, goals, and relationships
  • New information revealed (to characters or readers)
  • Timeline progression and key events
  • Shifts in tension, atmosphere, and dramatic stakes
  • Open narrative hooks requiring future resolution

Input You Receive

  1. The validated chapter text
  2. Previous state files from state/current/* directory
  3. The current timeline/current-chapter.md

Execution Steps

IMPORTANT: You must follow this exact workflow to avoid corrupting historical state.

  1. Determine chapter number (NN) from the validated chapter title/header
  2. Create directory: state/chapter-NN/
  3. Write all 4 state files in that NEW directory (not in state/current/)
  4. Remove old symlink: state/current
  5. Create new symlink: state/current → state/chapter-NN
  6. Append events to timeline/current-chapter.md

Your Output Requirements

You must produce updates for all files in English (state files are technical documentation):

1. Create directory state/chapter-NN/

First, create the new chapter directory where NN is the zero-padded chapter number (e.g., chapter-05, chapter-12).

2. state/chapter-NN/situation.md (CREATE)

# Current situation - After chapter [X]

## Immediate context
- Time: [specific time of day/night, day of week if known]
- Location: [precise location where the chapter ends]
- Weather/atmosphere: [environmental conditions, mood]
- Tension level: [1-10 with brief justification]

## What just happened
[2-3 sentence summary of chapter's key events]

## Immediate problem
[The pressing issue characters face as chapter closes]

## Open hooks
- [Unresolved plot thread 1]
- [Unresolved plot thread 2]
- [Add more as needed]

Read the full file on GitHub · 163 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. 1mo ago First seen · 163 lines · 0 tokens per session scan A 921f72e69a9d

Subscribe to this mod's changes

state-updater is an agent published in the GitHub repository ThomasHoussin/Claude-Book (129 stars, last pushed 9mo ago), licensed MIT. It adds 379 tokens to every session and 1,601 once invoked, about $0.0015 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 agents, from other repositories

post-editese-metric-engineer

A measurement tool for studying Korean writing patterns linked to post-editese, meaning wording that becomes simplified, standardized, or shaped by English sentence patterns during editing. It adds these measurements and eight detection signals to an existing metrics file.

epoko77-ai/im-not-ai · 158 tokens

translationese-research-distiller

A Korean-language research extraction role that breaks an academic report about translation patterns into structured facts, examples, and editing checklists.

epoko77-ai/im-not-ai · 198 tokens

taxonomy-gap-analyzer

An analysis agent for comparing outside research patterns with an existing Korean AI-writing classification system. It records whether each pattern is already covered, partly covered, or new.

epoko77-ai/im-not-ai · 142 tokens

korean-ai-tell-taxonomist

A specialist agent that maintains a classification system for patterns that can make Korean writing look AI-generated. It reviews observed examples, assigns categories and severity levels, and manages taxonomy versions.

epoko77-ai/im-not-ai · 90 tokens

patina-fidelity-auditor

Triggers to audit whether a patina rewrite preserved meaning versus the original text. Invoke this agent after a rewrite is produced; provide both the ORIGINAL and the REWRITE. It checks all four fidelity criteria from core/scoring.md §§9-14 (claims, fabrication, audience/register, length) and returns a…

devswha/patina · 80 tokens

plan-checker

Reviews a unit plan for completeness and craft soundness before drafting begins. Catches gaps, contradictions, and weak spots.

hannsxpeter/scriveno · 28 tokens