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.
curl -O https://raw.githubusercontent.com/fold-run/fold/main/.claude/skills/reloadable-state/SKILL.mdgit clone --depth 1 https://github.com/fold-run/foldWrote 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.
[](https://agentmods.dev/skills/fold-run/fold/reloadable-state)<a href="https://agentmods.dev/skills/fold-run/fold/reloadable-state"><img src="https://agentmods.dev/badge/skills/fold-run/fold/reloadable-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.
<a href="https://agentmods.dev/skills/fold-run/fold/reloadable-state"><img src="https://agentmods.dev/badge/skills/fold-run/fold/reloadable-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.00834 |
| Opus 5.5 | $0.00024 | $0.00334 |
| Sonnet 5.5 | $0.00012 | $0.00167 |
| Haiku 4.5 | $0.00006 | $0.00083 |
Grade A, and why
reloadable-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 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.
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Adding reloadable state to fold
fold's reloadable state is one atomic snapshot (routes in
gateway/gateway.go). Every request loads the snapshot once and routes
against it. Getting a new field wrong here breaks hot reload, discovery
merges, or fleet consistency in ways unit tests won't catch — follow the
checklist.
1. Decide where the state lives
- Read per-request, changeable at runtime → a field on the
routessnapshot, populated at snapshot build. Never a fresh field onGateway. - Shared across a gateway fleet (windows, breakers, caches) → behind
state.Provider(internal/state), with both providers implemented: in-memory and Redis. Redis operations fail open with the 500 ms bound. - Construction-only (
auth,server,routing,audit,tracingsections) → wire atgateway.Newand make sureReloadstill rejects changes to it. If your field is in one of these sections, that's the whole point: verify the rejection path has a test.
2. Config plumbing (lockstep, enforced by tests)
- Add the field to
config/config.gowith validation in the same place neighboring fields validate. - Mirror it in
config/fold.config.schema.json— the schema drift test fails otherwise. - It falls under the v1 compatibility contract (README "API stability"): new fields must be optional with a safe default.
- Document:
docs/configuration.md(state the default and unit —Mssuffix convention),docs/defaults.md, andfold.config.example.jsonif it's mainstream. A whole new top-level section also needs a row in the README's config summary table. - If the field is construction-wired, say so in its
docs/configuration.mdrow and check README "Configuration hot-reloads", which enumerates the non-reloadable sections — the two must agree.
3. Reload semantics
- Snapshot build must read the field from the merged document: base config + discovery-sourced upstreams. Base reloads and discovery syncs each preserve the other's contribution — if your field can come from either side, test both directions.
- Validation runs on the whole merged document before any swap — a bad value must reject the reload, leaving the old snapshot serving.
- Upstream identity: if your field is part of upstream config, changing it must retire-and-drain that upstream on reload; leaving it identical must reuse the upstream (sessions survive). Check the config-comparison logic includes your field.
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.
- 2mo ago First seen · 71 lines · 60 tokens per session scan A 5d1d14237b99
reloadable-state is a skill published in the GitHub repository fold-run/fold (1 stars, last pushed 12d ago), licensed Apache-2.0. It adds 60 tokens to every session and 834 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.
reloadable-state compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| reloadable-statefold-run/fold | Skill | 1 | 12d ago | Apache-2.0 | A | 60 | Claude Code |
| vhs-e2e-gifdimetron/pi-go | Skill | 222 | 3d ago | MIT | A | 106 | Claude Code, Codex |
| check-linters-before-commitdimetron/pi-go | Skill | 222 | 3d ago | MIT | A | 30 | Claude Code, Codex |
| gh-labelsUnique-Divine/jiyuu | Skill | 6 | yesterday | MIT | A | 98 | Claude Code, Codex |
| gh-prUnique-Divine/jiyuu | Skill | 6 | yesterday | MIT | A | 63 | Claude Code, Codex |
| gh-revUnique-Divine/jiyuu | Skill | 6 | yesterday | MIT | A | 89 | Claude Code, Codex |
| gh-ci-watchUnique-Divine/jiyuu | Skill | 6 | yesterday | MIT | A | 74 | Claude Code, Codex |