Clawhub convex

From openclaw/clawhub · View interactive version

Clawhub convex is an AI agent skill from the GitHub repository openclaw/clawhub. Apply ClawHub-specific Convex conventions and route to the right managed Convex skill. Use for any change under convex/, Convex commands or deployment targeting, query performance, migrations, retention, runtime validation, or skill stat reads and writes in the ClawHub repository.

How to use this skill

Skill file

ClawHub Convex

Use the managed Convex guidance for general framework behavior and this skill

for ClawHub's repository-specific boundaries.

Start Here

  1. Read convex/_generated/ai/guidelines.md before editing Convex code.
  2. Name the target runtime before running a Convex command: local, dev, or

prod. Include the exact deployment when known and whether the current

function/schema code has already been pushed there.

  1. Route to the most specific companion skill:

convex-performance-audit

convex-migration-helper and create-and-cleanup-migration

dedupe cleanup, or deprecated table removal: convex-retention

Do not edit upstream-managed Convex skills to store ClawHub policy.

Commands And Runtime Validation

clawhub-production-release

bunx convex deploy -y.

401 MissingAccessToken after login, omit --env-file and target the

deployment with --deployment <name> or --prod.

API/schema changes.

convex/_generated/server, so ClawHub's trigger wrapper runs. Type imports

can still come from convex/_generated/server.

workflow owns its explicit deploy behavior and exceptions.

Mocked ctx tests cover pure business logic only. When behavior depends on

pagination, indexes, validators, auth identity, internal/public boundaries,

schedulers, actions calling functions, HTTP actions, storage, or OCC, also run

a real Convex path such as:

Tests that invoke a mutation through ._handler need a mock database with

normalizeId: vi.fn() for trigger-wrapper compatibility.

ClawHub Migration Boundaries

skills own batching, dry runs, resume/progress, confirmation, validation, and

cleanup.

in convex/maintenance.ts.

apply and verification unless they are intentionally retained as maintenance

tooling.

Query And Bandwidth Work

Use convex-performance-audit for the detailed rules on indexes, bounded reads,

denormalization, digest tables, subscriptions, and function limits. Before

writing or reviewing a performance-sensitive query, check deployment health

when available:

bunx convex insights --details
bunx convex logs --failure

Prefer measured runtime signals over speculative restructuring.

ClawHub Hot-Path Conventions

Use convex-performance-audit for the complete workflow. Preserve these

ClawHub-specific implementations when touching their paths:

unless the user needs live updates.

digestToOwnerInfo(digest). Do not re-read the owner document when the

digest already contains the required owner fields.

convex-helpers triggers and skip writes when derived fields did not change.

pipeline once; do not rerun the full vector, lexical, and popularity pipeline

for each page.

tables.

existing action-query-mutation pattern.

Skill Stat Contract

The skills table still has a compatibility shape for four migrated stats:

| Legacy nested field | Top-level source of truth |

| ----------------------- | ------------------------- |

| stats.downloads | statsDownloads |

| stats.stars | statsStars |

| stats.installsCurrent | statsInstallsCurrent |

| stats.installsAllTime | statsInstallsAllTime |

convex/lib/skillStats.ts. It prefers the top-level field and falls back for

pre-migration documents.

patch.

cursor-based backfill.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.