How cards in the Nyxs chat are built and where they go (inside a reply or over the composer). Use whenever adding or changing a card drawn from a tool call or a turn (agents, created sessions, proposed tasks, wrap-up, decisions, threads), src/components/message/*Card*.tsx, WrapUpTray, or renderSegments in Message.tsx.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Nyxs Chat Cards?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nyxs-code-nyxs-chat-cards)
---
name: nyxs-chat-cards
description: How cards in the Nyxs chat are built and where they go (inside a reply or over the composer). Use whenever adding or changing a card drawn from a tool call or a turn (agents, created sessions, proposed tasks, wrap-up, decisions, threads), src/components/message/*Card*.tsx, WrapUpTray, or renderSegments in Message.tsx.
---
# Cards in the chat
## Inside the reply or over the composer?
- **Inside the reply**, under the work trace that made it: cards that belong to that moment of
the work and follow something live: Agents (`AgentsCard.tsx`, the sub-agents of that stretch),
New sessions (`CreatedSessionsCard` in `SessionCards.tsx`), threads, decisions. They're pushed in
`renderSegments` (`Message.tsx`) after the `WorkTrace` of their tool calls.
- **Over the composer**, one card per turn (`WrapUpTray.tsx`): what the turn ends with, the
wrap-up (recap, question, next steps) and the tasks it proposed. Never inside the reply: the
agent often writes again after calling the tool (Claude Code asks for text after a turn that
ends on a tool call), and the card ended up between two texts. It goes with the next message
or its X; closing it also clears the recap line in the sidebar (`clearWrapUp`).
- Never two cards for the same turn's ending: add to the one card.
## Building one
- **Fixed width**: `w-[36rem] max-w-full` (as `max-w-xl`). A card that sized to its content grew
and shrank with each progress line.
- Looks: `rounded-[8px] border border-bg-300 bg-bg-0` (or `bg-bg-100` over the composer), header
`text-[12px] text-text-400` with a count on the right, rows `text-[13px]`, one line each,
`truncate`.
- **Memoize** the card and pass it plain props: the streaming message redraws its cards on every
tick. Pass lists as one joined string (`toolIds.join(" ")`, `titles.join("\n")`) so `memo`
compares them.
- Live data from a store (`useSyncExternalStore`), never read in render (see
`nyxs-react-compiler`).
- Text from an agent (summaries, progress) is Markdown: strip it to plain text for a one-line row.
- A progress line under a row: `CornerDownRight` + `TextShimmer`, each new line slides in
(`motion.span key={line}`), as `WorkflowProgress.tsx`.
- A button that sends something for the user shows a short line in the chat and sends the full
text to the agent (`sendAsUser(chatId, text, shown)`).
## Tests
Render the card with a store set up in the test (see `backgroundCards.test.tsx`,
`WrapUpTray.test.tsx`), with labels from `getTranslations("en-US")`.