anthropic_convex_rules

anthropic_convex_rules is a cursor rule for Cursor from thomasballinger/convex-sse-mcp. It costs 0 tokens per session (5,417 once invoked), scanned A, original, Apache-2.0.

A set of instructions for building Convex applications, where Convex provides the database and backend functions for an app. It covers database schemas, data queries, changes to data, HTTP endpoints, and examples.

In plain words
What is it for?
Use it when designing Convex database schemas, writing queries or data-changing functions, and defining HTTP endpoints in a Convex project.
Why use it?
It reduces uncertainty about how Convex code should be written, especially which function and endpoint formats to use.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when designing Convex database schemas, writing queries or data-changing functions, and defining HTTP endpoints in a Convex project.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/thomasballinger/convex-sse-mcp/anthropic_convex_rules
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/thomasballinger/convex-sse-mcp

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 anthropic_convex_rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/thomasballinger/convex-sse-mcp/anthropic_convex_rules/github.svg)](https://agentmods.dev/rules/thomasballinger/convex-sse-mcp/anthropic_convex_rules)
Your own site
<a href="https://agentmods.dev/rules/thomasballinger/convex-sse-mcp/anthropic_convex_rules"><img src="https://agentmods.dev/badge/rules/thomasballinger/convex-sse-mcp/anthropic_convex_rules/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 anthropic_convex_rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/thomasballinger/convex-sse-mcp/anthropic_convex_rules"><img src="https://agentmods.dev/badge/rules/thomasballinger/convex-sse-mcp/anthropic_convex_rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 5,417 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.00000 $0.05417
Opus 5 $0.00000 $0.02708
Sonnet 5 $0.00000 $0.01083
Haiku 4.5 $0.00000 $0.00542

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

Security

Grade A, and why

anthropic_convex_rules 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 9d 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/anthropic_convex_rules.mdc · 598 lines

How it starts

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

<convex_guidelines> <function_guidelines> <new_function_syntax> - ALWAYS use the new function syntax for Convex functions. For example: typescript import { query } from "./_generated/server"; import { v } from "convex/values"; export const f = query({ args: {}, returns: v.null(), handler: async (ctx, args) => { // Function body }, }); </new_function_syntax> <http_endpoint_syntax> - HTTP endpoints are defined in convex/http.ts and require an httpAction decorator. For example: typescript import { httpRouter } from "convex/server"; import { httpAction } from "./_generated/server"; const http = httpRouter(); http.route({ path: "/echo", method: "POST", handler: httpAction(async (ctx, req) => { const body = await req.bytes(); return new Response(body, { status: 200 }); }), }); - HTTP endpoints are always registered at the exact path you specify in the path field. For example, if you specify /api/someRoute, the endpoint will be registered at /api/someRoute. </http_endpoint_syntax> - Below is an example of an array validator: ```typescript import { mutation } from "./_generated/server"; import { v } from "convex/values";

                        export default mutation({
                        args: {
                            simpleArray: v.array(v.union(v.string(), v.number())),
                        },
                        handler: async (ctx, args) => {
                            //...
                        },
                        });
                        ```
  - Below is an example of a schema with validators that codify a discriminated union type:
                        ```typescript
                        import { defineSchema, defineTable } from "convex/server";
                        import { v } from "convex/values";

                        export default defineSchema({
                            results: defineTable(
                                v.union(
                                    v.object({
                                        kind: v.literal("error"),
                                        errorMessage: v.string(),
                                    }),
                                    v.object({
                                        kind: v.literal("success"),
                                        value: v.number(),
                                    }),
                                ),
                            )
                        });
                        ```
</validators>
<function_registration>
  - Use `internalQuery`, `internalMutation`, and `internalAction` to register internal functions. These functions are private and aren't part of an app's API. They can only be called by other Convex functions. These functions are always imported from `./_generated/server`.
  - Use `query`, `mutation`, and `action` to register public functions. These functions are part of the public API and are exposed to the public Internet. Do NOT use `query`, `mutation`, or `action` to register sensitive internal functions that should be kept private.
  - You CANNOT register a function through the `api` or `internal` objects.
  - ALWAYS include argument and return validators for all Convex functions. This includes all of `query`, `internalQuery`, `mutation`, `internalMutation`, `action`, and `internalAction`. If a function doesn't return anything, include `returns: v.null()` as its output validator.
  - If the JavaScript implementation of a Convex function doesn't have a return value, it implicitly returns `null`.
</function_registration>
<function_calling>
  - Use `ctx.runQuery` to call a query from a query, mutation, or action.
  - Use `ctx.runMutation` to call a mutation from a mutation or action.
  - Use `ctx.runAction` to call an action from an action.
  - ONLY call an action from another action if you need to cross runtimes (e.g. from V8 to Node). Otherwise, pull out the shared code into a helper async function and call that directly instead.
  - Try to use as few calls from actions to queries and mutations as possible. Queries and mutations are transactions, so splitting logic up into multiple calls introduces the risk of race conditions.
  - All of these calls take in a `FunctionReference`. Do NOT try to pass the callee function directly into one of these calls.
  - When using `ctx.runQuery`, `ctx.runMutation`, or `ctx.runAction` to call a function in the same file, specify a type annotation on the return value to work around TypeScript circularity limitations. For example,
                        ```
                        export const f = query({
                          args: { name: v.string() },
                          returns: v.string(),
                          handler: async (ctx, args) => {
                            return "Hello " + args.name;
                          },
                        });

                        export const g = query({
                          args: {},
                          returns: v.null(),
                          handler: async (ctx, args) => {
                            const result: string = await ctx.runQuery(api.example.f, { name: "Bob" });
                            return null;
                          },
                        });
                        ```
</function_calling>
<function_references>
  - Function references are pointers to registered Convex functions.
  - Use the `api` object defined by the framework in `convex/_generated/api.ts` to call public functions registered with `query`, `mutation`, or `action`.
  - Use the `internal` object defined by the framework in `convex/_generated/api.ts` to call internal (or private) functions registered with `internalQuery`, `internalMutation`, or `internalAction`.
  - Convex uses file-based routing, so a public function defined in `convex/example.ts` named `f` has a function reference of `api.example.f`.
  - A private function defined in `convex/example.ts` named `g` has a function reference of `internal.example.g`.
  - Functions can also registered within directories nested within the `convex/` folder. For example, a public function `h` defined in `convex/messages/access.ts` has a function reference of `api.messages.access.h`.
</function_references>
<api_design>
  - Convex uses file-based routing, so thoughtfully organize files with public query, mutation, or action functions within the `convex/` directory.
  - Use `query`, `mutation`, and `action` to define public functions.
  - Use `internalQuery`, `internalMutation`, and `internalAction` to define private, internal functions.
</api_design>
<pagination>
  - Paginated queries are queries that return a list of results in incremental pages.
  - You can define pagination using the following syntax:

Read the full file on GitHub · 598 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. 9d ago First seen · 598 lines · 5,417 tokens per session scan A 3d4b023cbbcf

Subscribe to this mod's changes

anthropic_convex_rules is a cursor rule published in the GitHub repository thomasballinger/convex-sse-mcp (5 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,417 tokens. 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.