К основному содержанию
скилл CX Codex

status-colors-and-errors — скилл для Claude Code: цвета статусов

Скилл задаёт правила для семантических цветов статусов и текстов ошибок: сколько цветов держать, что каждый значит и как написать сообщение с выходом из ситуации.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add dembrandt/dembrandt-skills --skill status-colors-and-errors -a claude-code
Открыть на GitHub

Что делает status-colors-and-errors

Скилл включается, когда вы проектируете индикаторы статуса, валидацию форм, алерты или состояния ошибок. Он держит набор цветов маленьким: красный — ошибка, оранжевый — предупреждение, зелёный — успех, синий — информация. Каждый цвет значит ровно одно во всём продукте, и оранжевый зарезервирован под предупреждения. Если два токена выглядят одинаково, скилл советует оставить один: второе имя для того же цвета превращается в ложь, потому что автор выбирает любое, а пользователь читает одно состояние.

Отдельный блок — про ошибки. Каждое сообщение должно отвечать на три вопроса: что случилось, почему и что делать дальше. Для временных сбоев вроде сети или таймаута нужна кнопка повтора, для валидации — указание на конкретное поле. Крупные ошибки скилл предлагает предотвращать заранее: подтверждение перед необратимым действием, отключение недоступных кнопок, автосохранение, оптимистичный UI с откатом. Последствия лучше проговаривать до действия, а не после.

Внутри есть таблица уровней серьёзности — от блокирующей ошибки на всю страницу до тоста и пустого состояния — и чек-лист для ревью. Скилл подхватывается по путям вроде **/*.css, **/*.tsx и tailwind.config.*, поэтому в проекте без CSS-файлов и компонентов он просто не сработает.

Какие задачи решает

  • выбрать цвета для ошибок, предупреждений и успеха и не раздувать палитру
  • написать текст ошибки, из которой пользователь понимает, что делать дальше
  • добавить повтор для сетевого сбоя или таймаута
  • подтвердить необратимое действие до того, как оно случится
  • подобрать уровень серьёзности: инлайн-ошибка, тост или баннер

Примеры запросов агенту

  • какие цвета использовать для ошибок и предупреждений
  • продумай состояние ошибки для этой формы
  • как показать неудачный вызов API, чтобы пользователь мог повторить

Как установить status-colors-and-errors

1Через Skills CLI (Vercel)

npx skills add dembrandt/dembrandt-skills --skill status-colors-and-errors -a claude-code

2Вручную: положить файлы

~/.claude/skills/status-colors-and-errors/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/status-colors-and-errors/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора34

component-family-consistency Скилл следит, чтобы кнопки, поля ввода, бейджи и пилюли делили радиус, цвета, тени, границы и отступы. Пригодится при сборке или ревизии библиотеки компонентов. CX Codex +1 874установок loading-states-and-perceived-performance Скилл для ИИ-кодинга, который помогает выбрать спиннер, скелетон или прогресс-бар и сделать интерфейс быстрее на ощупь. CX Codex +1 871установок generate-ui-from-brand Превращает URL сайта или файл DESIGN.md в дизайн-токены, решения по UX и готовую спецификацию интерфейса. CX Codex +1 870установок micro-interactions Скилл для мелких осмысленных анимаций: переключатели, иконки, моменты успеха. Пригодится, когда интерфейсу не хватает отклика. CX Codex +1 869установок elevation-and-depth Задаёт правила для теней, скруглений и глубины интерфейса в CSS. Помогает агенту правильно оформлять карточки, модальные окна, выпадающие списки и тултипы. CX Codex +1 854установок sticky-and-fixed-elements Помогает решить, что остаётся на экране при прокрутке: липкие заголовки, нижние панели, плавающие кнопки, закреплённые шапки таблиц. CX Codex +1 855установок data-display-and-selection Помогает агенту проектировать таблицы, списки и сетки: режимы просмотра, массовые действия, сортировка, поиск и выбор строк. CX Codex +1 855установок notifications-and-recovery Скилл для проектирования уведомлений и состояний ошибок: тосты, инлайн-ошибки, баннеры и пути восстановления. Пригодится, когда нужно продумать фидбек после действия. CX Codex +1 854установок

Похожие

