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.
npx agentmods add skills/fold-run/fold/reloadable-statenpx skills add fold-run/fold --skill reloadable-stategit 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.svg" alt="Measured on agentmods" 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 | $0.00060 | $0.00834 |
| Opus 5 | $0.00030 | $0.00417 |
| Sonnet 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 4d 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.
- 4d 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 3d ago), licensed Apache-2.0. It adds 60 tokens to every session and 834 once invoked, about $0.0003 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-31.
Other skills, from other repositories
release-notes
Draft concise release notes.
use-modern-go
Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.
jwx-guide-v4
Guide for developing Go applications with github.com/lestrrat-go/jwx v4 — parse/sign JWTs, work with JWS/JWE/JWK, pick algorithms, and avoid the common footguns. For developers using jwx, not for developing the library itself.
jwx-companion-bulk
Apply bulk operations across all jwx companion modules. Args.
readme-generate
從原始碼分析自動生成雙語 README。當使用者請求為專案建立 README、需要從程式碼庫生成 README.md(英文)和 README.zh.md(中文)、或希望為其函式庫/套件建立一致的多語言文件時使用。.
search-suitable-public-api
Search the curated Agenvoy public API list for an API that fits the current user need or skill context, then chain into the api-tool-add skill to register it under /.config/agenvoy/tools/api/. Triggers when the agent lacks a tool for a data lookup (weather, currency, geocoding, dictionary, etc.), when the user says…