LobeHub Alint Rule Set Maintenance
lobehub/lobehub
Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.
Production patterns for Convex apps and the rules the @convex-dev/eslint-plugin enforces: validators, indexes, idempotent mutations, avoiding OCC conflicts, thin function wrappers, error handling.
$ npx skills add waynesutton/builder-skills --skill convex-best-practices -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install waynesutton/builder-skills convex-best-practices --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/waynesutton/builder-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/convex-best-practices .claude/skills/convex-best-practices && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "convex-best-practices" agent skill from https://github.com/waynesutton/builder-skills/tree/main/skills/convex-best-practices into .claude/skills/convex-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "convex-best-practices", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/waynesutton/builder-skills/tree/main/skills/convex-best-practicesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add waynesutton/builder-skills --skill convex-best-practices -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install waynesutton/builder-skills convex-best-practices --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waynesutton/builder-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/convex-best-practices .agents/skills/convex-best-practices && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "convex-best-practices" agent skill from https://github.com/waynesutton/builder-skills/tree/main/skills/convex-best-practices into .agents/skills/convex-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "convex-best-practices", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add waynesutton/builder-skills --skill convex-best-practices -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install waynesutton/builder-skills convex-best-practices --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waynesutton/builder-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/convex-best-practices .cursor/skills/convex-best-practices && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "convex-best-practices" agent skill from https://github.com/waynesutton/builder-skills/tree/main/skills/convex-best-practices into .cursor/skills/convex-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "convex-best-practices", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/waynesutton/builder-skills.git --path skills/convex-best-practices--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add waynesutton/builder-skills --skill convex-best-practices -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install waynesutton/builder-skills convex-best-practices --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waynesutton/builder-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/convex-best-practices .gemini/skills/convex-best-practices && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "convex-best-practices" agent skill from https://github.com/waynesutton/builder-skills/tree/main/skills/convex-best-practices into .gemini/skills/convex-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "convex-best-practices", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install waynesutton/builder-skills convex-best-practicesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add waynesutton/builder-skills --skill convex-best-practices -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/waynesutton/builder-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/convex-best-practices .github/skills/convex-best-practices && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "convex-best-practices" agent skill from https://github.com/waynesutton/builder-skills/tree/main/skills/convex-best-practices into .github/skills/convex-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "convex-best-practices", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add waynesutton/builder-skills --skill convex-best-practices -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install waynesutton/builder-skills convex-best-practices --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/waynesutton/builder-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/convex-best-practices .opencode/skills/convex-best-practices && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "convex-best-practices" agent skill from https://github.com/waynesutton/builder-skills/tree/main/skills/convex-best-practices into .opencode/skills/convex-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "convex-best-practices", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
convex-best-practicesProduction patterns for Convex apps and the rules the @convex-dev/eslint-plugin enforces: validators, indexes, idempotent mutations, avoiding OCC conflicts, thin function wrappers, error handling.
Convex Best Practices is an agent skill from waynesutton/builder-skills. Production patterns for Convex apps and the rules the @convex-dev/eslint-plugin enforces: validators, indexes, idempotent mutations, avoiding OCC conflicts, thin function wrappers, error handling. Use when reviewing Convex code, asking whether a pattern is right, setting up ESLint, or fixing write conflicts and slow queries.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files and assets (for example `agents/openai.yaml` and `references/eslint-setup.md`).
It sits in Development, covering Linting and formatting and Query optimization. It works with ESLint and Convex. The repository describes itself as: Builder skills for Convex apps. Convex patterns plus a PRD, task.md, changelog, and files.md workflow for Claude Code, Codex, Cursor, and OpenCode. The licence is Apache-2.0.
8 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 82d1ce2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.convex.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Convex Best Practices loads about 2.6k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 794 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from waynesutton/builder-skills at commit 82d1ce2, republished under its Apache-2.0 licence (© waynesutton). 794 words, ~2,571 tokens.
.claude/skills/convex-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.The patterns that keep a Convex app fast and correct in production. The rule that matters most: read as little as possible before you write, and read through an index.
args and returns, with returns: v.null() when nothing comes back.withIndex against an index in convex/schema.ts.ctx.db.patch(id, fields) throws if the doc is missing; you rarely need the old value.Promise.all for independent writes. Do not await them one at a time.internal.* only. Crons and ctx.scheduler run without a client, so public targets skip auth.ctx.ConvexError for anything a client should read. Plain Error messages are redacted in production.// convex/tasks.ts
import { query, mutation } from "./_generated/server";
import { v, ConvexError } from "convex/values";
const taskValidator = v.object({
_id: v.id("tasks"),
_creationTime: v.number(),
userId: v.id("users"),
title: v.string(),
status: v.union(v.literal("open"), v.literal("done")),
});
export const listOpen = query({
args: { userId: v.id("users") },
returns: v.array(taskValidator),
handler: async (ctx, args) => {
return await ctx.db
.query("tasks")
.withIndex("by_user_and_status", (q) =>
q.eq("userId", args.userId).eq("status", "open"),
)
.order("desc")
.take(100);
},
});
export const rename = mutation({
args: { taskId: v.id("tasks"), title: v.string() },
returns: v.null(),
handler: async (ctx, args) => {
if (args.title.trim().length === 0) {
throw new ConvexError("Title cannot be empty");
}
await ctx.db.patch(args.taskId, { title: args.title.trim() });
return null;
},
});The schema behind that index:
tasks: defineTable({
userId: v.id("users"),
title: v.string(),
status: v.union(v.literal("open"), v.literal("done")),
})
.index("by_user", ["userId"])
.index("by_user_and_status", ["userId", "status"]),Name indexes after their fields in order, and query fields in that same order.
Convex runs mutations under optimistic concurrency control. A mutation records what it read. If another mutation commits a change to any of that data first, Convex retries it. After enough retries it fails and the client sees a write conflict error.
Conflicts come from three places:
.collect() on a whole table, so any change in that range conflicts with itexport const complete = mutation({
args: { taskId: v.id("tasks") },
returns: v.null(),
handler: async (ctx, args) => {
const task = await ctx.db.get(args.taskId);
if (!task || task.status === "done") {
return null;
}
await ctx.db.patch(args.taskId, { status: "done" });
return null;
},
});
export const reorder = mutation({
args: { itemIds: v.array(v.id("items")) },
returns: v.null(),
handler: async (ctx, args) => {
await Promise.all(
args.itemIds.map((id, index) => ctx.db.patch(id, { order: index })),
);
return null;
},
});The read in complete is fine: one document, early exit. reorder never reads at all.
A counter field on one document is the most common conflict source. Insert one row per event and count in a query.
export const trackView = mutation({
args: { pageId: v.id("pages") },
returns: v.null(),
handler: async (ctx, args) => {
await ctx.db.insert("pageViews", { pageId: args.pageId });
return null;
},
});
export const viewCount = query({
args: { pageId: v.id("pages") },
returns: v.number(),
handler: async (ctx, args) => {
const views = await ctx.db
.query("pageViews")
.withIndex("by_page", (q) => q.eq("pageId", args.pageId))
.collect();
return views.length;
},
});Once the event table gets large, move the count to the @convex-dev/sharded-counter or @convex-dev/aggregate component instead of collecting rows.
For heartbeats and presence, skip the write when the last one was recent. Pair it with a client side debounce: 300 to 500 ms for typing, a few seconds for heartbeats.
const DEDUP_MS = 10_000;
export const heartbeat = mutation({
args: { sessionId: v.string(), path: v.string() },
returns: v.null(),
handler: async (ctx, args) => {
const now = Date.now();
const existing = await ctx.db
.query("sessions")
.withIndex("by_session", (q) => q.eq("sessionId", args.sessionId))
.unique();
if (!existing) {
await ctx.db.insert("sessions", { ...args, lastSeen: now });
return null;
}
if (existing.path === args.path && now - existing.lastSeen < DEDUP_MS) {
return null;
}
await ctx.db.patch(existing._id, { path: args.path, lastSeen: now });
return null;
},
});Put hot fields such as lastSeen in their own table so those writes do not conflict with reads of the stable document.
.collect() on an unbounded table gets slower every day and eventually hits read limits. Paginate anything a user can grow. postValidator below is a hoisted document validator like taskValidator above.
import { paginationOptsValidator } from "convex/server";
export const feed = query({
args: { userId: v.id("users"), paginationOpts: paginationOptsValidator },
returns: v.object({
page: v.array(postValidator),
isDone: v.boolean(),
continueCursor: v.string(),
splitCursor: v.optional(v.union(v.string(), v.null())),
pageStatus: v.optional(
v.union(v.literal("SplitRecommended"), v.literal("SplitRequired"), v.null()),
),
}),
handler: async (ctx, args) => {
return await ctx.db
.query("posts")
.withIndex("by_user", (q) => q.eq("userId", args.userId))
.order("desc")
.paginate(args.paginationOpts);
},
});On the client, usePaginatedQuery from convex/react drives loadMore.
Queries must be deterministic so Convex can cache them and rerun them when data changes. Pass time from the client, or store a status field that a scheduled mutation updates.
export const dueBefore = query({
args: { userId: v.id("users"), now: v.number() },
returns: v.array(taskValidator),
handler: async (ctx, args) => {
return await ctx.db
.query("tasks")
.withIndex("by_user_and_due", (q) =>
q.eq("userId", args.userId).lt("dueAt", args.now),
)
.take(100);
},
});Mutations and actions may call Date.now().
@convex-dev/eslint-plugin catches the old function syntax, missing arg validators, .filter() in queries, and top of the hour crons at lint time. Install it in every Convex project.
npm i --save-dev @convex-dev/eslint-plugin// eslint.config.js
import { defineConfig } from "eslint/config";
import convexPlugin from "@convex-dev/eslint-plugin";
export default defineConfig([...convexPlugin.configs.recommended]);Open references/eslint-setup.md when you need the full rule list, the TypeScript aware config, package scripts, or a custom convex/ directory.
| Mistake | Why it breaks | Do instead |
|---|---|---|
.filter() on a table query | Reads every row, then drops most | Add an index, use withIndex |
.collect() on an unbounded table | Slower every day, hits read limits, wide OCC footprint | .paginate() or .take(n) |
| Read, compute, then patch a shared doc | Two clients read the same version and both write | Patch directly, or split into event rows |
| Counter field incremented per event | Every increment conflicts with every other | Event records or a sharded counter component |
| Mutation without an early return | Retries and double clicks apply the change twice | Check state, return null if already done |
Sequential await on independent writes | Slow, and each read widens the conflict window | Promise.all |
Date.now() in a query | Result changes every ms, cache and subscriptions break | Pass now as an arg |
Scheduling api.* | Public function runs with no client auth | Schedule internal.* |
Plain Error for user messages | Redacted to "Server Error" in production | ConvexError |
| Business logic inside the handler | Untestable, duplicated across functions | Plain helper that takes ctx |
args and returnswithIndex, never .filter()Promise.all.paginate()Date.now() inside a queryinternal.*@convex-dev/eslint-plugin is installed and npm run lint passes© waynesutton, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references, assets) in skills/convex-best-practices of waynesutton/builder-skills.
Open the folder on GitHubat commit 82d1ce2
Convex Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Convex Best Practices this skillwaynesutton/builder-skills | 406 | — | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| LobeHub Alint Rule Set Maintenancelobehub/lobehub | 83k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Eslint Migrate Optionsbiomejs/biome | 26k | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Ultraciteagustinusnathaniel/nextarter-tailwind | 125 | 2 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Code Qualityredis/RedisInsight | 8.9k | — | ~1.2k | Automated safety check: Pass | Custom licence | |
| Boundaries Architectjavierbrea/eslint-plugin-boundaries | 997 | — | ~4.2k | Automated safety check: Pass | MIT |
lobehub/lobehub
Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.
biomejs/biome
A skill your agent uses when biome migrate eslint must preserve configurable ESLint rule options through source-option models, Biome conversions, typed rule variants, and migration fixtures.
agustinusnathaniel/nextarter-tailwind
Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects.
redis/RedisInsight
Code-quality standards for RedisInsight: TypeScript strictness, naming conventions (camelCase, PascalCase, UPPERSNAKECASE), linting rules, no any without reason, no !important in styles, and…
javierbrea/eslint-plugin-boundaries
Act as a software architect: analyze a repository's folder structure and cross-file import dependencies, detect its architectural pattern, design element/file boundaries with the user, and configure…
web-infra-dev/rslint
Port a new ESLint core or plugin rule to rslint, including explicitly requested batches.
waynesutton/builder-skills
Builds AI agents on the Convex agent component: threads, messages, tools that call queries and mutations, streaming, RAG with vector search, and workflows for multi step jobs.
waynesutton/builder-skills
Creates reusable Convex components with defineComponent, a clean client wrapper, their own schema, and an npm publish setup.
waynesutton/builder-skills
Schedules work in Convex: cron jobs in convex/crons.ts, one off scheduled functions with runAfter and runAt, batching large jobs, and cancelling or inspecting the queue.
waynesutton/builder-skills
Adds HTTP endpoints in convex/http.ts: webhook receivers with signature checks, REST style routes, CORS, auth headers, streaming responses, and file uploads over HTTP.
waynesutton/builder-skills
Changes a live Convex schema without downtime: make a field optional, backfill in batches, flip the validator, then clean up.
waynesutton/builder-skills
Deep security review of a Convex app: authorization model, data access paths per table, HTTP action exposure, rate limiting, file storage access, scheduled function trust, and a written findings…
Categories
Production patterns for Convex apps and the rules the @convex-dev/eslint-plugin enforces: validators, indexes, idempotent mutations, avoiding OCC conflicts, thin function wrappers, error handling. Convex Best Practices is an agent skill from waynesutton/builder-skills. Production patterns for Convex apps and the rules the @convex-dev/eslint-plugin enforces: validators, indexes, idempotent mutations, avoiding OCC conflicts, thin function wrappers, error handling.
Convex Best Practices fits situations like: reviewing Convex code; asking whether a pattern is right; setting up ESLint; fixing write conflicts and slow queries.
Run `npx skills add waynesutton/builder-skills --skill convex-best-practices -a claude-code`. Or copy the skill folder (skills/convex-best-practices in waynesutton/builder-skills) into .claude/skills/convex-best-practices in your project. Claude Code loads it when a task matches its description.
Run `npx skills add waynesutton/builder-skills --skill convex-best-practices -a codex`. Or copy the skill folder (skills/convex-best-practices in waynesutton/builder-skills) into .agents/skills/convex-best-practices in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add waynesutton/builder-skills --skill convex-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/convex-best-practices, .gemini/skills/convex-best-practices, .github/skills/convex-best-practices and .opencode/skills/convex-best-practices in your project.
Going by SKILL.md and its folder, Convex Best Practices needs the command-line tools its instructions call (npm). Our summary lists: Node.js.
SKILL.md names 1 domain. As links in the text: docs.convex.dev. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Convex Best Practices is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Convex Best Practices: LobeHub Alint Rule Set Maintenance (lobehub/lobehub, 83k stars), Eslint Migrate Options (biomejs/biome, 26k stars), Ultracite (agustinusnathaniel/nextarter-tailwind, 125 stars) and Code Quality (redis/RedisInsight, 8.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
waynesutton (a GitHub user) maintains it in waynesutton/builder-skills, which has 406 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on September 28, 2026.
Source: waynesutton/builder-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.