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 skills add alpacahq/alpaca-skills --skill rate-limits-resiliencegit clone --depth 1 https://github.com/alpacahq/alpaca-skillsWrote 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/alpacahq/alpaca-skills/rate-limits-resilience)<a href="https://agentmods.dev/skills/alpacahq/alpaca-skills/rate-limits-resilience"><img src="https://agentmods.dev/badge/skills/alpacahq/alpaca-skills/rate-limits-resilience/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/alpacahq/alpaca-skills/rate-limits-resilience"><img src="https://agentmods.dev/badge/skills/alpacahq/alpaca-skills/rate-limits-resilience.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00070 | $0.01450 |
| Opus 5 | $0.00035 | $0.00725 |
| Sonnet 5 | $0.00014 | $0.00290 |
| Haiku 4.5 | $0.00007 | $0.00145 |
Grade A, and why
alpaca-broker-rate-limits-resilience scanned grade A with 1 finding 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 12d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
page = fetch(url + (token ? "&page_token="+token : "")) # via retry loop How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Alpaca — Rate Limits & Resilience
Alpaca's APIs are rate-limited and occasionally flaky under load. Any client that does more than a handful of calls — especially bulk jobs, backfills, and reconciliation sweeps — needs disciplined retry, backoff, and concurrency control. These patterns are transport-level and apply in any language.
Read
alpaca-broker-integrationfirst.
1. Rate-limit headers — read them on every response
Alpaca returns standard headers:
| Header | Meaning |
|---|---|
X-RateLimit-Limit |
requests allowed in the window |
X-RateLimit-Remaining |
requests left in the current window |
X-RateLimit-Reset |
unix timestamp (seconds) when the window resets |
Parse them on every response, not just on errors. Two uses:
- Proactive: when
Remainingdrops below a threshold (e.g. ≤ 50), log a warning and/or slow down — you're about to get throttled. - Reactive: on
429, useResetto wait exactly until the window opens.
Limits vary by endpoint and plan; market-data limits differ from broker limits. Don't hardcode a number — react to the headers.
2. The retry loop (pseudocode)
MAX_ATTEMPTS = 10
INITIAL_DELAY_MS = 1000
for attempt in 1..MAX_ATTEMPTS:
res = http(request) # with a sane timeout (see §5)
remaining, reset_at = parse_rate_headers(res.headers)
if remaining <= 50: log_warn("approaching rate limit", reset_at)
if res.status == 429:
# wait until the window resets, plus a small buffer
wait = (reset_at - now()) if reset_at else INITIAL_DELAY_MS * 2^(attempt-1)
sleep(max(0, wait) + 1000) # +1s buffer past reset
continue
if res.status in (500, 502, 503, 504) or network_error:
sleep(INITIAL_DELAY_MS * 2^(attempt-1)) # exponential backoff
continue
return res # success or non-retryable 4xx
raise last_error
Key points:
- On
429, wait untilX-RateLimit-Reset+ a ~1s buffer — don't blindly exponential-backoff when the API told you exactly when to retry. - Exponential backoff (
base * 2^(attempt-1)) for network errors and 5xx. With base 1s and 10 attempts the tail is minutes — fine for background jobs, too slow for user-facing calls (use fewer attempts there). - Don't retry non-retryable 4xx (
400/403/422) — those won't fix themselves; surface them. - Optionally add jitter to backoff to avoid thundering-herd when many workers retry together.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago First seen · 103 lines · 70 tokens per session scan A e9835a213d86
alpaca-broker-rate-limits-resilience is a skill published in the GitHub repository alpacahq/alpaca-skills (147 stars, last pushed 3d ago), licensed Apache-2.0. It adds 70 tokens to every session and 1,450 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
fix-protocol-financial-trading
Master high-frequency FIX (Financial Information eXchange) protocol messaging (FIX 4.2/4.4/5.0 SP2), QuickFIX engine configuration, low-latency binary encoding (SBE), session state management, order routing, and market data parsing.
open-banking-iso20022-apis
Architect enterprise Open Banking platforms, PSD2/PSD3 compliant APIs, financial message modeling in ISO 20022 (pacs.008, camt.053, pain.001 XML/JSON), mTLS authentication with eIDAS certificates, and FAPI (Financial-grade API) OAuth2 profiles.
fintech-integration
Use when integrating Plaid, Stripe, payment processors, or financial APIs - covers account linking, payment processing, KYC/AML compliance, and webhook handlingUse when ", " mentioned.
agentmail
Email infrastructure for AI agents. Create accounts, send/receive emails, manage webhooks, and check karma balance via the AgentMail API.
api-rate-limit-handler
Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.
aws-cost-cleanup
Automated cleanup of unused AWS resources to reduce costs.