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 commands/go4cas/quiver/add-stategit clone --depth 1 https://github.com/go4cas/quiverWrote 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/commands/go4cas/quiver/add-state)<a href="https://agentmods.dev/commands/go4cas/quiver/add-state"><img src="https://agentmods.dev/badge/commands/go4cas/quiver/add-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.00000 | $0.00485 |
| Opus 5 | $0.00000 | $0.00243 |
| Sonnet 5 | $0.00000 | $0.00097 |
| Haiku 4.5 | $0.00000 | $0.00049 |
Grade A, and why
add-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 3d 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.
What it actually says
Create a new Quiver state module for: $ARGUMENTS
The argument is either a module name (e.g. postState, cartState) or a plain noun (e.g. post, cart). Normalise to camelCase with a State suffix (e.g. postState).
Follow these steps exactly:
- Create
src/state/<name>.jsusing thecreateStorepattern:
import { createStore } from '../framework/index.js'
export const <name> = createStore((reactive) => {
const state = reactive({
items: [],
})
return {
get items() { return state.items },
add(item) {
state.items.push({ ...item, id: crypto.randomUUID() })
},
remove(id) {
state.items = state.items.filter(i => i.id !== id)
},
update(id, changes) {
const idx = state.items.findIndex(i => i.id === id)
if (idx !== -1) Object.assign(state.items[idx], changes)
},
}
})
- Rename
itemsto a domain-appropriate plural noun derived from the argument (e.g.posts,cartItems) - Keep methods generic but rename them to match the domain where it makes the intent clearer (e.g.
addPost,removePost) - Add
status: 'idle'to state if async operations are likely
-
Apply all Arrow.js rules — state returned from
createStoreis already reactive; no extra wrapping needed.- Annotate every method's parameters with JSDoc (e.g.
/** @param {string} id */) and add a@typedeffor the item shape — strictcheckJsis enforced and untyped params failnpm run typecheck. Seesrc/state/userState.jsfor the pattern.
- Annotate every method's parameters with JSDoc (e.g.
-
Verify — run and fix any failures:
npm run typecheck && npm test && npm run test:e2e
- Report:
- The file created
- The exported name to import in pages:
import { <name> } from '../state/<name>.js' - A one-line usage example showing how to read state and call an action in a page template
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.
- 3d ago First seen · 52 lines · 0 tokens per session scan A 9d31eb62696e
add-state is a command published in the GitHub repository go4cas/quiver (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 485 tokens. 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.