convex-verify

Verifies Convex features by seeding data and asserting behavior across multiple mocked user identities.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires convex-test, vitest, @edge-runtime/vm.

What problem does it solve?

A passing typecheck only proves Convex code compiles; it does not prove a non-owner is denied access, a query returns the right rows, or a mutation has the intended effect. This Skill closes that gap by running seed-drive-assert verification loops in-process with convex-test, with emphasis on negative authorization assertions that catch the most common real-world defects.

Core Features & Use Cases

  • In-Process Verification: Runs tests with convex-test and vitest in edge-runtime, requiring no deployment.
  • Multi-Identity Testing: Drives functions as the owner, a different authenticated user, and an unauthenticated caller using t.withIdentity.
  • Negative Authorization Assertions: Proves wrong callers are refused and list queries never leak another user's rows.
  • Use Case: After building an owner-only cancel mutation, verify that the owner succeeds, another user is rejected with a forbidden error, and unauthenticated calls fail, all before shipping.

Quick Start

Verify that my new Convex cancel mutation only works for the owning user and rejects everyone else.

Frequently Asked Questions about convex-verify

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

FAQPage Schema
How do I test Convex functions with different user identities?

Use t.withIdentity({ subject, tokenIdentifier }) from convex-test to call queries and mutations as different users. Test as the owner, a second authenticated user, and an unauthenticated caller to cover both positive and negative authorization cases.

How to test Convex authorization rules without deploying?

Run tests in-process with convex-test and vitest, which simulates the Convex runtime locally. Seed data for two users, then assert that cross-user access is rejected with forbidden or not-authorized errors.

Why does convex-test fail with import.meta.glob is not a function?

This error occurs when vitest.config.ts is missing test.environment set to edge-runtime and server.deps.inline containing convex-test. Adding that configuration, plus installing @edge-runtime/vm, resolves the failure.

What should a Convex verification test assert?

Assert positive behavior (owner gets expected rows, mutations apply expected changes) and negative behavior (other users and unauthenticated callers are refused). Also verify list queries return only the caller's rows, never a second user's data.

When should I not weaken a failing Convex test?

Never edit an assertion just to make it pass. A failing negative test, such as an owner-only query returning another user's row, indicates a real authorization defect that must be fixed in the function itself.