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 pledgeandgrow/pledge-skills --skill swrgit clone --depth 1 https://github.com/pledgeandgrow/pledge-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/pledgeandgrow/pledge-skills/swr)<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/swr"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/swr/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/pledgeandgrow/pledge-skills/swr"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/swr.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.00029 | $0.00906 |
| Opus 5.5 | $0.00012 | $0.00362 |
| Sonnet 5.5 | $0.00006 | $0.00181 |
| Haiku 4.5 | $0.00003 | $0.00091 |
Grade A, and why
swr-docs 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 2mo 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.
const fetcher = (url: string) => fetch(url).then(r => r.json()) How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SWR — Complete Skill Reference
Quick Reference
| Topic | File |
|---|---|
| Getting Started (installation, quick start, reusable hooks) | getting-started.md |
| Core Concepts (useSWR, keys, fetchers, conditional fetching) | core-concepts.md |
| Options (all useSWR options, SWRConfig, global configuration) | options.md |
| Mutation (useSWRMutation, optimistic updates, rollback, populateCache) | mutation.md |
| Pagination (useSWRInfinite, index/cursor pagination, parallel fetching) | pagination.md |
| Prefetching (preload, fallback data, RSC prefetch, HTML preload) | prefetching.md |
| Revalidation (focus, interval, reconnect, immutable, mount) | revalidation.md |
| Cache (cache providers, mutate, global mutate, cache modifiers) | cache.md |
| Middleware (custom middleware, logger, laggy, serialize) | middleware.md |
| Suspense (suspense mode, error boundaries, SSR, conditional) | suspense.md |
| Subscription (useSWRSubscription, WebSocket, Firestore, dedup) | subscription.md |
| Error Handling (status codes, retry, global error report) | error-handling.md |
| TypeScript (type inference, generics, Fetcher, middleware types) | typescript.md |
| Next.js Integration (App Router, RSC, SSG/SSR, fallback) | nextjs.md |
| Advanced (understanding SWR, cache providers, performance, React Native) | advanced.md |
| API Reference (all hooks, functions, types) | api-reference.md |
Core Concepts
- useSWR Hook: The fundamental API — pass a key and fetcher, get data/error/isLoading
- Cache Keys: String, array, object, or function keys — automatically serialized
- Fetcher Agnostic: Works with fetch, Axios, GraphQL, or any Promise-returning function
- Automatic Revalidation: On focus, reconnect, interval — all configurable
- Request Deduplication: Identical requests within dedupingInterval are merged
- Mutation: Update cached data via bound/global mutate or useSWRMutation
- Pagination: useSWRInfinite for index-based or cursor-based pagination
- Prefetching: preload API, fallback data, or HTML
<link rel="preload"> - Middleware: Wrap SWR hooks with custom logic (logging, laggy, serialization)
- Suspense: Full React Suspense support with error boundaries
- Subscription: Real-time data via useSWRSubscription (WebSocket, Firestore)
- SSR/SSG: Pre-fill data via fallback, prefetch in Server Components
- TypeScript: Full type inference and explicit generic support
What ships with it
16 files 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.
- advanced.md 9.0 KB
- api-reference.md 8.1 KB
- cache.md 3.8 KB
- core-concepts.md 5.8 KB
- error-handling.md 3.6 KB
- getting-started.md 3.3 KB
- middleware.md 4.2 KB
- mutation.md 9.6 KB
- nextjs.md 5.1 KB
- options.md 5.3 KB
- pagination.md 5.7 KB
- prefetching.md 4.1 KB
- revalidation.md 3.4 KB
- subscription.md 3.6 KB
- suspense.md 3.2 KB
- typescript.md 4.2 KB
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.
- 2mo ago First seen · 79 lines · 29 tokens per session scan A d6495b66e66a
swr-docs is a skill published in the GitHub repository pledgeandgrow/pledge-skills (11 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 906 once invoked, about $0.0001 per session on Opus 5.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-09-03.
swr-docs compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| swr-docspledgeandgrow/pledge-skills | Skill | 11 | 4mo ago | MIT | A | 29 | Claude Code, Codex |
| fp-reacttmolavi/mcp-agent-skills-hub | Skill | 11 | 3d ago | MIT | A | 37 | Claude Code, Codex |
| nextjs-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 77 | Claude Code |
| react-hooks-compositionbobmatnyc/claude-mpm-skills | Skill | 79 | 4mo ago | MIT | A | 29 | Claude Code |
| cdn-cache-control-headerscuriositech/windags-skills | Skill | 21 | 3d ago | none | A | 88 | Claude Code |
| data-fetching-strategistcuriositech/windags-skills | Skill | 21 | 3d ago | none | A | 90 | Claude Code |
| nextjs-developmentmanutej/luxor-claude-marketplace | Skill | 64 | 5mo ago | none | B | 34 | Claude Code |