Cursor rules for Next

Cursor rules for Next is a skill for Claude Code, Codex from AmariahAK/atlarix-skills. It costs 4 tokens per session (942 once invoked), scanned A, original, Apache-2.0.

Coding guidance for Next.js and React applications written in TypeScript, including projects that use blockchain tools such as Solidity, Viem, and Wagmi. It also covers common interface libraries and project structure.

In plain words
What is it for?
Use it when building Next.js applications with TypeScript, React, Ethereum or blockchain integrations, and the listed UI libraries.
Why use it?
It provides consistent rules for typed code, components, naming, and functional programming across web3 and regular web application code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Cursor.

Good fit Use it when building Next.js applications with TypeScript, React, Ethereum or blockchain integrations, and the listed UI libraries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amariahak/atlarix-skills/acr-nextjs-react-typescript-cursorrules-prompt-file
Install

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.

Any agent
npx skills add AmariahAK/atlarix-skills --skill acr-nextjs-react-typescript-cursorrules-prompt-file
Clone the repo
git clone --depth 1 https://github.com/AmariahAK/atlarix-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for Cursor rules for Next

README.md
[![agentmods](https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-nextjs-react-typescript-cursorrules-prompt-file/github.svg)](https://agentmods.dev/skills/amariahak/atlarix-skills/acr-nextjs-react-typescript-cursorrules-prompt-file)
Your own site
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/acr-nextjs-react-typescript-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-nextjs-react-typescript-cursorrules-prompt-file/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.

agentmods 80×15 button for Cursor rules for Next

Your own site · 80×15
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/acr-nextjs-react-typescript-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-nextjs-react-typescript-cursorrules-prompt-file.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 942 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00004 $0.00942
Opus 5 $0.00002 $0.00471
Sonnet 5 $0.00001 $0.00188
Haiku 4.5 $0.00000 $0.00094

Measured 8d ago against content hash 8cf709e07e23, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

Cursor rules for Next 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 8d 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.

skills/acr-nextjs-react-typescript-cursorrules-prompt-file/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cursor rules for Next

When to use this skill

Cursor rules for Next.js development with React and TypeScript integration.

Source

Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/nextjs-react-typescript-cursorrules-prompt-file.mdc.

You are an expert in Solidity, TypeScript, Node.js, Next.js 14 App Router, React, Vite, Viem v2, Wagmi v2, Shadcn UI, Radix UI, and Tailwind Aria.

Key Principles

  • Write concise, technical responses with accurate TypeScript examples.
  • Use functional, declarative programming. Avoid classes.
  • Prefer iteration and modularization over duplication.
  • Use descriptive variable names with auxiliary verbs (e.g., isLoading).
  • Use lowercase with dashes for directories (e.g., components/auth-wizard).
  • Favor named exports for components.
  • Use the Receive an Object, Return an Object (RORO) pattern.

JavaScript/TypeScript

  • Use "function" keyword for pure functions. Omit semicolons.
  • Use TypeScript for all code. Prefer interfaces over types. Avoid enums, use maps.
  • File structure: Exported component, subcomponents, helpers, static content, types.
  • Avoid unnecessary curly braces in conditional statements.
  • For single-line statements in conditionals, omit curly braces.
  • Use concise, one-line syntax for simple conditional statements (e.g., if (condition) doSomething()).

Error Handling and Validation

  • Prioritize error handling and edge cases:
    • Handle errors and edge cases at the beginning of functions.
    • Use early returns for error conditions to avoid deeply nested if statements.
    • Place the happy path last in the function for improved readability.
    • Avoid unnecessary else statements; use if-return pattern instead.
    • Use guard clauses to handle preconditions and invalid states early.
    • Implement proper error logging and user-friendly error messages.
    • Consider using custom error types or error factories for consistent error handling.

React/Next.js

  • Use functional components and TypeScript interfaces.
  • Use declarative JSX.
  • Use function, not const, for components.
  • Use Shadcn UI, Radix, and Tailwind Aria for components and styling.
  • Implement responsive design with Tailwind CSS.
  • Use mobile-first approach for responsive design.
  • Place static content and interfaces at file end.
  • Use content variables for static content outside render functions.
  • Minimize 'use client', 'useEffect', and 'setState'. Favor RSC.
  • Use Zod for form validation.
  • Wrap client components in Suspense with fallback.
  • Use dynamic loading for non-critical components.
  • Optimize images: WebP format, size data, lazy loading.
  • Model expected errors as return values: Avoid using try/catch for expected errors in Server Actions. Use useActionState to manage these errors and return them to the client.
  • Use error boundaries for unexpected errors: Implement error boundaries using error.tsx and global-error.tsx files to handle unexpected errors and provide a fallback UI.
  • Use useActionState with react-hook-form for form validation.
  • Code in services/ dir always throw user-friendly errors that tanStackQuery can catch and show to the user.
  • Use next-safe-action for all server actions:
    • Implement type-safe server actions with proper validation.
    • Utilize the action function from next-safe-action for creating actions.
    • Define input schemas using Zod for robust type checking and validation.
    • Handle errors gracefully and return appropriate responses.
    • Use import type { ActionResponse } from '@/types/actions'
    • Ensure all server actions return the ActionResponse type
    • Implement consistent error handling and success responses using ActionResponse

Read the full file on GitHub · 88 lines

Files

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.

Changes

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.

  1. 8d ago First seen · 88 lines · 4 tokens per session scan A 8cf709e07e23

Subscribe to this mod's changes

Cursor rules for Next is a skill published in the GitHub repository AmariahAK/atlarix-skills (2 stars, last pushed 4d ago), licensed Apache-2.0. It adds 4 tokens to every session and 942 once invoked, about $0.0000 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.

Related

Other skills, from other repositories

app-ui-design

Mobile app UI design expert for iOS and Android. Use when designing app interfaces, creating design systems, ensuring accessibility, or following platform guidelines. Covers Material Design 3, Human Interface Guidelines, color theory, typography, and 2025 trends.

majiayu000/spellbook · 54 tokens

react-hooks-best-practices

Provides React patterns for hooks, effects, refs, and component design. Covers escape hatches, anti-patterns, and correct effect usage. Use when reading or writing React components with hooks or effects.

majiayu000/spellbook · 47 tokens

idea-to-product

A guided process for turning a product idea into a product brief and a clickable HTML prototype. It includes steps for checking feasibility, reducing the first version, mapping the user journey, and checking ease of use.

majiayu000/spellbook · 146 tokens

api-design

REST/GraphQL/gRPC API design best practices. Use when designing APIs, defining contracts, handling versioning. Covers OpenAPI 3.2, GraphQL Federation, gRPC streaming.

majiayu000/spellbook · 42 tokens

app-user-story-qa

End-to-end app feature inventory and user-story testing workflow with a canonical tracker. Use when the user asks to audit every feature, derive expected behavior from code, test user journeys, or explicitly fix and retest documented UX or logistical defects.

majiayu000/spellbook · 54 tokens

figma-to-code

Extract Figma designs and generate production-ready React/Next.js components with TypeScript, Tailwind CSS, and pixel-perfect accuracy. Use when a user provides a Figma URL or asks to convert Figma designs to code.

majiayu000/spellbook · 50 tokens