Convex Agents Messages
Sends, saves, retrieves, and manages messages within agent conversations. Use this when handling user messages, displaying conversation history, and working with UIMessages for rich rendering.
npx skills add majiayu000/claude-skill-registry --skill convex-agents-messages --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 Messages represent individual exchanges in a conversation thread. This skill covers saving, retrieving, displaying, and managing messages. ## When to Use This Skill - Displaying conversation history to users - Saving user messages before generating responses - Implementing optimistic message updates in UI - Working with UIMessages for rich formatting - Filtering tool messages from displayed history ## Retrieve Messages ```typescript import { listUIMessages } from "@convex-dev/agent"; export const listThreadMessages = query({ args: { threadId: v.string(), paginationOpts: paginationOptsValidator }, handler: async (ctx, { threadId, paginationOpts }) => { return await listUIMessages(ctx, components.agent, { threadId, paginationOpts, }); }, }); ``` ## Display in React ```typescript import { useUIMessages } from "@convex-dev/agent/react"; function ChatComponent({ threadId }: { threadId: string }) { const { results } = useUIMessages( api.messages.listThreadMessages, { threadId }, { initialNumItems: 20 } ); return ( <div> {results?.map((message) => ( <div key={message.key}>{message.text}</div> ))} </div> ); } ``` ## Save a Message Manually ```typescript import { saveMessage } fr
- Purpose
- When to Use This Skill
- Retrieve Messages
- Display in React
- Save a Message Manually
- Optimistic Updates
- Delete Messages
- UIMessage Type
- Key Principles
- Next Steps
What does the Convex Agents Messages skill do?
Sends, saves, retrieves, and manages messages within agent conversations. Use this when handling user messages, displaying conversation history, and working with UIMessages for rich rendering.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill convex-agents-messages --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.
