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

component-docs — скилл для Claude Code: что делает, установка

Скилл component-docs для Claude Code пишет документацию одного UI-компонента по коду, stories и реальным вызовам. Запускается по просьбам документировать компонент или его состояния.

MIT 582 установок ★ 616 обновлён 2026-11-16

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add arla6ka/design.how --skill component-docs -a claude-code
Открыть на GitHub

Что делает component-docs

Скилл component-docs собирает черновик записи об одном компоненте из его кода, типа props, стилей, stories и реальных мест использования. Он раскладывает найденные варианты, свойства, состояния и токены по девяти разделам, добавляет строки Sources и показывает расхождения между источниками.

Правила Usage появляются только при наличии доказательств: двух call sites, измерения с путём, названного принципа или слов автора. Для каждого правила нужен пример кода, который его нарушает. Без кода компонента запуск останавливается; без варианта в props type или stories список вариантов остаётся пустым. Файл сохраняется в docs/system/<name>.md, а отсутствующие файлы примеров записываются отдельно.

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

  • собрать документацию одного UI-компонента из исходников
  • сверить props, варианты и состояния со stories и call sites
  • зафиксировать расхождения между кодом, примерами и реальным использованием
  • сформулировать правила Usage с доказательствами и примером ошибки

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

  • Задокументируй компонент Button по коду, stories и двум реальным вызовам.
  • Опиши состояния Toast, найди источники каждого примера и покажи конфликты.
  • Подготовь запись для Select и сохрани её в docs/system/Select.md.

Как установить component-docs

1Через Skills CLI (Vercel)

npx skills add arla6ka/design.how --skill component-docs -a claude-code

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

~/.claude/skills/component-docs/SKILL.md

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

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

Вопросы о component-docs

Как установить component-docs в Claude Code?

Выполните npx skills add arla6ka/design.how --skill component-docs -a claude-code, затем используйте файл ~/.claude/skills/component-docs/SKILL.md.

Что делает component-docs?

Скилл создаёт черновик документации одного компонента по коду, props type, стилям, stories и реальным вызовам. Он также отмечает конфликты и добавляет правила Usage только с указанными доказательствами.

Что нужно для работы component-docs?

Нужен исходный код компонента, его props type, стили, stories и хотя бы один реальный или запланированный вызов. Без кода запуск останавливается, а без варианта в props type или stories список вариантов будет пустым.

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

SKILL.md · MIT
---
name: component-docs
description: Use to write one component's documentation entry from its code, stories and real call sites, such as "document the button", "write docs for Select", "what states does Toast have", or usage rules for a new or changed component. Not for foundations or pages that span components, which no skill here writes, nor for changing the component, which is build-design-system.
metadata:
  summary: Documents a component
---

# Component docs

A draft entry for one component, built only from what its sources say. Gaps are marked, not filled. It does not judge the design and it publishes nothing. The heading order and a worked example are in `references/doc-format.md`.

## Steps

