agentleFS
Agentic-Engineering-AgencyAgentic-Engineering-Agency/agentforge/.agents/skills/agentforge-convex/SKILL.md

agentforge-convex

Skill4 starsChanged 9 months agoApache-2.0Archived repositoryView on GitHub

Comprehensive Convex development skill for building production-ready apps. Covers functions (queries, mutations, actions, HTTP endpoints), schemas, real-time subscriptions, cron jobs, migrations, and security. USE THIS SKILL whenever the user is working with Convex — whether they mention Convex directly, reference files in a convex/ directory, ask about reactive databases, real-time subscriptions, Convex functions, Convex schemas, cron jobs in Convex, HTTP actions, webhook handling, data migrations, or security audits for a Convex app. Also trigger for questions about ConvexError, v.* validators, defineSchema, defineTable, useQuery, useMutation, usePaginatedQuery, optimistic updates, or ctx.db / ctx.scheduler / ctx.storage calls.

  • Installs packages

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    How to use this table: Read only the reference file(s) relevant to the current task.

    line 43
  2. Very specific:

    Never: run npx convex deploy unless explicitly instructed.

    line 63
  3. Distinctive:

    Never: run any git commands unless explicitly instructed.

    line 64
  4. Very specific:

    Always define both args and returns validators on every function.

    line 65
  5. Very specific:

    Use indexes (withIndex) instead of .filter() for efficient queries.

    line 66
  6. Very specific:

    Use internalMutation / internalQuery / internalAction for anything that should not be callable from the client.

    line 67
  7. Very specific:

    Use ConvexError for user-facing errors.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AgentForge — Convex

Build production-ready Convex applications using established patterns for functions, schemas, real-time data, scheduling, HTTP endpoints, migrations, and security.

Source: Adapted from waynesutton/convexskills (Apache-2.0). Always cross-check with the live docs at https://docs.convex.dev/ and https://docs.convex.dev/llms.txt before implementing.


Quick-Reference Card

Need to…Read reference file
Organize functions & general rulesreferences/best-practices.md
Write queries / mutations / actionsreferences/functions.md
Add real-time subs & optimistic UIreferences/realtime.md
Define schemas, validators, indexesreferences/schema-validator.md
Schedule recurring background workreferences/cron-jobs.md
Create HTTP endpoints / webhooksreferences/http-actions.md
Evolve schema & backfill datareferences/migrations.md
Deep security review (RBAC, rate limiting)references/security-audit.md
Quick security checklistreferences/security-check.md

How to use this table: Read only the reference file(s) relevant to the current task. Each file is self-contained with documentation links, code examples, best practices, and common pitfalls.


Core Principles (The Zen of Convex)

  1. Convex manages the hard parts — caching, real-time sync, consistency.
  2. Functions are the API — design them as your application's interface.
  3. Schema is truth — define your data model explicitly in schema.ts.
  4. TypeScript everywhere — leverage end-to-end type safety.
  5. Queries are reactive — think subscriptions, not requests.

Universal Rules

These apply to every Convex task regardless of which reference you read:

  • Never run npx convex deploy unless explicitly instructed.
  • Never run any git commands unless explicitly instructed.
  • Always define both args and returns validators on every function.
  • Use indexes (withIndex) instead of .filter() for efficient queries.
  • Use internalMutation / internalQuery / internalAction for anything that should not be callable from the client.
  • Use ConvexError for user-facing errors; sanitize internal errors.
  • Store all secrets in environment variables; access only inside actions.
  • Install and configure @convex-dev/eslint-plugin for build-time enforcement.

Function Types at a Glance

TypeDB AccessExternal APIsCached / ReactiveTypical Use
QueryRead-onlyNoYesFetching data
MutationRead / WriteNoNoModifying data
ActionVia runQuery/runMutationYesNoExternal integrations
HTTP ActionVia runQuery/runMutationYesNoWebhooks, REST APIs

Linting Setup

npm i @convex-dev/eslint-plugin --save-dev
// eslint.config.js
import { defineConfig } from "eslint/config";
import convexPlugin from "@convex-dev/eslint-plugin";

export default defineConfig([
  ...convexPlugin.configs.recommended,
]);

Enforced rules: object syntax with handler, argument validators on all functions, explicit table names in DB operations, no Node imports in the Convex runtime.


Canonical Documentation Links

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.