cursorrules

A set of project rules for building with Convex, a platform that provides a database and backend functions, using TypeScript. It covers recommended workflows, schemas, data types, and input validation.

In plain words
What is it for?
Use it while designing Convex schemas or backend functions, especially when defining data types, IDs, null values, and input validators.
Why use it?
It gives the coding agent the repository's expected Convex practices and highlights details that are easy to mishandle, such as validators and database field types.

Cursor rule for 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/waynesutton/promptstack/cursorrules
Clone the repo
git clone --depth 1 https://github.com/waynesutton/promptstack

Made for: Cursor.

Per session 2,013 This file is loaded in full into every session.
When invoked 2,013 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 $0.02013 $0.02013
Opus 5 $0.01007 $0.01007
Sonnet 5 $0.00403 $0.00403
Haiku 4.5 $0.00201 $0.00201

Measured 2d ago against content hash f56486d7eeb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

.cursor/rules/.cursorrules · 201 lines

How it starts

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

This document serves as some special instructions when working with Convex.

best practices

https://docs.convex.dev/understanding/best-practices/

dev workflow

https://docs.convex.dev/understanding/workflow

#typescript https://docs.convex.dev/understanding/best-practices/typescript

Schemas

When designing the schema please see this page on built in System fields and data types available: https://docs.convex.dev/database/types

also use Standard Schema https://github.com/standard-schema/standard-schema

Here are some specifics that are often mishandled:

validator (https://docs.convex.dev/api/modules/values#v)

The validator builder.

This builder allows you to build validators for Convex values.

Validators can be used in schema definitions and as input validators for Convex functions.

Type declaration Name Type id (tableName: TableName) => VId<GenericId, "required"> null () => VNull<null, "required"> number () => VFloat64<number, "required"> float64 () => VFloat64<number, "required"> bigint () => VInt64<bigint, "required"> int64 () => VInt64<bigint, "required"> boolean () => VBoolean<boolean, "required"> string () => VString<string, "required"> bytes () => VBytes<ArrayBuffer, "required"> literal (literal: T) => VLiteral<T, "required"> array (element: T) => VArray<T["type"][], T, "required"> object (fields: T) => VObject<Expand<{ [Property in string | number | symbol]?: Exclude<Infer<T[Property]>, undefined> } & { [Property in string | number | symbol]: Infer<T[Property]> }>, T, "required", { [Property in string | number | symbol]: Property | ${Property & string}.${T[Property]["fieldPaths"]} }[keyof T] & string> record <Key, Value>(keys: Key, values: Value) => VRecord<Record<Infer, Value["type"]>, Key, Value, "required", string> union (...members: T) => VUnion<T[number]["type"], T, "required", T[number]["fieldPaths"]> any () => VAny<any, "required", string> optional (value: T) => VOptional

System fields (https://docs.convex.dev/database/types#system-fields)

Read the full file on GitHub · 201 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. 2d ago First seen · 201 lines · 2,013 tokens per session scan A f56486d7eeb5

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository waynesutton/promptstack (76 stars, last pushed 1y ago), licensed MIT. It adds 2,013 tokens to every session, about $0.0101 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.