1. Paste the nine headings from `references/doc-format.md` into the draft, empty.
2. Find the component. Read its code, props type, styles and stories, and record each as a Sources line.
3. Find two real uses, by call-site search or from the ask. One real use or none changes the stop table below.
4. Trace which source gave each example, variant, prop, state and token. Every disagreement between sources is a line under Conflicts, with the quoted rule that settles it, or "no rule, not chosen".
5. Fill each section from sourced facts, copying token names and example code character for character.
6. Write Usage rules last. Each rule is `rule/<component>-<slug>`, a condition, an action, a reason, its evidence (two call sites, a measurement with its path, a named principle, or the person's words), and a `Don't:` line with real code that breaks it. A rule you cannot break with a snippet is cut.
7. Fill Guessed at, one line per judgement call. Reread the draft against the Done list below.

## Output

The entry, then Sources, Conflicts, Guessed at, and Gates (a question with its default) only where a rule adds one. Run on its own, it saves to `docs/system/<name>.md` with a draft comment on line 1 and writes each missing example file. The reply opens with the path, what the entry covers and its status, then up to three questions with defaults and one prompt the person can paste to take the next step.

## Stops

| Missing after searching | Why it stops |
|---|---|
| The code | Nothing else sources the variants, props or behaviour |
| The variant list (props type or stories) | A guessed list documents a different component |
| Any use, real or planned | Invented uses read like real ones and readers copy them first |

A props type with no variant prop is an empty list. Variants reads "None" and the run goes on. One real use, planned uses and a deprecated predecessor are marked as such, not stopped on. A stopped run returns the stop, the facts sourced so far by section, and the smallest reply that unblocks it ("one screen name, what put the component there, and which variant showed").

## Rules

- Never write a variant, prop, token name, example or use that has no listed source. A planned use says planned.
- Never invent a state or a precedence order to make a section look complete.
- A behaviour that looks like a bug is written as it is, followed by a `Defect:` line to the owner with what goes wrong for the user and the smallest fix.
- A part also used on its own gets a `### Parts` subsection under Description. A compound component (`Tabs` with `Tab`) is one entry.
- Do not edit the code, stories or spec being documented.
- Counts in the reply come from `grep -o` on the saved file, below the draft comment.

## Done

Every variant, prop, token and example has a Sources line. Every Usage rule has evidence and a `Don't:` line. Every conflict is shown. The nine headings are present in order, and a section with nothing sourced reads `Not applicable: <reason>`.

© arla6ka · MIT · arla6ka/design.how

Похожие скиллы

Все скиллы по теме «Тексты и документация» →
component-spec Owl-Listener Скилл component-spec для Claude Code описывает компоненты библиотеки: их свойства, состояния, варианты и требования доступности. Запускается при подготовке спецификации компонента. CX Codex +1 2 500установок component-reuse-planner ShuaiMXu Скилл component-reuse-planner для Claude Code решает, переиспользовать ли существующий компонент, расширить его или создать новый. Анализ опирается на реестр компонентов проекта и их статусы. CX Codex +1 ★ 529звёзд репо component-inventory ShuaiMXu Скилл component-inventory для Claude Code собирает карту компонентов с путями к исходникам, вариантами и известными потребителями. Помогает оценивать повторное использование и искать расхождения. CX Codex +1 ★ 529звёзд репо backend-to-frontend-handoff-docs softaworks Плагин backend-to-frontend-handoff-docs готовит документацию по API для фронтенд-разработчиков, когда бэкенд готов к интеграции. ★ 2 707звёзд репо component-canvas ibelick Скилл component-canvas для Claude Code: собирает полноэкранный канвас с панорамированием, зумом и сравнением вариантов. Показывает компоненты дизайн-системы в их текущем состоянии. CX Codex +1 1 800установок component-family-consistency dembrandt Скилл component-family-consistency для Claude Code помогает согласовать стили кнопок, полей, бейджей и других компонентов. Подключается при работе с UI-компонентами, библиотекой компонентов и дизайн-системой. CX Codex +1 1 000установок

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

build-design-system Скилл build-design-system для Claude Code собирает систему дизайна из интерфейса приложения. Запускается для выделения токенов, доработки компонентов или начала такой системы. CX Codex +1 603установок token-mapping Скилл token-mapping для Claude Code сопоставляет жёстко заданные значения стилей с токенами проекта. Запускается для аудита страницы, файла или diff перед миграцией на токены. CX Codex +1 586установок design-system-boss Скилл design-system-boss для Claude Code координирует работу с дизайн-системами в приложениях с готовым пользовательским интерфейсом. CX Codex +1 583установок migrate-design-system Скилл migrate-design-system для Claude Code переносит кодовую базу на готовую дизайн-систему через пошаговый аудит, замеры базового состояния и проверку экранов отдельным верификатором. CX Codex +1 577установок ui-review Скилл ui-review для Claude Code, проводящий ревью интерфейсов, прототипов и текущих сборок. Выполняет проверку доступности, находит ошибки в верстке и ранжирует их по критичности. CX Codex +1 564установок

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

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