Skip to content

Guide · Agent skill

How to use the ClawHub Convex Conventions agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The clawhub-convex skill is a set of project-specific instructions for an AI coding agent working on the ClawHub repository's Convex backend, which is a hosted database and server-function platform. Once it is installed, the agent follows ClawHub's rules for editing Convex code, naming the target environment, and handing tasks to the right companion skill. This guide explains what the skill does, how to install it, how to trigger it, and what to check before you rely on it.

ClawHub Convex Conventionsopenclaw/clawhub · MIT

Quick start

  1. 1Get the ZIP. Download the clawhub-convex ZIP from this page and unzip it so you have a folder containing SKILL.md and agents/openai.yaml.
  2. 2Place the folder. Move it to ~/.claude/skills/ for all your projects, or to .claude/skills/ inside the ClawHub repository for that project only.
  3. 3Or upload it in the Claude apps. In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the skill.
  4. 4Install the companion skills. Install convex-performance-audit, convex-migration-helper, create-and-cleanup-migration, convex-retention, and clawhub-production-release, since the skill routes work to them.
  5. 5Make a request. Ask the agent for a Convex change in the ClawHub repository and check that it names the target runtime (local, dev, or prod) before running any command.

What the skill makes the agent do

Agent skills are folders of instructions that an AI agent loads when a task matches the skill's description. This one applies only to ClawHub's repository-specific Convex work. It covers any change under convex/, Convex commands and deployment targeting, query performance, migrations, data retention, runtime validation, and reads and writes of skill statistics.

Before the agent edits Convex code, the skill tells it to read convex/_generated/ai/guidelines.md. Before it runs a Convex command, the skill tells it to name the target runtime as local, dev, or prod, and to say whether the current functions and schema have already been pushed there. The skill then points the agent to the most specific companion skill for the job.

  • Query cost, indexes, read amplification, subscriptions, or OCC: convex-performance-audit
  • Production migrations, backfills, schema narrowing, or table reshaping: convex-migration-helper and create-and-cleanup-migration
  • Tables, TTL fields, cleanup crons, retention, or deprecated table removal: convex-retention
  • Auth, reusable components, or setup: the matching managed Convex skill

How to install the clawhub-convex skill

Download the ZIP from this page and unzip it. The skill is a folder that contains SKILL.md and agents/openai.yaml. Put the folder in one of these locations:

  • Personal use across projects: ~/.claude/skills/
  • One project only: the .claude/skills/ folder inside that project
  • In the Claude apps: upload the skill under Settings → Capabilities → Skills

How to trigger the skill with natural requests

You do not need a special command. The agent loads the skill when your request matches its description. Naming the area of work helps. Requests like these match it well: changing a function under convex/, adding an index to speed up a query, planning a backfill migration, or reading and writing a skill's download or star counts.

The skill also works when you ask for a review. Asking the agent to check a Convex change against ClawHub's conventions will lead it to the same rules.

  • Add an index for the skills search query and check whether it reads too much data.
  • Write a backfill for a new migrated stat field and follow the dual-write pattern.
  • Run the Convex function I just changed against dev and tell me which environment you used.
  • Review this convex/ diff for ClawHub migration boundaries.

Commands and checks the agent follows

The skill lists the exact Convex commands the agent should use. New or changed functions must be pushed before convex run. For dev, that is bunx convex dev --once. Production goes through the workflow in clawhub-production-release. Committed API and types are regenerated with bunx convex codegen after API or schema changes.

Tests follow the same logic. Mocked ctx tests only cover pure business logic. If behavior depends on pagination, indexes, validators, auth, schedulers, storage, or OCC, the skill asks for a real Convex path as well.

  • Import mutations from convex/functions.ts, not convex/_generated/server, so the trigger wrapper runs. Type imports can still come from convex/_generated/server.
  • If bunx convex run --env-file .env.local returns 401 MissingAccessToken after login, omit --env-file and use --deployment <name> or --prod.
  • Check bunx convex insights --details and bunx convex logs --failure before restructuring a performance-sensitive query.
  • Do not disable typechecking for an ordinary direct deploy.
bunx convex dev --once bunx convex codegen bunx convex run

Skill stat fields and migration boundaries

The skills table keeps a compatibility shape for four migrated stats. Each legacy nested field has a top-level source of truth. Read them with readCanonicalStat() from convex/lib/skillStats.ts, which prefers the top-level field and falls back for older documents. Write changes with applySkillStatDeltas(), which updates both shapes in one patch. Any direct patch to these values must update both shapes.

For migrations, the skill defaults to @convex-dev/migrations. Table-wide backfills belong in convex/migrations.ts, and custom or admin-gated repairs belong in convex/maintenance.ts.

  • stats.downloads maps to statsDownloads
  • stats.stars maps to statsStars
  • stats.installsCurrent maps to statsInstallsCurrent
  • stats.installsAllTime maps to statsInstallsAllTime
  • Nested-only reads remain valid for stats.comments and stats.versions

Safety notes before you use it

The skill does not run scripts itself, but it does use the network, because the Convex commands connect to ClawHub deployments. You need Convex CLI access, and you need to log in for prod or dev targets.

The skill allows direct production deploys with bunx convex deploy -y when a user explicitly asks for one. That can change live data if it is misused. Review production changes yourself and do not let an agent run them unattended. Keep one-off operator migrations out of .github/workflows/deploy.yml.

  • Requires Bun, because commands use bunx and bun run.
  • Playwright test setup is needed for the bun run test:pw:local-auth step.
  • Companion skills must also be installed or the routing will not work.

What people use it for

  • Adding or changing a Convex query and checking index use and read cost before merging.
  • Planning a backfill for a new migrated skill stat with the dual-write pattern and a cursor-based migration.
  • Reviewing a pull request that touches convex/ for the right trigger wrapper imports and typechecking.
  • Setting up a retention or cleanup cron for expired sessions or deprecated tables using the convex-retention skill.
  • Running a real Convex path in dev with bunx convex dev --once and bunx convex run before trusting a change.

Frequently asked questions

Is the clawhub-convex skill free to use?

The skill is published under the MIT licence, as listed on this page. The Convex platform and its CLI are separate products, so check their own terms for your account and usage.

What do I need before I can use this skill?

You need Bun, since the commands use bunx and bun run, plus Convex CLI access to the ClawHub deployments. Prod or dev targets need a login. The companion skills and the Playwright setup for bun run test:pw:local-auth are also needed for the full workflow.

Can I use this skill in a project that is not ClawHub?

The rules are specific to the ClawHub repository, including its deployment targets, migration boundaries, and skill stat fields. For another Convex project, the general managed Convex guidance is a better fit, and this skill's ClawHub-specific parts would not apply.

How do I install the skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings, then Capabilities, then Skills.

Why does convex run fail with 401 MissingAccessToken?

The skill says this can happen with bunx convex run --env-file .env.local after you log in. The fix it gives is to omit --env-file and target the deployment with --deployment <name> or --prod.

Is it safe to let the agent deploy to production?

The skill allows a direct production deploy with bunx convex deploy -y only when a user explicitly requests it, and that can change live data if misused. Keep a human reviewing production changes, and follow the clawhub-production-release workflow rather than deploying on the agent's own initiative.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you contribute to the ClawHub repository and use an AI agent for Convex work, or if you maintain its migrations, query performance, or stat fields and want consistent rules. Skip it if your project does not use Convex or is not the ClawHub codebase, because the rules and companion skills are specific to that repository.

Download the skill