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 rules/danielvm-git/bigpowers/context7-mcpgit clone --depth 1 https://github.com/danielvm-git/bigpowersWrote 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/rules/danielvm-git/bigpowers/context7-mcp)<a href="https://agentmods.dev/rules/danielvm-git/bigpowers/context7-mcp"><img src="https://agentmods.dev/badge/rules/danielvm-git/bigpowers/context7-mcp.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.00037 | $0.00598 |
| Opus 5 | $0.00018 | $0.00299 |
| Sonnet 5 | $0.00007 | $0.00120 |
| Haiku 4.5 | $0.00004 | $0.00060 |
Grade A, and why
context7-mcp 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 today.
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 — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context7 MCP
HARD GATE — Max 3 Context7 tool calls per user question (
resolve-library-id+query-docscount toward the cap). On quota/rate-limit errors, emit an explicit CONTEXT7_UNAVAILABLE block — do NOT silently answer from training data.HARD GATE — Before HTTP fetch, check
bash scripts/lib/doc-fetch-cache.sh get "<libraryId>:<query>". Cache hit within TTL → use cached body (no round-trip). On ETag mismatch after conditional refresh, replace cache entry.
When to Use
- Setup/configuration questions ("How do I configure Next.js middleware?")
- Code involving libraries ("Write a Prisma query for…")
- API references ("What are the Supabase auth methods?")
- User mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)
Bounded Retry (max 3x)
| Attempt | Action |
|---|---|
| 1 | resolve-library-id → pick best match |
| 2 | query-docs with selected libraryId |
| 3 | Retry query-docs once with refined query (narrower scope) |
After 3 failures, stop and print:
CONTEXT7_UNAVAILABLE
Reason: <quota|rate-limit|no-match|timeout>
Action: Ask user to retry later, paste official docs URL, or run `bts docs <lib>`.
Do NOT substitute training-data answers without labeling them UNVERIFIED.
Fetch Cache (ETag-revalidated)
- Cache key:
"<libraryId>:<normalized-query>"(lowercase, trimmed). - Read:
bash scripts/lib/doc-fetch-cache.sh get "<key>"— exit 0 → use cached body. - Miss / stale: call
query-docs; store viadoc-fetch-cache.sh put. - TTL: 300s default (
DOC_CACHE_TTL). Stale entries refresh on next fetch; honorETagwhen MCP returns it.
bts docs <lib> shares the same cache helper when invoked from this skill.
Process
resolve-library-idwithlibraryName+ full userquery.- Select match: name similarity, reputation, benchmark score; prefer version-specific IDs when user names a version.
query-docswithlibraryId+ specific question (one concept per call).- Answer using fetched docs; cite library/version when relevant.
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.
- today First seen · 55 lines · 37 tokens per session scan A 1d19c8b2ea45
context7-mcp is a cursor rule published in the GitHub repository danielvm-git/bigpowers (163 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 598 once invoked, about $0.0002 per session on Opus 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-09-03.
Other cursor rules, from other repositories
database
Database architecture, schema design, Prisma, Drizzle ORM, indexing strategies, migrations, and N+1 query resolution.
sql
Rules for SQL files (queries, migrations, stored procs).
postgres
Postgres/Supabase roof — RLS, queries, migrations. Index only.
30-database-postgres
PostgreSQL and persistence rules.
40-cache-redis
Redis caching and queue rules.
t3-stack
T3 Stack: tRPC + Prisma + NextAuth integration patterns.