animai: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from Hajjy22/animai. It costs 627 tokens per session, scanned A, original, MIT.

Project rules for AnimAI, an MCP server and command-line tool that inserts prepared 3D and motion components into existing code. An MCP server is a program that gives an AI agent extra tools; an abstract syntax tree is a structured representation of source code.

In plain words
What is it for?
Building or changing AnimAI integrations for Next.js, React Three Fiber, GSAP, and Tailwind CSS, with deterministic JSON output and structured code edits.
Why use it?
The rules guide the agent toward tested templates and safer code edits instead of creating complex graphics code from scratch or modifying files with fragile text replacement.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is Hajjy22/animai's own configuration. It tells Cursor how to work on animai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything animai configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Hajjy22/animai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Hajjy22/animai/master/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/Hajjy22/animai

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/hajjy22/animai/cursorrules/github.svg)](https://agentmods.dev/rules/hajjy22/animai/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/hajjy22/animai/cursorrules"><img src="https://agentmods.dev/badge/rules/hajjy22/animai/cursorrules/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 cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/hajjy22/animai/cursorrules"><img src="https://agentmods.dev/badge/rules/hajjy22/animai/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 627 This file is loaded in full into every session.
When invoked 627 The same file — it is already loaded in full.
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.00627 $0.00627
Opus 5.5 $0.00251 $0.00251
Sonnet 5.5 $0.00125 $0.00125
Haiku 4.5 $0.00063 $0.00063

Measured 2mo ago against content hash 987641ef151c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 · 32 lines

How it starts

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

Animon Project - Agentic Engineering Specification

Project Identity

You are building AnimAI, an MCP (Model Context Protocol) server and CLI tool that injects pre-vetted 3D/motion components into existing codebases using AST (Abstract Syntax Tree) manipulation. Do NOT generate mathematical 3D loops or GLSL shaders from scratch; always retrieve from the static template cache.

Tech Stack

  • Runtime: Node.js (TypeScript)
  • AST Engine: @ast-grep/napi
  • MCP SDK: @modelcontextprotocol/sdk (using stdio transport)
  • Output Targets: Next.js 14/15, React Three Fiber (R3F), GSAP, Tailwind CSS v4

1. MCP Server Constraints

  • Use the stdio transport to act as a local subprocess for IDEs.
  • Keep tool definition schemas completely flat. Do not use deeply nested parameter objects, as this increases agent timeout latency [cite: 4].
  • Tool outputs must be deterministic JSON containing the dependency list, the integration instructions, and the target code.

2. AST Manipulation Rules (CRITICAL)

  • NEVER use Regular Expressions (Regex) or string .replace() to modify user code. It is brittle and corrupts files.
  • ALWAYS use @ast-grep/napi with the "Find & Patch" methodology to safely traverse and inject imports, variables, and JSX nodes [cite: 5, 6].

3. WebGL & React Three Fiber Constraints

  • VRAM Memory Leaks: R3F does not auto-dispose GPU resources [cite: 7]. Every generated 3D component MUST include a manual useEffect cleanup function that traverses the scene and calls .dispose() on all geometries, materials, and textures [cite: 8, 9].
  • Canvas Sizing: The <Canvas> wrapper must always be injected into a parent container with explicit CSS dimensions (e.g., h-screen w-full relative).
  • Inline Assets: For small 3D primitives (.glb), encode them as Base64 data URIs inline to avoid CORS blocking on local dev servers.

4. Next.js 14/15 Constraints

  • SSR Safety: WebGL crashes Node.js servers [cite: 10]. Any file utilizing Three.js, R3F, or window APIs MUST have the "use client" directive at the top [cite: 11].
  • Hydration: When injecting heavy canvas elements into a layout, wrap the import with next/dynamic and set { ssr: false } to prevent hydration mismatches [cite: 12].

Read the full file on GitHub · 32 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. 2mo ago First seen · 32 lines · 627 tokens per session scan A 987641ef151c

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Hajjy22/animai (0 stars, last pushed 3mo ago), licensed MIT. It adds 627 tokens to every session, about $0.0025 per session on Opus 5.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-31.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesHajjy22/animaiCursor rule03mo agoMITA627Cursor
mainamxv/terminal-mcpCursor rule104mo agoApache-2.0C1,186Cursor
registry-bases-parityproductdevbook/shadcn-htmxCursor rule765mo agoMITA0Cursor
ponytailDietrichGebert/ponytailCursor rule185k8d agoMITA604Cursor
angular-20angular/angularCursor rule101kyesterdayMITA0Cursor
dev-standardapache/supersetCursor rule75kyesterdayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor