boxel: Skill for Claude Code

.claude/skills/rate-limit-store/SKILL.md

rate-limit-store is a skill for Claude Code from cardstack/boxel. It costs 213 tokens per session (1,168 once invoked), scanned A, original, MIT.

A database-backed store for rate limits and usage budgets. A rate limit controls how often an action can happen, and the shared store keeps the count consistent across server processes and restarts.

In plain words
What is it for?
Use it to limit requests, enforce burst and refill rules, or track daily and monthly spending or usage budgets.
Why use it?
It avoids each server process keeping a separate count, which could let users exceed a limit when traffic is spread across processes. It also makes limits and budgets persist in the database.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/cardstack/boxel/main/.claude/skills/rate-limit-store/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cardstack/boxel

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 rate-limit-store

README.md
[![agentmods](https://agentmods.dev/badge/skills/cardstack/boxel/rate-limit-store/github.svg)](https://agentmods.dev/skills/cardstack/boxel/rate-limit-store)
Your own site
<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.

agentmods 80×15 button for rate-limit-store

Your own site · 80×15
<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>
Per session 213 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,168 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.00213 $0.01168
Opus 5.5 $0.00085 $0.00467
Sonnet 5.5 $0.00043 $0.00234
Haiku 4.5 $0.00021 $0.00117

Measured 5d ago against content hash 68d4451d2e8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.claude/skills/rate-limit-store/SKILL.md · 46 lines

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 burst tokens. The bucket refills continuously at refillPerMinute and never holds more than burst.
  • A take is all or nothing: one upsert takes cost tokens 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 }, where remaining is the whole tokens left. A refusal returns { admitted: false, retryAfterSeconds }, the time until cost tokens 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 cost larger than burst is 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 move refilled_at or expires_at backwards, so a sweep never deletes a bucket that is still refilling.

Budgets

spend(key, { period, limit }, cost = 1) and budget(key, { period, limit }):

  • period is day or month, as calendar periods in UTC. A budget resets at midnight UTC, or at midnight UTC on the first of the month.
  • spend is all or nothing, like a take. An admission returns { admitted: true, used, resetsAt }, with resetsAt in epoch seconds. A refusal returns { admitted: false, retryAfterSeconds }, the time until the period turns.
  • budget returns the same answer without spending anything. Use it to ask before doing the work and to show what is left.

Read the full file on GitHub · 46 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. 5d ago First seen · 46 lines · 213 tokens per session scan A 68d4451d2e8e

Subscribe to this mod's changes

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.

Related

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.

wshobson/agents · 33 tokens

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…

forcedotcom/sf-skills · 139 tokens

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…

forcedotcom/sf-skills · 74 tokens

durable-objects

Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

fcakyon/claude-codex-settings · 22 tokens

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…

orneryd/NornicDB · 98 tokens

azure-resource-manager-sql-dotnet

Management plane SDK for provisioning and managing Azure SQL resources via Azure Resource Manager.

benjaminasterA/antigravity-awesome-skills · 0 tokens