A knowledge skill for building Convex backends. Provides patterns, schemas, and best practices for writing Convex code — queries, mutations, actions, auth, file storage, and real-time sync.
| File | Description |
|---|---|
SKILL.md |
Main skill file with quick start and scope overview |
references/core-database.md |
Schemas, validators, queries, mutations, indexes |
references/advanced-features.md |
Actions, file storage, scheduling, authentication |
references/patterns-best-practices.md |
Common patterns, error handling, optimization |
Install Convex:
npm install convex
npx convex devDefine a schema:
// convex/schema.ts
import { defineSchema, defineTable } from "convex/server";
import { v } from "convex/values";
export default defineSchema({
messages: defineTable({
text: v.string(),
author: v.string(),
timestamp: v.number(),
}).index("by_timestamp", ["timestamp"]),
});Write a query:
// convex/messages.ts
import { query } from "./_generated/server";
export const list = query({
args: {},
handler: async (ctx) => {
return await ctx.db.query("messages")
.withIndex("by_timestamp")
.order("desc")
.collect();
},
});Clone to your skills directory:
cd ~/your-workspace/skills
git clone https://github.com/fruteroclub/convex-skill.git convexOr reference when needed — the skill is knowledge-only, no API calls required.
This skill covers:
- Schemas & Validators — Define tables, field types, indexes
- Queries — Reactive functions that auto-update clients
- Mutations — Transactional data modifications
- Actions — External API calls, file uploads, non-deterministic ops
- Authentication — Clerk, Auth0, custom auth integration
- File Storage — Uploads, downloads, metadata
- Scheduling — Cron jobs and scheduled functions
- Real-time — Automatic data synchronization
Built for Frutero agents. MIT License.