All skills
get-convex avatar

/convex-quickstart

@c41ece2
by Convexget-convex/agent-skills62 stars
11

Get a barebones Convex + web template running from a one-sentence idea.

Use this Skill: https://skilld.dev/gh/get-convex/agent-skills/convex-quickstart

This session only. Nothing lands on disk.

SKILL.md

β‰ˆ23 tokens always: the name and description. β‰ˆ1.1k when used: this file. β‰ˆ120 more on demand in 1 file.

<!-- GENERATED from convex-agents content/capabilities/quickstart.json β€” do not edit by hand. -->

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.

Workflow

  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.

Source: SKILL.md on GitHub

1 warning16d5 checks Β· Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a legitimate technical workflow for scaffolding Next.js and Convex applications. It follows standard development practices and includes no malicious patterns or unauthorized operations.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW Β· No issues

  • Runlayer7mo

    1/1 file flagged

  • ZeroLeaks5mo

    Score: 93/100 Β· 2 sections analyzed

Signed by skilld at c41ece2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 weeks ago

README badge

README badge for get-convex/agent-skills/convex-quickstart

Scaffolds a new Convex project or adds Convex to an existing React, Next.js, Vue, or Svelte app, then provisions a local backend with `npx convex dev --once`. Targets the official `npm create convex@latest` workflow and handles template selection, provider wiring, environment variable setup, and initial schema validation.

Generated from the current SKILL.md.

Does this skill work with existing projects or only new ones?
Both. It covers scaffolding new Convex projects with templates and adding Convex to existing React, Next.js, Vue, Svelte, or other apps.
What happens when I run npx convex dev --once?
It provisions a local anonymous backend, writes env vars to .env.local, generates types in convex/_generated/, pushes your code, typechecks it, and validates the schema β€” all in one shot before exiting.
Do I need to authenticate or log in to use this skill?
No. The skill uses CONVEX_AGENT_MODE=anonymous to force an unauthenticated local backend that runs on 127.0.0.1, with no browser login or team prompts required.
Which frontend frameworks does this support?
React (Vite), Next.js, Vue, Svelte, React Native, TanStack Start, Remix, and Node.js backends. The skill includes setup code for React and Next.js; other frameworks are documented via quickstart links.
Should I run the dev watcher in the foreground or background?
Do not run it in the foreground because it does not exit. For local development, ask the user to run npm run dev in a terminal. For cloud or headless agents, start it in the background.

Generated from the current SKILL.md. These answers refresh after source changes.