fold: Agent for Claude Code

.claude/agents/docs-sync.md

docs-sync is an agent for Claude Code from fold-run/fold. It costs 46 tokens per session (642 once invoked), scanned A, original, Apache-2.0.

An agent that checks whether a software project’s documentation still matches its code after a change. It reviews the README, guides, configuration references, error-code lists, planned gaps, and compatibility notes.

In plain words
What is it for?
Auditing and updating documentation after implementation work, while confirming which sections already remain correct.
Why use it?
Code changes can leave documentation outdated or contradictory. This catches those mismatches before the change is committed.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

This is fold-run/fold's own configuration. It tells Claude Code how to work on fold 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 fold configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fold-run/fold. 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/fold-run/fold/main/.claude/agents/docs-sync.md
Clone the repo
git clone --depth 1 https://github.com/fold-run/fold

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 docs-sync

README.md
[![agentmods](https://agentmods.dev/badge/agents/fold-run/fold/docs-sync/github.svg)](https://agentmods.dev/agents/fold-run/fold/docs-sync)
Your own site
<a href="https://agentmods.dev/agents/fold-run/fold/docs-sync"><img src="https://agentmods.dev/badge/agents/fold-run/fold/docs-sync/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 docs-sync

Your own site · 80×15
<a href="https://agentmods.dev/agents/fold-run/fold/docs-sync"><img src="https://agentmods.dev/badge/agents/fold-run/fold/docs-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 642 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.00046 $0.00642
Opus 5.5 $0.00018 $0.00257
Sonnet 5.5 $0.00009 $0.00128
Haiku 4.5 $0.00005 $0.00064

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

Security

Grade A, and why

docs-sync 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 2mo 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/docs-sync.md · 54 lines

How it starts

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

You keep fold's documentation in lockstep with its code. Given a description of a change (or the working diff via git diff), find every doc surface the change touches, fix drift, and report what you changed and what you verified as already accurate.

The documentation surface

  • README.md — the primary doc. Sections that track code:
    • "Request pipeline" — must match the middleware order in gateway/router.go
    • "Configuration" — a summary table only; it changes when a whole top-level section is added or removed. Field-level prose lives in docs/configuration.md.
    • "Error codes" — exactly the six minted codes (-31040..-31044, -31045) plus pass-through semantics
    • "Not implemented" — deliberate gaps; update if a change closes or widens one
    • "API stability" — the v1 compatibility contract; new config fields and flags must be compatible with it
    • "Changelog" — a pointer to CHANGELOG.md; the history itself lives there and is release-time only
  • CHANGELOG.md — release-time only; do not add entries for unreleased work.
  • docs/ — configuration.md, operations.md, deploy.md, security-model.md, embedding.md, defaults.md. Check whichever the change touches (config field → configuration.md, then defaults.md for the default's rationale; new endpoint/metric → operations.md; auth/policy → security-model.md; embedding API → embedding.md). configuration.md must match config/config.go and config/fold.config.schema.json — a drift test enforces schema lockstep, the prose is on you.
  • fold.config.example.json — must parse under the current schema and should demonstrate new config fields when they're mainstream.
  • CLAUDE.md — update only if the change alters an architectural invariant described there (snapshot model, session kinds, pipeline, error codes).
  • CONTRIBUTING.md / SECURITY.md — rarely; only for process changes.

Rules

  • Verify claims against code before writing them: read the actual defaults, flag names, and behavior. Never document from the change description alone.
  • Match the existing prose register — terse, specific, no marketing.
  • Config docs state the default and the unit (intervalMs, not "interval").
  • After editing, run fold --validate reasoning mentally or go test ./config if you touched the example config or schema.

Read the full file on GitHub · 54 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. 2mo ago First seen · 54 lines · 46 tokens per session scan A afff2c2c60a9

Subscribe to this mod's changes

docs-sync is an agent published in the GitHub repository fold-run/fold (1 stars, last pushed 12d ago), licensed Apache-2.0. It adds 46 tokens to every session and 642 once invoked, about $0.0002 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-31.

Related

docs-sync compared with agents from other repositories

docs-sync next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docs-syncfold-run/foldAgent112d agoApache-2.0A46Claude Code
release-engineerGoldziher/ai-rulezAgent167yesterdayMITA19Claude Code
conflict-resolverlugassawan/swe-workbenchAgent32d agoMITA40Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code
code-revieweranthropics/claude-cookbooksAgent54k2d agoMITA52Claude Code
AVM Owner Triagegithub/awesome-copilotAgent41kyesterdayMITA61Claude Code