Borrowing it
Nothing to install: this file belongs to cardstack/boxel. 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/cardstack/boxel/main/.claude/skills/rate-limit-store/SKILL.mdgit clone --depth 1 https://github.com/cardstack/boxelWrote 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/cardstack/boxel/rate-limit-store)<a href="https://agentmods.dev/skills/cardstack/boxel/rate-limit-store"><img src="https://agentmods.dev/badge/skills/cardstack/boxel/rate-limit-store/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/cardstack/boxel/rate-limit-store"><img src="https://agentmods.dev/badge/skills/cardstack/boxel/rate-limit-store.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.00213 | $0.01168 |
| Opus 5.5 | $0.00085 | $0.00467 |
| Sonnet 5.5 | $0.00043 | $0.00234 |
| Haiku 4.5 | $0.00021 | $0.00117 |
Grade A, and why
rate-limit-store 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 5d 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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rate-limit store
DBRateLimitStore keeps rate limits and budgets in the database, so a limit holds across every realm-server process and across a restart. Each statement is the same on Postgres and SQLite. The tests are in packages/realm-server/tests/rate-limit-store-test.ts.
Keys
A key is a string the caller composes. Build it with counterKey(...parts), for example counterKey(shareId, callerId). The parts are JSON-encoded, so two different lists of parts can never make the same key, whatever characters a part contains. A token bucket and a budget never share a count, even under the same key. A day budget and a month budget under one key are also counted separately.
Token buckets
take(key, { burst, refillPerMinute }, cost = 1):
- A key nothing has taken from yet is a full bucket of
bursttokens. The bucket refills continuously atrefillPerMinuteand never holds more thanburst. - A take is all or nothing: one upsert takes
costtokens only when that many are there. Concurrent takes from any number of processes never admit more than the bucket holds. - An admission returns
{ admitted: true, remaining }, whereremainingis the whole tokens left. A refusal returns{ admitted: false, retryAfterSeconds }, the time untilcosttokens will have refilled. A refusal spends nothing, so a caller who keeps retrying gets in as soon as the tokens are back. The retry time comes from a second read and can be slightly stale. - A
costlarger thanburstis never admitted. The refusal gives the time to refill a full bucket. - The row stores the level at
refilled_at, in epoch milliseconds from the store's clock. A process whose clock is behind the row gets no refill and does not moverefilled_atorexpires_atbackwards, so a sweep never deletes a bucket that is still refilling.
Budgets
spend(key, { period, limit }, cost = 1) and budget(key, { period, limit }):
periodisdayormonth, as calendar periods in UTC. A budget resets at midnight UTC, or at midnight UTC on the first of the month.spendis all or nothing, like a take. An admission returns{ admitted: true, used, resetsAt }, withresetsAtin epoch seconds. A refusal returns{ admitted: false, retryAfterSeconds }, the time until the period turns.budgetreturns the same answer without spending anything. Use it to ask before doing the work and to show what is left.
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.
- 5d ago First seen · 46 lines · 213 tokens per session scan A 68d4451d2e8e
rate-limit-store is a skill published in the GitHub repository cardstack/boxel (27 stars, last pushed today), licensed MIT. It adds 213 tokens to every session and 1,168 once invoked, about $0.0009 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-10-21.
Other skills, from other repositories
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
platform-custom-field-generate
Use when users create, generate, or validate Salesforce Custom Field metadata. Trigger on custom fields, field types, Roll-Up Summary, Master-Detail/Lookup relationships, formula fields, picklists, dependent (controlling) picklists, referencing a value set from a field, or scoping picklist values per record type; also…
field-service-sobject-create-configure
Headless 360 REST API deployment step for creating sObject records. Handles describe-based field discovery, required-field derivation, entity-relationship ordering, and composite graph transactions. Use this skill when a designer skill (or a user directly) needs to create sObject records after design confirmation…
durable-objects
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
nornicdb-grpc
Drive NornicDB over gRPC — the Qdrant-compatible surface (Collections, Points, Snapshots) plus the additive NornicSearch service. Use when ingesting via Qdrant SDKs, migrating from Qdrant, or running hybrid text+vector search from a non-Bolt client. Covers connection, RPC catalog, collection→database mapping…
azure-resource-manager-sql-dotnet
Management plane SDK for provisioning and managing Azure SQL resources via Azure Resource Manager.