Agent skill · AI & Agents

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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/ai-llm/convex-agents-messages/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

## 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

What's inside
Steps it walks through
  1. Purpose
  2. When to Use This Skill
  3. Retrieve Messages
  4. Display in React
  5. Save a Message Manually
  6. Optimistic Updates
  7. Delete Messages
  8. UIMessage Type
  9. Key Principles
  10. Next Steps
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
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.

Keep going