React audit
Use when: auditing packages/react for completeness — every exported component should have a Storybook story, docs, and Figma Code Connect file. Covers gap detection, prioritisation, and the fix workflow for packages/react only.From its SKILL.md
npx -y skills add utilitywarehouse/hearth --skill react-auditAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.7 KB, as published. Nobody here has run it
React Audit
Periodic health check for packages/react (@utilitywarehouse/hearth-react). This skill is scoped to the React package only — for React Native, see react-native-component-docs.
Scope
Run this audit against packages/react/src/. The full list of exported components lives in packages/react/src/index.ts. Check each one against the checklists below.
Intentional exceptions (do not flag these as gaps):
| Exception | Reason |
|---|---|
Layout primitives: Box, Flex, Grid, Container | Code-level abstractions — no dedicated Figma component node |
Typography primitives: BodyText, DetailText, Heading, Strong, Em, SectionHeader | Same |
| RadioCard | Documented inside RadioGroup.docs.mdx |
| ToggleGroup | Documented inside ToggleButton.docs.mdx |
Completeness Checklist (per component)
For each name exported from src/index.ts, check:
-
src/components/<Name>/<Name>.stories.tsxexists -
src/components/<Name>/<Name>.docs.mdxexists (or is intentionally covered by a parent component's docs — see exceptions above) -
src/components/<Name>/<Name>.figma.tsexists (or the component is on the exceptions list) -
src/index.tsexports both the component and its prop type (export type)
Docs Quality Checklist (per .docs.mdx)
See react-component-addition for canonical docs authoring rules (sourceState values, StorybookLink import path).
Audit-specific checks:
- No duplicate links in common-props or Alternatives sections
-
## Alternativessection present when 2+ other components serve overlapping use cases -
## Accessibilitysection present for interactive components (keyboard interactions, ARIA roles, focus management) - Table of contents present when the docs page has 4 or more sections
Figma Code Connect Checklist (per .figma.ts)
See figma-code-connect for canonical Code Connect format and structure rules (.figma.ts format, header comments, nestable: true metadata).
Audit-specific gates:
- Output previewed with
npx figma connect printbefore committing - Never publish without explicit user approval
Gap Prioritisation
Triage findings into tiers before acting:
| Tier | What | Why |
|---|---|---|
| 1 — Fix now | Invalid skill instructions, broken attribute values, duplicate content | Mislead contributors or silently break Storybook |
| 2 — Fix soon | Missing docs/stories for user-facing components | Gaps in consumer-facing documentation |
| 3 — Backlog | Mechanical migrations (StorybookLink imports, .figma.tsx → .figma.ts) | High volume, low risk, no semantic change |
| Blocked | Missing Figma Code Connect where no .figma.ts exists | Requires Figma node URL from the user — flag and move on |
Fix Workflow
- Audit: read
src/index.tsfor the full export list; check each component against the checklists above. Usefindorgreprather than reading every file manually. - Report: group findings by tier; call out intentional exceptions clearly so reviewers don't re-flag them.
- Fix by PR group: one logical group per branch — skills, doc fixes, import migrations, Code Connect migrations.
- Run
pnpm checksfrom the repo root before each commit. Fix any new errors before committing. - Stop at each PR boundary: commit and wait for the user to push and confirm the PR is open before starting the next group.
- Figma Code Connect: preview with
npx figma connect printbefore committing; never publish without explicit user approval.
Useful Commands
Run from packages/react unless noted:
# From repo root — run all quality checks
pnpm checks
# Find all .docs.mdx files with invalid sourceState values
grep -rnE 'sourceState="(shown|hidden)"' src/
# Find all .docs.mdx files using relative StorybookLink imports
grep -rn "from '.*shared/storybook/StorybookLink'" src/
# List all components missing a Code Connect file
find src/components -mindepth 1 -maxdepth 1 -type d | while read -r d; do
ls "$d"/*.figma.ts >/dev/null 2>&1 || echo "$d"
done
# Preview a Code Connect file output
npx figma connect preview --file src/components/<Name>/<Name>.figma.ts --token "$FIGMA_CODE_CONNECT_TOKEN"
# Start Storybook to verify docs visually
pnpm dev:react