Към всички skills

convex-core

IgorWarzocha · Бази данни

Build Convex schemas, queries, mutations, actions, and client usage with strict validators and indexes. Use for data modeling, function authoring, argument/return validation, and performance guidance. Use proactively when work touches convex/schema.ts, functions, or api.* references. Examples: - us

Оригинален текст · няма потвърден превод на български

Първо прочетете инструкцията.

Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.

Оригинален SKILL.md
GitHub хранилище
Звезди на репото
89
Лиценз
Не е посочен. Проверете в репозитория.
Последна проверка на записа
Няма посочена дата

Добавете в своя инструмент.

Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.

npx skills add IgorWarzocha/Opencode-Workflows

Страницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.

Откъс от SKILL.md

Началото на файла на автора, без превод.

Schema Rules

  • You MUST define all tables in convex/schema.ts with defineSchema / defineTable.
  • System Fields: _id (v.id(tableName)) and _creationTime (v.number()) are added automatically.
  • You MUST use v.* validators for every field; SHOULD avoid v.any() unless necessary.
  • Index naming: include all fields in the name, e.g., "by_field1_and_field2".
  • Index rules:
    • You MUST use .index(name, [fields...]).
    • Field order matters; range expressions MUST follow index order.
    • Limits: 16 fields per index, 32 indexes per table.

Function Rules

  • You MUST use new function syntax with args, returns, and handler.
  • You MUST always validate args and returns (HTTP actions excluded).
  • Use query for reads, mutation for writes, and action for external/long-running.
  • Actions MUST NOT access ctx.db; You MUST use ctx.runQuery / ctx.runMutation.
  • Circular Dependencies: When calling a function in the same file via ctx.run*, You MUST add explicit return type annotations to the receiver variable.

Целият SKILL.md в GitHub