cursorrules

cursorrules is a cursor rule for Cursor from elizaOS/eliza. It costs 632 tokens per session, scanned A, original, MIT.

A set of coding rules for a cloud project, including package-management, Git, TypeScript, error-handling, and AI-library preferences. It also specifies commands and practices the project expects developers to follow.

In plain words
What is it for?
Use it when installing packages, running scripts, working with GitHub, writing TypeScript, handling errors, or adding AI-related features.
Why use it?
It keeps contributions consistent with the project's tools and reduces avoidable errors from using unsupported commands, types, or patterns.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use it when installing packages, running scripts, working with GitHub, writing TypeScript, handling errors, or adding AI-related features.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/elizaos/eliza/cursorrules
About the project

elizaOS is an open-source TypeScript framework and product stack for building and running autonomous AI agents. Developers use its runtime, application, command-line tool, cloud services, native bridges, and plugins to create agent-based software. The catalogue entries provide skills, commands, instructions, and rules for working with this monorepo and its agent ecosystem.

elizaOS/eliza · 19,620 stars · on GitHub · elizaresearch.ai

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.

Clone the repo
git clone --depth 1 https://github.com/elizaOS/eliza

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/elizaos/eliza/cursorrules/github.svg)](https://agentmods.dev/rules/elizaos/eliza/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/elizaos/eliza/cursorrules"><img src="https://agentmods.dev/badge/rules/elizaos/eliza/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/elizaos/eliza/cursorrules"><img src="https://agentmods.dev/badge/rules/elizaos/eliza/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 632 This file is loaded in full into every session.
When invoked 632 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.00632 $0.00632
Opus 5.5 $0.00253 $0.00253
Sonnet 5.5 $0.00126 $0.00126
Haiku 4.5 $0.00063 $0.00063

Measured 1mo ago against content hash d27d20747ab7, 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 1mo 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.

packages/cloud/shared/.cursorrules · 66 lines

How it starts

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

Cursor Rules for cloud

Package Management

  • Always use bun for package management operations (install, add, remove, run scripts)
  • Never use npm, yarn, or pnpm commands
  • Use bun install instead of npm install
  • Use bun add instead of npm install <package>
  • Use bun remove instead of npm uninstall
  • Use bun run instead of npm run

Git Operations

  • For git operations and links use GitHub CLI (gh)
  • Never make comments on PR

TypeScript

  • Never use any or unknown types, always look for the actual types
  • Always use explicit type definitions, search for existing shared types before creating new ones

AI/ML Libraries

  • Prefer to use Vercel AI SDK wherever possible for AI-related functionality
  • Use AI SDK elements for AI-related UI elements whenever possible (e.g., message components, reasoning displays, artifacts, etc.)

Documentation

  • Use Context7 MCP for library documentation whenever needed

Do not use try { } catch { } blocks unless they are absolutely necessary or handling user supplied data. Avoid defensive programming and implement clean code with fail-fast patterns.

IMPORTANT: After you have finished a task, go through again and review for slop, unnecessary comments, fallbacks and overly complex state management

It is very important that you ALWAYS review your work after you've completed it to make sure that it is as clean, tight, compact as possible, with strong types and fail fast where it makes sense

If you are expecting something, you can use an expect/throw pattern. Always aim to catch errors and throw instead of hiding errors and falling back.

Database Migrations

CRITICAL: Never use db:push - it bypasses migration tracking and breaks production deployments.

Schema Changes Workflow

  1. Modify TypeScript schema in db/schemas/
  2. Generate migration: bun run db:generate
  3. Review generated SQL in db/migrations/
  4. Test locally: bun run db:migrate
  5. Commit both schema and migration files

Read the full file on GitHub · 66 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. 1mo ago First seen · 66 lines · 632 tokens per session scan A d27d20747ab7

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository elizaOS/eliza (19,620 stars, last pushed yesterday), licensed MIT. It adds 632 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-30.