better-colors jakubkrehel Скилл проверяет палитры и строит систему цветовых токенов. Он нужен, когда в коде накопились случайные hex-значения, а контраст текста никто не считал. CX Codex +1 32 600установок oklch-skill jakubkrehel Переводит цвета в OKLCH, строит палитры без сдвига тона и проверяет контраст по APCA и WCAG. Пригодится при настройке тем в Tailwind v4 и работе с P3. CX Codex +1 4 600установок tailwind-design-system sickn33 Скилл задаёт агенту рамки работы с Tailwind: токены, варианты компонентов, адаптивные паттерны и доступность. Пригодится, когда UI в проекте разъезжается. CX Codex +1 1 600установок swiss-design zeke Скилл задаёт ИИ-агенту дизайн-систему в духе швейцарского интернационального стиля: типографика IBM Plex Sans, сетка, оттенки stone и акцентный цвет. CX Codex +1 951установок harden aladicf Прогоняет интерфейс через крайние случаи: длинный текст, ошибки сети, RTL, пустые состояния. Полезен перед выкаткой в прод. CX Codex +1 539установок design-system claudekit Скилл собирает дизайн-токены, спецификации компонентов и презентационные слайды. Подойдёт, когда интерфейс и слайды должны следовать одной системе. CX Codex +1 42 700установок

Рядом в теме «Дизайн»

Всё по теме «Дизайн» →

Вопросы о status-colors-and-errors

Как установить status-colors-and-errors в Claude?

Выполните npx skills add dembrandt/dembrandt-skills --skill status-colors-and-errors -a claude-code. Скилл окажется в ~/.claude/skills/status-colors-and-errors/SKILL.md.

Что делает status-colors-and-errors?

Задаёт правила для семантических цветов статусов и состояний ошибок: ограничивает набор цветов, закрепляет за каждым одно значение и требует, чтобы сообщение об ошибке объясняло причину и следующий шаг.

В каких файлах скилл подхватывается?

По путям **/*.css, **/*.scss, **/*.tsx, **/*.jsx, tailwind.config.*, а также в папках tokens, theme, design-system и components.

Исходный текст

SKILL.md · MIT
---
name: status-colors-and-errors
description: Few semantic colours, each meaning one thing, and errors with a way forward. Use when designing status indicators, validation, alerts or error states.
metadata:
  priority: 8
  pathPatterns:
    - "**/*.css"
    - "**/*.scss"
    - "**/tokens/**"
    - "**/theme/**"
    - "tailwind.config.*"
    - "design-system/**"
    - "components/**"
    - "**/*.tsx"
    - "**/*.jsx"
  promptSignals:
    phrases:
      - "error"
      - "warning"
      - "success"
      - "alert"
      - "status"
      - "validation"
      - "feedback"
      - "toast"
      - "notification"
retrieval:
  aliases:
    - error states
    - status colours
    - semantic colours
    - alerts
    - form validation
    - error recovery
    - feedback system
  intents:
    - design error states
    - set up semantic colours
    - handle errors gracefully
    - show validation feedback
    - communicate status to users
  examples:
    - what colours should I use for errors and warnings
    - how should I handle a failed API call
    - design the error state for this form
---

# Status Colours and Error Design

## Keep the Colour Set Small

Every status colour added to a system is a cognitive burden on the user. They must learn what each colour means, remember it, and interpret it correctly under stress — which is exactly when errors occur.

**The minimal set that covers almost everything:**

| Colour | Semantic meaning | Always means |
|---|---|---|
| **Red** | Error / failure / destructive | Something went wrong, or this action cannot be undone |
| **Orange / Amber** | Warning | Something needs attention before proceeding |
| **Green** | Success / positive | Action completed, state is healthy |
| **Blue** | Info / neutral status | Informational, no action required |

**Rule: each colour maps to exactly one meaning across the entire product.** If orange means "warning" in one component and "pending" in another, the system breaks down.

**Every status tone must be visibly distinct from the others.** If two tokens render alike, keep one. A second name for the same visible colour is not a second status: authors pick either, users read one state, and the name becomes a lie. Draft and pending states take neutral, not the warning tone.

When in doubt, cut the colour — neutral grey communicates status without semantic weight, and neutral is better than a misused semantic colour.

## Orange Is Always a Warning

Orange (amber) carries a specific signal: pay attention, something may go wrong. Do not use it for:
- Neutral states (use grey)
- Progress or pending (use blue or a spinner)
- Informational content (use blue)
- Branding or decorative purposes inside status indicators

If orange appears in the UI, the user should immediately know it requires their attention.

## Errors Should Be Recoverable

**The worst error is one the user cannot recover from.** Design every error state with a path forward.

### Error message anatomy
Every error should answer three questions:
1. **What went wrong?** — plain language, no error codes
2. **Why did it happen?** — if useful and known
3. **What should the user do next?** — specific, actionable

```
❌ "Error 500"
❌ "Something went wrong"
✓  "We couldn't save your changes. Check your connection and try again."
✓  "This email is already in use. Sign in instead, or use a different email."
```

### Recovery actions
- Always provide a retry button for transient failures (network errors, timeouts)
- For validation errors, point directly to the problematic field
- For destructive actions that failed, reassure the user nothing was lost
- For session expiry, redirect to login and return the user to where they were

## Prevent Large Errors Before They Happen

The most damaging errors — data loss, irreversible actions, broken state — should be prevented at the design level, not handled after the fact.

- **Confirm before irreversible actions:** "Delete this project and all 47 tasks? This cannot be undone."
- **Disable unavailable actions** rather than letting users trigger them and hit an error
- **Autosave** where possible so a browser crash or accidental close does not destroy work
- **Optimistic UI** with rollback: show the success state immediately, silently retry on failure, surface an error only if the retry also fails

**State the consequences *before* the user acts, not after.** Fear comes from not knowing what a control will do. Make the outcome legible ahead of the action so the user commits with confidence:
- **Plain-language consequence text** next to or inside the control: "This will email all 240 subscribers", "Publishing makes this visible to everyone".
- **Staged guidance** for anything multi-step or heavy: break it into steps and tell the user what each one will do before they proceed, so the whole operation is predictable rather than a leap.
- Reserve the strong interruptions (confirm dialogs, typed confirmation) for the genuinely dangerous cases above; for everyday actions, a quiet line of helper text is enough. The goal is the same — no surprises, so nothing feels scary.

## Levels of Severity — Use Sparingly

Not every problem is equal. Match the visual weight of the feedback to the severity.

| Severity | Pattern | When to use |
|---|---|---|
| **Blocking error** | Full-page error state or modal | App cannot continue, user must act |
| **Inline error** | Red text below a field | Form field validation failure |
| **Toast / snackbar** | Temporary notification, bottom of screen | Transient failure the user should know about but can dismiss |
| **Alert banner** | Persistent bar at top of section | Ongoing issue affecting the current context |
| **Empty state** | Illustrated or descriptive empty screen | No data yet — use as an opportunity for guidance, not just a blank |

Avoid showing multiple simultaneous error types at once — one clear message is more useful than three overlapping alerts.

## Degree of Likeness Is One Hue, Never Red to Green

This is about amount, not state. Status still takes the semantic palette above, and a chart with a known convention keeps it (see [[data-display-and-selection]]). When a cell shows how alike two things are, or how much of something there is, shade it on one hue from near black (nothing in common) to the accent (the same). Red and yellow at the low end read as warnings and turn a page of differences into an error; green reads as a grade. A single hue reads as an amount, which is what the number is.

## Review Checklist

- [ ] Does the product use four or fewer semantic status colours?
- [ ] Does each colour mean exactly one thing, used consistently everywhere?
- [ ] Does every status tone render visibly different from every other, with look-alike tokens merged?
- [ ] Is orange/amber reserved exclusively for warnings?
- [ ] Does every error message state what went wrong and what to do next?
- [ ] Do all transient errors (network, timeout) have a retry action?
- [ ] Are irreversible destructive actions protected by a confirmation step?
- [ ] Is autosave or draft recovery available for long-form or complex inputs?
- [ ] Are multiple simultaneous error states avoided?
- [ ] Is a similarity or magnitude scale drawn on one hue, with warning and success colours kept for state?

## Common Anti-Patterns

| Anti-pattern | Problem | Fix |
|---|---|---|
| "Something went wrong" with no action | User is stuck with no path forward | Add specific cause and a retry or contact link |
| Orange used for "pending" and "warning" simultaneously | Colour loses its meaning | Orange = warning only; use blue or spinner for pending |
| Five or more status colours (red, orange, yellow, teal, purple…) | User must learn and remember a complex legend | Cut to the minimum: red, orange, green, blue |
| Inline validation only on submit | User discovers all errors at once | Validate on blur (leaving a field) for immediate feedback |
| No confirmation on delete | Users accidentally delete data | Require explicit confirmation for all irreversible actions |

© dembrandt · MIT · dembrandt/dembrandt-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой