convex-queries
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when implementing Convex query functions. It provides comprehensive guidelines for defining, registering, calling, and optimizing…
Об этом скилле
Convex Queries Skill
This skill provides specialized guidance for implementing Convex query functions, including best practices for function definition, registration, calling patterns, pagination, indexing, and full text search.
When to Use This Skill
Use this skill when:
- Defining new query functions to fetch data from the Convex database
- Implementing pagination for large result sets
- Setting up indexes for efficient querying
- Using full text search functionality
- Calling queries from other Convex functions
- Optimizing query performance
Skill Resources
This skill includes comprehensive reference documentation in references/query-guidelines.md that covers:
Core Query Development
- Function definition syntax using the new function syntax
- Query registration (
queryandinternalQuery) - Argument validators and their usage
- Function calling patterns (
ctx.runQuery) - Function references (
apiandinternalobjects) - File-based routing for query paths
Query Optimization
- Query guidelines (avoiding
filter, using indexes withwithIndex) - Ordering results with
.order('asc')and.order('desc') - Using
.unique()for single document retrieval - Async iteration with
for awaitsyntax - Query limits and performance considerations
Advanced Query Features
- Pagination: Implementing paginated queries with
paginationOptsValidator- Understanding
paginationOpts(numItems and cursor) - Reading paginated results (page, isDone, continueCursor)
- Understanding
- Full Text Search: Setting up and querying search indexes
- Indexing: Creating and using indexes for efficient lookups
- Built-in indexes (by_id, by_creation_time)
- Custom index naming and field ordering
- Nested queries with multiple indexes
Database Queries
- Reading from the Convex database with
ctx.db.query() - Index usage with
.withIndex() - Result collection with
.collect()and.take(n)
How to Use This Skill
- Read the reference documentation at
references/query-guidelines.mdto understand the complete query patterns - Follow the syntax examples for defining query functions with proper validators
- Use indexes for efficient filtering instead of the
filtermethod - Implement pagination when dealing with large datasets
- Leverage full text search for text-based filtering needs
- Optimize ordering by understanding how Convex orders results
Key Query Guidelines
- ALWAYS include argument validators for all query functions
- Do NOT use
filterin queries; usewithIndexinstead - Use
ctx.runQueryto call queries from mutations or actions - Specify return type annotations when calling queries in the same file (TypeScript circularity workaround)
- Queries execute for at most 1 second and can read up to 16384 documents
- Return
nullimplicitly if your query doesn't have an explicit return value
Example: Basic Query with Index
import { query } from "./_generated/server";
import { v } from "convex/values";
export const getMessagesByChannel = query({
args: {
channelId: v.id("channels"),
},
handler: async (ctx, args) => {
return await ctx.db
.query("messages")
.withIndex("by_channel", (q) => q.eq("channelId", args.channelId))
.order("desc")
.take(20);
},
});
For more detailed information and additional patterns, refer to the complete reference documentation.
Установить convex-queries в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл convex-queries?
This skill should be used when implementing Convex query functions. It provides comprehensive guidelines for defining, registering, calling, and optimizing queries, including pagination, full text search, and indexing patterns.
Как установить скилл convex-queries?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл convex-queries запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub