Ship design-system Claude skills in the react-components package - #147
Open
RomanPogorov wants to merge 1 commit into
Open
Ship design-system Claude skills in the react-components package#147RomanPogorov wants to merge 1 commit into
RomanPogorov wants to merge 1 commit into
Conversation
Distribute the hs:react-components and hs:layouts skills with the package itself so any consumer gets them, version-locked to the installed release. - Move skills into packages/react-components/skills/ (source of truth) and add skills + bin to files so they publish. - Generate the component skill from source (cva variants + story argTypes) via scripts/skill/generate.mjs; config.json holds curated metadata; a guard errors when a component is missing, and check-skill gates staleness. - Enrich every component reference with props/states/composition/type; add patterns.md (rules), tokens.md, icons.md. - Add hs:layouts: recommended app-shell/list/master-detail/editor/console/ builder/states patterns distilled from Aidbox UI. - Add bin `hs-react-components sync-skills` (copy default, --symlink) that installs skills into a project's .claude/skills and gitignores them. - create-react-app --skills wires a postinstall that runs sync-skills. - pre-commit runs check-skill; bump to 0.0.0-alpha.22. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Distributes the
hs:react-componentsandhs:layoutsClaude skills inside@health-samurai/react-componentsso any consumer of the package gets them — version-locked to the installed release.How consumers use it
sync-skillscopies the skills into<project>/.claude/skills/(or--symlink) and gitignores them. Wiring it to the consumer'spostinstallkeeps skills matched to the installed package version.Contents
packages/react-components/skills/(source of truth);skills+binadded tofilesso they publish.hs:react-components— generated from source: every component with its props/states/variants/defaults, composition parts, exported*Propstype, pluspatterns.md(rules),tokens.md,icons.md. Generator:scripts/skill/generate.mjs(extractscvavariants + storyargTypes);config.jsonholds curated metadata; a guard errors if a component is missing from config;check-skillgates staleness (wired into pre-commit).hs:layouts— recommended app-shell / list / master-detail / editor / console / builder / states patterns distilled from Aidbox UI (framed as recommendations, not requirements).binhs-react-components sync-skills(copy default,--symlink,--dir).--skillsnow wires apostinstallthat runssync-skills.0.0.0-alpha.22.Notes
scripts/skill/config.json, runpnpm generate-skill. The guard makes this non-optional.noNonNullAssertionlint findings insrc/components/code-editor/*are untouched by this PR.🤖 Generated with Claude Code