component-state-auditor — скилл для Claude Code
Скилл component-state-auditor для Claude Code сравнивает задокументированные состояния компонентов с правилами из файла rubric.json. Он помогает выявить недостающие состояния в коде и дизайне перед релизом.
MIT ★ 529 обновлён 2026-11-17
npx skills add ShuaiMXu/happyhands --skill component-state-auditor -a claude-codeЧто делает component-state-auditor
Этот скилл автоматизирует проверку компонентов, сопоставляя их описание с требованиями из локального файла rubric.json. Инструмент разделяет анализ на две части: сравнение проектной документации с требованиями класса и поиск признаков состояний в исходном коде.
Для работы требуется файл rubric.json в корне проекта, определяющий наборы состояний для классов вроде async-task-item, collection или interactive-control. Без этого файла скилл не определит, какие именно состояния ожидаются от компонента.
Скилл анализирует путь к исходникам и выводит список расхождений, включая состояния, которые есть в коде, но отсутствуют в документации. Он не проверяет доступность, клавиатурную навигацию или визуальное отображение состояний при запуске приложения.
Какие задачи решает
- Сверить задокументированные состояния компонентов с требованиями проекта
- Найти состояния, реализованные в коде, но не описанные в дизайне
- Выявить недостающие сценарии работы для async-task-item
Примеры запросов агенту
- Проверь компонент Button с помощью component-state-auditor
- Проанализируй список компонентов в директории components/ через component-state-auditor
Как установить component-state-auditor
1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill component-state-auditor -a claude-code2Вручную: положить файлы
~/.claude/skills/component-state-auditor/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/component-state-auditor/
1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill component-state-auditor -a codex2Вручную: положить файлы
.agents/skills/component-state-auditor/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill component-state-auditor -a cursor2Вручную: положить файлы
.cursor/skills/component-state-auditor/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ShuaiMXu/happyhands skills/product-design/component-state-auditor2Вручную: положить файлы
.github/skills/component-state-auditor/SKILL.md1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill component-state-auditor -a gemini-cli2Командой платформы
gemini skills install https://github.com/ShuaiMXu/happyhands --path skills/product-design/component-state-auditorВручную: положить файлы
.devin/skills/component-state-auditor/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о component-state-auditor
Как установить component-state-auditor в Claude Code?
Выполните команду npx skills add ShuaiMXu/happyhands --skill component-state-auditor -a claude-code в терминале вашего проекта.
Что делает этот скилл?
Он проверяет, все ли необходимые состояния компонентов описаны в документации и реализованы в коде, опираясь на правила из rubric.json.
Что нужно для работы?
В проекте должен находиться файл rubric.json с описанием классов компонентов и их обязательных состояний, а также сами исходники компонентов.
Исходный текст
SKILL.md · MIT
--- name: component-state-auditor description: "Audit documented components against a versioned rubric of the states their class has to be able to express." --- # Component State Auditor A surface that renders only its success state is not finished. The states nobody drew are the ones that decide whether a person can keep working: the queue before anything happens, the half-finished run, the failure with no way back. ## Required evidence - a design foundation with components - component sources - `rubric.json` beside this file, which holds the required state sets ## The rubric `rubric.json` names classes of component and what each class has to be able to express. A class is matched from the component name. The default rubric ships three classes: - **async-task-item** — a unit of work the product performs over time (a generation, render, upload, export, job). Requires `empty`, `pending`, `in-progress`, `complete`, `needs-review`, `failed`, plus a stated failure reason and a retry. Work that takes time fails, partially succeeds, and produces output a person has to check before trusting it. - **collection** — a list, table, grid or feed. Requires `empty`, `in-progress`, `complete`, `failed`, plus a stated failure reason. A collection is empty before it is full, and its empty state is the first thing a new user sees. - **interactive-control** — a button, input, select, toggle or field. Requires `default`, `disabled`, `in-progress`. The required sets are the judgement of this Skill version, not a universal rule. A project with different classes of component replaces `rubric.json`, and every result records which rubric version produced it. ## Two tiers, kept apart **Documented.** The states a component declares in the foundation, compared with what its class requires. A data comparison with nothing inferred, so it can be stated plainly: this component documents four states and its class requires six. **Observed.** State words found in the component's source. This is evidence, never proof. The absence of a word is not the absence of a state, and the presence of one is not a state that works. Report it at low confidence, with the file it came from, for a person to check. A state the source shows but the foundation does not document is its own result: the implementation moved and the documentation did not. ## Decisions - Check only the states the component's class needs. A component that matches no class has nothing required of it, and that is reported rather than filled in with a default set. - Cite the source path and the words found, so a reviewer can confirm or dismiss each one quickly. - Leave the direction open. A missing state may belong to another component, or the class may be wrong; the audit names the gap and records `add-the-state`, `document-the-state` or `reclassify-the-component` as an unresolved choice. - Do not add decorative states without a user need. ## Boundary Source analysis cannot prove that a runtime state is reachable, correct or accessible. Keyboard focus, screen-reader behaviour and visual treatment of each state remain outside this audit. Match the recorded repository-relative source path exactly. A legacy path without an extension may match one unique implementation at that same path; a same-named file in another directory or an ambiguous extension is not evidence. Missing sources and truncated snapshots keep the result `needs-evidence`, while preserving the documented-state comparison. The release regression corpus covers documented controls, missing states, wrong same-named sources, ambiguous implementations and missing/truncated inputs; it does not establish runtime state quality or operational maturity. For an offline HTML bundle, scan only its explicit decoded JSON template using the shared source decoder. Preserve template coordinates and the enclosing source identity. Loader code and manifest payloads are not component state or recovery evidence. An unreadable template stays unavailable, with its decoding error; never fall back to scanning the outer bundle. Template text still provides only static candidates, not proof of rendered behaviour. Return structured evidence, findings, proposed updates and limitations. Use `needs-evidence` when required inputs or professional review are missing. Never invent an Experience Score or promote a project observation into a universal rule.
© ShuaiMXu · MIT · ShuaiMXu/happyhands