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/squirrelogic/cursor-rules/async-paramsgit clone --depth 1 https://github.com/squirrelogic/cursor-rulesWhat 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.00000 | $0.00923 |
| Opus 5 | $0.00000 | $0.00462 |
| Sonnet 5 | $0.00000 | $0.00185 |
| Haiku 4.5 | $0.00000 | $0.00092 |
Grade A, and why
async-params 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 3d 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.
What it actually says
Async Params and SearchParams in Next.js 15
actions:
-
type: reject conditions:
-
pattern: "params\s*:\s*\{\s*[a-zA-Z_][a-zA-Z0-9_]\s:\sstring\s\}" message: "Page params must be typed as a Promise and awaited"
-
pattern: "searchParams\s*:\s*\{[^}]*\}" message: "Page searchParams must be typed as a Promise and awaited"
-
pattern: "const\s+\{\s*[a-zA-Z_][a-zA-Z0-9_]\s\}\s*=\s*params" message: "Page params must be awaited before destructuring"
-
pattern: "const\s+\{\s*[a-zA-Z_][a-zA-Z0-9_]\s\}\s*=\s*searchParams" message: "Page searchParams must be awaited before destructuring"
-
-
type: suggest message: |
Async Params and SearchParams
In Next.js 15, page components that use
paramsorsearchParamsmust:- Be async functions
- Type params/searchParams as Promises
- Await the params/searchParams before use
Params Example
// ✅ DO: Properly type and await params interface PageProps { params: Promise<{ slug: string }> } export default async function Page({ params }: PageProps) { const { slug } = await params return <div>Post: {slug}</div> } // ❌ DON'T: Use params without Promise type and await interface PageProps { params: { slug: string } // Wrong! Should be Promise } export default function Page({ params }: PageProps) { const { slug } = params // Wrong! Should await params return <div>Post: {slug}</div> }SearchParams Example
// ✅ DO: Properly type and await searchParams interface PageProps { searchParams: Promise<{ q?: string }> } export default async function Page({ searchParams }: PageProps) { const { q } = await searchParams return <div>Search: {q}</div> } // ❌ DON'T: Use searchParams without Promise type and await interface PageProps { searchParams: { q?: string } // Wrong! Should be Promise } export default function Page({ searchParams }: PageProps) { const { q } = searchParams // Wrong! Should await searchParams return <div>Search: {q}</div> }Best Practices
- Always make page components async when using params/searchParams
- Always type params/searchParams as Promises
- Always await params/searchParams before destructuring
- Consider handling loading states while params are being resolved
- Use TypeScript for better type safety
Common Patterns
// Multiple params interface PageProps { params: Promise<{ slug: string id: string }> } // Both params and searchParams interface PageProps { params: Promise<{ slug: string }> searchParams: Promise<{ page?: string }> } // With error handling export default async function Page({ params }: PageProps) { try { const { slug } = await params // Use slug } catch (error) { notFound() } }
metadata: priority: high version: 1.0 framework: next.js frameworkVersion: "15.0.0"
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.
- 3d ago First seen · 126 lines · 0 tokens per session scan A 9735128e0af9
async-params is a cursor rule published in the GitHub repository squirrelogic/cursor-rules (20 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 923 tokens. 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-08-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.