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 commands/usrrname/cursorrules/nextjsgit clone --depth 1 https://github.com/usrrname/cursorrulesWhat 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.00260 |
| Opus 5 | $0.00000 | $0.00130 |
| Sonnet 5 | $0.00000 | $0.00052 |
| Haiku 4.5 | $0.00000 | $0.00026 |
Grade A, and why
nextjs 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 yesterday.
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
/nextjs
Apply Next.js App Router and React 19 patterns.
Usage
/nextjs [page-or-api-route]
When to Invoke
Use this command when:
- Creating Next.js pages or layouts
- Working with Server Components
- Implementing data fetching
- Setting up API routes
Standards Applied
App Router
- Server Components by default
- 'use client' for Client Components
- Async/await in Server Components
- Proper error boundaries
Data Fetching
- Fetch in Server Components
- React.cache for deduplication
- loading.js for Suspense
- Error handling patterns
React 19 Features
- Actions for mutations
- useOptimistic for UI
- useFormStatus for pending states
- Server Actions
Examples
// Server Component
async function BlogPage() {
const posts = await getPosts();
return (
<main>
{posts.map(post => (
<PostCard key={post.id} post={post} />
))}
</main>
);
}
Agent
Uses BasicBitch for implementation.
Related
/react- React patterns/typescript- TypeScript fundamentals
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.
- yesterday First seen · 63 lines · 0 tokens per session scan A 2b44bb48d99e
nextjs is a command published in the GitHub repository usrrname/cursorrules (10 stars, last pushed 4mo ago), licensed ISC. It costs nothing until one of its globs matches a file; then it loads 260 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-31.
Other commands, from other repositories
refactor
Systematic refactoring: analyze → split → extract → verify behavior, with no truncation or omitted lines.
auth-flows
Read-only audit of app-layer auth — route×gate matrix, getSession vs getUser, middleware-as-only-gate.
integrity-plan
Data-integrity & destructive-op audit — plan only, no migrations or tokens until approved.
cursor-jr
Обязательно вызови субагента через Task(cursor-jr).
mac 应用规则沉淀
这次解决问题的过程很棒。请你复盘一下:为了让以后类似的问题能直接被解决,或者避免刚才出现的错误,我应该在未来增加哪几条规则才能避免出现类似的情况?请用最精简的逻辑、最简单的语音总结出来,然后录入到我的这个文档当中: 企微SCRM/企微托管/Mac客户端/规则沉淀.md.
document-project
Analyzes and documents brownfield projects by scanning codebase, architecture, and patterns to create comprehensive reference documentation for AI-assisted development.