convex-actions-general
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when working with Convex actions, HTTP endpoints, validators, schemas, environment variables, scheduling, file storage, and…
Об этом скилле
Convex Actions and General Guidelines Skill
This skill provides comprehensive guidance for Convex actions, HTTP endpoints, validators, schema design, file storage, environment variables, scheduling, and TypeScript best practices.
When to Use This Skill
Use this skill when:
- Implementing action functions for external API calls and long-running tasks
- Creating HTTP endpoints for webhooks or public APIs
- Defining validators for function arguments and database schemas
- Designing database schemas with tables, indexes, and search capabilities
- Setting up environment variables for secrets and configuration
- Implementing cron jobs and scheduled tasks
- Working with file storage for uploads and downloads
- Using Convex-specific TypeScript patterns and types
- Understanding Convex limits and performance constraints
Skill Resources
This skill includes comprehensive reference documentation in references/actions-and-general.md that covers:
Actions and HTTP
- Actions: Defining actions with
"use node"for Node.js modules- V8 vs Node runtime differences
- Action limitations (10-minute timeout, no database access)
- Calling external APIs and services
- HTTP Endpoints: Setting up
convex/http.tswith httpRouter- Path registration and exact matching
- Request/response handling
- Method definitions (POST, GET, etc.)
Validators and Types
- Complete validator reference for all Convex types
- Common validators:
v.object(),v.array(),v.string(),v.number(),v.id(),v.boolean(),v.null() - Discriminated union types with
v.union()andv.literal() - ASCII field name requirements for objects
- Size and element count limits
Function Development
- New function syntax for all function types
- Function registration patterns (
query,mutation,action,internalQuery,internalMutation,internalAction) - Function calling patterns across runtimes
- Function references via
apiandinternalobjects - File-based routing conventions
API Design
- Organizing public and private functions
- Thoughtful file structure within
convex/directory - Public vs. internal function visibility
- API surface consistency
Database and Schema
- Schema Definition:
convex/schema.tsstructure- System fields (
_id,_creationTime) - Table definitions with validators
- System fields (
- Indexes: Creating efficient indexes
- Built-in indexes (by_id, by_creation_time)
- Custom index naming and field ordering
- Multiple field indexes for complex queries
- Full Text Search: Search index definitions
- Search fields and filter fields
- Nested field paths with dot notation
Environment and Configuration
- Environment Variables: Using
process.env- Storing secrets (API keys, credentials)
- Per-deployment configuration
- Access from any function type
- Scheduling:
- Crons: Using
crons.interval()andcrons.cron() - Scheduler: Using
ctx.scheduler.runAfter()from mutations/actions - Auth state propagation (doesn't propagate to scheduled jobs)
- Timing constraints and best practices
- Crons: Using
File Storage
- Upload URL generation with
ctx.storage.generateUploadUrl() - Signed URL retrieval with
ctx.storage.getUrl() - File metadata from
_storagesystem table - Blob conversion for storage operations
- Complete example: image upload in chat application
Limits and Performance
- Function arguments and return values: 8 MiB maximum
- Database operations: 8192 document writes per mutation, 16384 reads per query
- Execution timeouts: 1 second for queries/mutations, 10 minutes for actions
- Array element limits: 8192 maximum
- Object/Record field limits: 1024 maximum
- Nesting depth: 16 maximum
- Record size: 1 MiB maximum
- HTTP streaming: 20 MiB maximum output
TypeScript
Id<'tableName'>types for strict document IDsDoc<'tableName'>types for document type safetyRecord<KeyType, ValueType>with proper typingas constfor discriminated unions- Type annotations for same-file function calls
@types/nodefor Node.js modules
How to Use This Skill
- Read the reference documentation at
references/actions-and-general.mdfor comprehensive patterns - Follow the syntax for defining actions with proper Node.js module handling
- Use validators correctly for all function arguments and schema fields
- Design schemas with appropriate indexes for your access patterns
- Set up environment variables for secrets and configuration
- Implement scheduling for background tasks using crons or the scheduler
- Handle file storage with proper URL generation and metadata lookup
- Understand limits and design applications to respect them
- Use TypeScript strictly with
Idtypes and proper generics
Key General Guidelines
- ALWAYS use argument validators for all functions (queries, mutations, actions)
- Do NOT store file URLs in the database; store file IDs instead
- Remapping no
Установить convex-actions-general в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл convex-actions-general?
This skill should be used when working with Convex actions, HTTP endpoints, validators, schemas, environment variables, scheduling, file storage, and TypeScript patterns. It provides comprehensive guidelines for function definitions, API design, database limits, and advanced Convex features.
Как установить скилл convex-actions-general?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл convex-actions-general запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic