Convex Agents Context
Customizes what information the LLM receives for each generation. Use this to control message history, implement RAG context injection, search across threads, and provide custom context.
npx skills add majiayu000/claude-skill-registry --skill convex-agents-context --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## Purpose By default, the Agent includes recent messages as context. This skill covers customizing that behavior for advanced patterns like cross-thread search, memory injection, summarization, and filtering. ## When to Use This Skill - Limiting context window to prevent token overflow - Searching across multiple threads for relevant context - Injecting memories or user profiles into every prompt - Summarizing long conversations before continuing - Filtering out sensitive or irrelevant messages - Adding few-shot examples to guide LLM ## Configure Default Context Options ```typescript const myAgent = new Agent(components.agent, { name: "My Agent", languageModel: openai.chat("gpt-4o-mini"), contextOptions: { recentMessages: 50, excludeToolMessages: true, searchOptions: { limit: 10, textSearch: true, vectorSearch: false, }, }, }); ``` ## Override Context Per Call ```typescript export const generateWithCustomContext = action({ args: { threadId: v.string(), prompt: v.string() }, handler: async (ctx, { threadId, prompt }) => { const result = await myAgent.generateText( ctx, { threadId }, { prompt }, { contextOptions: { recentMessages: 20, searchOptions: { limit: 5, textSearch: true, vec
- Purpose
- When to Use This Skill
- Configure Default Context Options
- Override Context Per Call
- Search Across Threads
- Custom Context Handler
- Fetch Context Manually
- Key Principles
- Next Steps
What does the Convex Agents Context skill do?
Customizes what information the LLM receives for each generation. Use this to control message history, implement RAG context injection, search across threads, and provide custom context.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill convex-agents-context --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
