melvynx/ai-maxxing-skills

convex

Set up, secure and optimize a Convex backend.

Quelltext ansehen

Verwendung

  1. Installationsbefehl kopieren und das Quellpaket vor der Installation in der eigenen Agentenumgebung prüfen.
  2. Benötigte Werkzeuge, Zugangsdaten und Hosts im Original prüfen.
  3. Eingabe und gewünschtes Ergebnis beschreiben und die Ausgabe mit den Quellen abgleichen.
npx skills add https://github.com/melvynx/ai-maxxing-skills --skill convex

Vor dem Start

  • Die Installation umfasst weder Modellabo noch API-Kontingent oder Dateizugriffsrechte.
  • Sterne und Installationen zeigen Aktivität, keine unabhängige Qualitäts- oder Sicherheitsprüfung.
Originales Skill-Dokument

Aus dem Quell-Repository gerendert; Überschriften, Beispiele, Code, Tabellen, Links und Bilder bleiben erhalten.

Set up a project with two deployments, dev (break anything) and prod (real users), and never point local dev at prod data:

bash
npx convex login                 # the user approves in the browser
npx convex dev --once            # creates the project + dev deployment, writes .env.local
npx convex env set KEY value     # server secrets (dev); add --prod for production
npx convex deploy                # production deploy

Write every function so it is safe and cheap:

  • Every public query, mutation and action is callable by anyone who has the deployment URL. Check the user (ctx.auth or the Better Auth helper) and ownership inside each one; use internalQuery/internalMutation for anything only the server calls.
  • Validate every argument with v.* validators.
  • Read with .withIndex(...) on a selective index, never .filter on a large table. Define the index in schema.ts for each access pattern (by_userId, by_courseId_order, ...).
  • Bound reads: .take(n) or .paginate() before enriching rows; never .collect() a table that grows.
  • Return only the fields the client needs.
  • Secrets live in Convex env vars, never in client code.

To optimize, start from live evidence:

bash
npx convex insights --prod --details

Extract function name, warning type, per-table docs/bytes, and whether it failed or only neared a limit. Prioritize high Documents Read with low Documents Returned.

Map each hot export to convex/** and its client callsites, then diagnose before patching:

  • .filter / .collect without a selective .withIndex, or an index that narrows only by tenant and still scans thousands of rows;
  • per-row related fetches (N+1); recount helpers on hot mutations;
  • jobs or crons that scan every row on every run;
  • concurrent patches on the same document (OCC conflicts).

Apply the smallest change: add the index used by the query; .take/paginate before enrichment; denormalize list previews and fetch full rows only on detail; incremental counters instead of full recounts; cursor + per-run limit for jobs; skip no-op patches and merge same-document writes; move high-churn state to a narrower table.

Verify with the project's typecheck, tests and build, plus npx convex codegen. Re-run insights after deploy and report: hot functions, root cause, change, expected read/byte/OCC impact, validation.

Verwandte Aufgaben

aus demselben Repository

Weitere Skills

Alle Skills
melvynx
Community

create-software

Create and deploy a public web app on Cloudflare with TanStack Start, shadcn/ui, Convex, Better Auth, Lumail and optional Stripe, with an admin area, API and CLI so AI controls it. Use when asked to build or ship a SaaS, course platform, membership or client portal people sign up to or pay for.

Installationen / 1h
2
GitHub Stars
49
Aktualisiert
18. Nov.
melvynx
Community

connect-tool

Connect any tool (Notion, Stripe, ClickFunnels...) to every agent by installing its official CLI, or writing a one-file Python CLI over its API, then a global skill. Use for "connect-tool notion", "connect X", "make a CLI for X", "use my X API key".

Installationen / 1h
1
GitHub Stars
40
Aktualisiert
12. Nov.
melvynx
Community

grill-me

Interview the user in batches of 10 questions with recommended answers to sharpen a plan, an idea or an app before building. Use when the user says grill me, wants a rigorous interview, or when create-software, create-internal-app or create-landing needs a confirmed brief.

Installationen / 1h
1
GitHub Stars
40
Aktualisiert
12. Nov.
melvynx
Community

initialize

Install the base skills every agent should have, globally and in one command - /initialize itself (so it can be rerun), skill-manager, /show-me, /grill-me, /wait-what, /connect-tool, /use-style and /better, all from this kit - plus the settings that stop Claude Code and Codex from asking before each action, the cc / cx shortcuts, the usage band above the prompt in the Claude desktop app and the terminal status bar (context, cost, 5-hour and weekly limits), then asks the user which visual style t

Installationen / 1h
1
GitHub Stars
40
Aktualisiert
12. Nov.