clawhub-convex

Applies ClawHub-specific Convex conventions for deployments, migrations, queries, and skill stat writes.

9.4k|1.5k|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/openclaw/clawhub --skill clawhub-convex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clawhub-convex
Source: https://github.com/openclaw/clawhub/tree/main/.agents/skills/clawhub-convex
Command: npx skills add https://github.com/openclaw/clawhub --skill clawhub-convex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Working on the ClawHub repository's Convex backend requires knowing repository-specific rules that generic Convex guidance does not cover, such as which deployment to target, where migrations belong, and how to read and write migrated skill stat fields without breaking compatibility.

Core Features & Use Cases

  • Runtime Targeting and Validation: Names the correct deployment (local, dev, prod) before running Convex commands, pushes functions before convex run, and handles the 401 MissingAccessToken case by dropping --env-file.
  • Migration Boundaries: Routes production data changes to @convex-dev/migrations, component backfills to convex/migrations.ts, and custom repairs to convex/maintenance.ts, keeping one-off runs out of deploy workflows.
  • Skill Stat Contract: Enforces dual-shape reads and writes for migrated stats (statsDownloads, statsStars, statsInstallsCurrent, statsInstallsAllTime) via readCanonicalStat() and applySkillStatDeltas().
  • Use Case: When adding a new stat field to the skills table, follow the dual-write shape, add a cursor-based backfill, and route the production apply through the migration companion skills.

Quick Start

Ask the agent to make a Convex change in the ClawHub repository, such as updating a query or adding a migration, and it will apply the ClawHub-specific conventions automatically.

Frequently Asked Questions about clawhub-convex

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Convex migration in the ClawHub repository?

Production data changes default to @convex-dev/migrations, with component-backed table-wide backfills placed in convex/migrations.ts and custom repairs in convex/maintenance.ts. Keep one-off operator runs out of .github/workflows/deploy.yml and remove temporary migration functions in a follow-up PR after verification.

How do I target a specific Convex deployment when running commands?

Name the runtime before running a command: local, dev, or prod, including the exact deployment when known. Push changed functions first with bunx convex dev --once for dev, and use the production release workflow for prod deploys.

Why does convex run return 401 MissingAccessToken after login?

This happens when using bunx convex run with --env-file .env.local after login. Omit --env-file and instead target the deployment with --deployment <name> or --prod.

How do I read and write skill stats after the stats migration?

Read migrated stats with readCanonicalStat() from convex/lib/skillStats.ts, which prefers top-level fields and falls back for pre-migration documents. Write deltas with applySkillStatDeltas(), which updates both the nested and top-level shapes in one patch.

Are mocked ctx tests enough for Convex function changes?

Mocked ctx tests cover pure business logic only. Behavior depending on pagination, indexes, validators, auth identity, schedulers, actions, HTTP actions, storage, or OCC also needs a real Convex path such as bunx convex dev --once or bunx convex run.