What problem does it solve?
This Skill resolves the challenge of turning the Stack-and-Flow design system into a correctly distributable npm package, so component consumers can import efficiently and without dependency or export issues.
Core Features & Use Cases
- NPM export and entry-point architecture: Designs a root API barrel and per-component import paths (e.g.,
@stack-and-flow/design-system/button) to enable proper bundler-level tree-shaking.
- Vite library-mode build setup: Proposes a dedicated
vite.config.lib.ts to build ESM+CJS outputs in a way that preserves module structure for independent component consumption.
- Dependency hygiene for React ecosystems: Ensures React and ReactDOM are handled via
peerDependencies, while runtime packages remain in dependencies, preventing duplicate React instances.
Use case example: A developer wants import { Button } from '@stack-and-flow/design-system/button' to work in their app with correct TypeScript types, CSS availability for tokens, and minimal bundle size via per-component exports.
Quick Start
Ask the AI to audit the current package state, then generate the concrete file and package.json changes needed to publish the design system as a proper npm library with per-component exports and React-safe dependencies.