shared-badge — Claude Code skill for consistent UI badges
This Claude Code skill standardizes status and label pills with a shared Badge component. It activates when a badge is added to a list, table, or dialog.
AGPL-3.0 ★ 1,120 updated 2026-11-16
npx skills add rerun-build/rerun --skill shared-badge -a claude-codeWhat shared-badge does
The skill routes status labels to the shared Badge component from @rerun/ui/primitives or to the project’s existing wrappers. It uses BadgeTone for color instead of styling a span with local color classes. Existing status-to-tone mappings should be reused; an unfamiliar status falls back to neutral.
Badge renders a span, so a clickable label needs a button wrapper or StatusBadgeButton. The skill also separates badges from elements that should keep their own treatment, such as kbd shortcuts, code blocks, and data labels that carry no state. Tone tokens belong in packages/ui/src/styles.css, not in the calling component.
Type checking uses cd apps/ui && npx tsc --noEmit; rg commands help locate hand-styled status pills. Imports should come from @rerun/ui/primitives, not the @rerun/ui barrel, which pulls in the whole package.
What it helps with
- replace a hand-styled status label with the shared
Badge - keep a status tone consistent across a table and dialog
- give an unknown status the neutral tone
- make a clickable badge a real button
- find status pills with local color classes
Example prompts for the agent
- Replace the hand-styled status in this table with the shared badge component.
- Check that the dialog and admin table use the same tone for this status.
- Find status labels in
apps/uithat use color classes on aspan.
How to install shared-badge
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill shared-badge -a claude-code2Manually: put the files in place
~/.claude/skills/shared-badge/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/shared-badge/
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill shared-badge -a codex2Manually: put the files in place
.agents/skills/shared-badge/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill shared-badge -a cursor2Manually: put the files in place
.cursor/skills/shared-badge/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rerun-build/rerun .claude/skills/shared-badge2Manually: put the files in place
.github/skills/shared-badge/SKILL.md1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill shared-badge -a gemini-cli2Platform CLI
gemini skills install https://github.com/rerun-build/rerun --path .claude/skills/shared-badgeManually: put the files in place
.devin/skills/shared-badge/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about shared-badge
How do I install shared-badge in Claude Code?
Run npx skills add rerun-build/rerun --skill shared-badge -a claude-code. The skill file is at ~/.claude/skills/shared-badge/SKILL.md.
What does shared-badge do?
It sets conventions for status and short text labels in the UI: use Badge or an existing wrapper, and assign color through BadgeTone.
How should I make a badge clickable?
Badge renders a span and should not handle clicks. Use StatusBadgeButton or place the badge inside a button.