quickstart

A rule for starting a minimal Next.js and Convex web project from a one-sentence idea. Next.js is a web application framework, and Convex provides the app’s backend and database services.

In plain words
What is it for?
Use it to scaffold a local project with an anonymous development backend and web server, then build additional features after the template is running.
Why use it?
It gets a basic local app running quickly while keeping extra features such as authentication and publishing out until they are requested.

Cursor rule

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/get-convex/convex-agent-plugins/quickstart
Clone the repo
git clone --depth 1 https://github.com/get-convex/convex-agent-plugins
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00017 $0.01060
Opus 5 $0.00009 $0.00530
Sonnet 5 $0.00003 $0.00212
Haiku 4.5 $0.00002 $0.00106

Measured 2d ago against content hash f3d592400712, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

quickstart scanned grade A with 1 finding 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Data access + imports — before writing any convex/*.ts: never an unbounded `.collect()` on a table that can grow — use `.withIndex(...)` and `.paginate(...)`/`.take(n)`. Use an index, not `.filter()`, for anything that
rules/quickstart.mdc · 27 lines

How it starts

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

Quickstart: a barebones Convex template, running

Stand up a barebones Next.js + Convex template from the idea, locally, with an anonymous dev deployment. Minimal by design: local dev servers, no publish step, no pre-baked auth.

Steps

  1. Run recipe quickstart-recipe@^2 with {idea, template} (the pack fetches + caches it; pinned offline fallback). It creates the project, installs deps, starts the backend (anonymous) and the web dev server.
  2. When it prints the dev URL, open it for the user.
  3. Present a short plan and CONFIRM before building features beyond the template.

Rules

  • Never re-run the recipe if it already reported success.
  • Delegate any code under convex/ to the convex-expert capability.
  • Don't add Postgres/Redis/Express — use Convex primitives.
  • Don't add hosting/publish or pre-baked auth here — keep the template minimal unless the user asks for more.
  • DEGRADATION RULE — if the scaffold cannot run (non-interactive session, no network, a sandboxed temp dir, or the user just wants code, not an app): skip the recipe and write a standard Convex project directly. ALL backend code goes under convex/ (schema.ts, functions) — NEVER at the project root; Convex functions only run from the convex/ directory. Write ZERO scaffold/documentation files (no START_HERE.md, ARCHITECTURE.md, MANIFEST.txt, README walls) unless explicitly asked. "Build me a backend" means code, not ceremony.
  • Data access + imports — before writing any convex/*.ts: never an unbounded .collect() on a table that can grow — use .withIndex(...) and .paginate(...)/.take(n). Use an index, not .filter(), for anything that would be a SQL WHERE. .withIndex(...) callbacks only have eq/gt/gte/lt/lte — there is no .range(...) method. Imports: query/mutation/action/internalQuery/internalMutation/internalAction come from ./_generated/server; api/internal come from ./_generated/api; NEVER import from convex/server in application code. v.literal("exact value") for fixed string/enum members, not a bare string. "use node" only at the top of action-only modules — never in a file that also exports a query or mutation. Never import a Node builtin (crypto/fs/path/http/child_process/os, with or without the node: prefix) into a file lacking "use node" — including http.ts route handlers; use Web Crypto (crypto.subtle) instead of importing crypto where possible.
  • Reserved names — never export const <jsReservedWord> = ... (e.g. delete, new, class, function, return) as a query/mutation/action export name; esbuild fails to parse it. Never a table or index name starting with _ (e.g. _migrations: defineTable(...)) — _ is reserved and errors at push as TableNameReserved/IndexNameReserved.
  • HTTP routes — httpRouter has no Express-style :param segments (path: "/users/:id" only matches that literal string and is dead code); use pathPrefix and parse the trailing segment yourself. Every http.route({...}) handler: must be wrapped in httpAction(...) from ./_generated/server — a bare async (ctx, request) => {...} type-checks but isn't a valid HTTP action.
  • ctx.runQuery/ctx.runMutation/ctx.runAction need a codegen'd function reference (api.foo.bar/internal.foo.bar), never a raw imported module member (import * as queries from "./queries"; ctx.runQuery(queries.getX, ...) compiles but fails at runtime).
  • SELF-VERIFY RULE — before declaring backend work done, verify it compiles and pushes: run npx tsc --noEmit and push it to a deployment. Prefer the project's existing one; otherwise npx convex dev --once when npx convex whoami succeeds, and CONVEX_AGENT_MODE=anonymous npx convex dev --once ONLY when it does not. Forcing anonymous on a signed-in user rebinds .env.local and costs them the persistent, publishable cloud deployment they expect. Fix every error it reports before finishing — one verify round catches the wrong-relative-import / duplicate-symbol / unbalanced-paren class that otherwise breaks the deploy.

Read the full file on GitHub · 27 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 · 27 lines · 17 tokens per session scan A f3d592400712

Subscribe to this mod's changes

quickstart is a cursor rule published in the GitHub repository get-convex/convex-agent-plugins (112 stars, last pushed 4d ago), licensed MIT. It adds 17 tokens to every session and 1,060 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.