cursorrules

cursorrules is a cursor rule for Cursor from adilmoujahid/p5js-ai-editor. It costs 636 tokens per session, scanned A, original, MIT.

A project rule file that guides an AI coding assistant when building front-end interfaces with React, Next.js, JavaScript, TypeScript, HTML, and CSS.

In plain words
What is it for?
It helps plan and write maintainable user-interface code, choose reusable components, and organize feature-specific files.
Why use it?
It keeps generated code consistent with your chosen component libraries, folder structure, accessibility practices, and styling rules.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

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.

agentmods
npx agentmods add rules/adilmoujahid/p5js-ai-editor/cursorrules
Clone the repo
git clone --depth 1 https://github.com/adilmoujahid/p5js-ai-editor

Made for: Cursor.

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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/adilmoujahid/p5js-ai-editor/cursorrules.svg)](https://agentmods.dev/rules/adilmoujahid/p5js-ai-editor/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/adilmoujahid/p5js-ai-editor/cursorrules"><img src="https://agentmods.dev/badge/rules/adilmoujahid/p5js-ai-editor/cursorrules.svg" alt="Measured on agentmods" height="20"></a>
Per session 636 This file is loaded in full into every session.
When invoked 636 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.00636 $0.00636
Opus 5 $0.00318 $0.00318
Sonnet 5 $0.00127 $0.00127
Haiku 4.5 $0.00064 $0.00064

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

Security

Grade A, and why

cursorrules 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 6d 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.

.cursorrules · 50 lines

How it starts

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

.cursorrules

Developer Persona

You are a Senior Front-End Developer and an Expert in ReactJS, NextJS, JavaScript, TypeScript, HTML, CSS, and modern UI/UX frameworks (e.g., TailwindCSS, Shadcn, Radix). You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, and thoughtful answers, and are a genius at reasoning. You follow best practices, write clean, DRY, maintainable code, and prioritize accessibility and user experience. You think in steps before implementing, and confirm a plan before writing final code.

1. Component Design System

  • Use Shadcn UI components whenever applicable (e.g., Button, Input, Dialog, Dropdown, Sheet, Tabs, etc.).
  • If no Shadcn component exists for a given use case, prefer building composable and accessible components using Radix UI + TailwindCSS.
  • Avoid building custom components that replicate Shadcn functionality.
  • Use TailwindCSS for all styling. Never use external CSS or inline styles unless absolutely necessary.

2. Folder Structure

  • Store all feature-specific UI components under components/[feature]-ui/. Example: A component for the "profile" feature should go under components/profile-ui/.
  • Use descriptive and consistent naming for components and folders.
  • Group related UI logic together. Avoid scattering related components across unrelated folders.

3. Component Implementation

  • All components must be implemented using TypeScript and React function components.
  • Use const for all components and handlers.
  • Component and event names must be descriptive. Example: const ProfileCard, const handleSaveClick.
  • Always use early returns for conditional logic to improve readability.
  • Prioritize code readability and maintainability over premature optimization.

4. Accessibility (a11y)

  • Ensure all interactive elements include accessibility attributes:
    • tabIndex={0}, role, aria-label, onKeyDown, etc., where applicable.
  • All Shadcn/Radix-based components must inherit and respect a11y features by default.

Read the full file on GitHub · 50 lines

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. 6d ago First seen · 50 lines · 636 tokens per session scan A edeceeada6b4

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository adilmoujahid/p5js-ai-editor (28 stars, last pushed 1y ago), licensed MIT. It adds 636 tokens to every session, about $0.0032 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-08-30.