Skip to content
Back to skills

Nyxs Chat Cards

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
ai-agentsgoreactaws

Works with

  • claude code

Security analysis

A100/100

Scanned December 6, 2026

npx -y skills add nyxs-code/nyxs-code --skill nyxs-chat-cards --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nyxs Chat Cards?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nyxs Chat Cards
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nyxs-code-nyxs-chat-cards/badge)](https://www.skillsdirectory.com/skills/nyxs-code-nyxs-chat-cards)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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")`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.