/howells-skills:componentizefrom howells-skills
Consolidates duplicated UI into shared components, splits god files, and extracts packages while preserving appearance and behavior.
Ships in howells-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Find what already exists, make it the one canonical version, and move every caller onto it. Don't centralise the whole UI unless asked for a design-system project.
When the user points at something on screen ("the right panel", "that header"), open the running app if available, map the region to its source file through text, labels and test ids, and ask one question if several regions match. Don't guess from layout direction.
Extend the repo's existing system; never mix a second one in for one extraction.
cva + VariantProps, cn/twMerge for className, Radix Slot/asChild for polymorphic leaves.@base-ui-components/react): render prop, and useRender + mergeProps for custom polymorphic primitives. No asChild clone.slots/slotProps.tailwind-variants, CSS modules, Vanilla Extract, Panda: extend that.cva only when several call sites show real variants; otherwise plain cn(...).Shared components accept className, leave outer margins to callers, forward refs and spread DOM props on interactive leaves, merge handlers, refs, styles and ARIA with the repo's helper, and keep their accessibility contract. Polymorphism only where props, refs and semantics can pass validly to the child; never as an escape hatch for unclear ownership.
Server Components (Next.js App Router): keep shared primitives environment-agnostic and free of 'use client' unless they use client APIs. Wrap the interactive bit in the smallest client component and pass server UI through as children. Don't make a route, table or shell client-side for one stateful control, and don't move a component across the boundary before checking its imports and props are valid there. Serializable props only (Server Functions allowed).
packages/ui.@repo/ui/button are fine, private source paths are not). Add the dependency where imports cross packages; don't weaken boundaries to make imports pass.exports for JS and types, CSS exports and sideEffects, whether consumers transpile source, peer deps (React, framework, Radix, icons), and Tailwind v4 @source so the app scans the package's classes. A missing @source silently drops the package's styles.Length alone is never the reason. Split when a file mixes responsibilities, duplicates logic, changes for unrelated reasons or has a public interface that could be smaller. Rank candidates with the scanner; its score is a lead, so read the file before deciding:
python3 <this skill's directory>/scripts/find-god-files.py /path/to/repo # --min-score N, --duplicate-window N, --include-tests, --json
Split in this order, one candidate at a time, running the smallest relevant check after each: pure helpers; duplicated logic, before moving callers; hooks and state machines where state is tangled; leaf subcomponents before shells; I/O adapters away from domain logic in scripts.
Content or Wrapper. Keep state with the component that owns the interaction. Avoid many shallow files that must all be opened to understand one behaviour.Define the boundary first. In: the code, its types, styles, assets, fixtures, tests and examples. Out: routes, auth, database clients, env access, product copy, analytics, flags and old-path shims. Report hidden coupling before editing. Before extracting a package, read references/package-extraction.md: the styling contract, the checks before calling it done and the common failures.
For many charts, cards or examples moving onto one kit: capture a baseline before touching anything (fixed data, viewport, settled state) and never regenerate it from changed code. Migrate one family at a time, deriving the API from its call sites; callers keep distinct marks and semantics. Finish by searching for old imports and inline copies across the whole collection.
Check changed exports in their consumers. When shared UI moved, open the affected pages (or Storybook) and compare against before; exercise keyboard and focus on interactive primitives.
Asked for analysis rather than changes: list the existing shared surface, then opportunities ranked, each with file:line evidence, call-site count, action (reuse / adapt / extract / move / none), the proposed API and where it would live.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
33 skills in this plugin
/armatureTurn a web app that scrolls like a document into an app shell with fixed chrome and panes that scroll on their own. Use when headers, toolbars or filters scroll out of view. Not for visual polish (`chiaroscuro`) or small-screen layout (`reflow`)./ask-howellsRoute a situation to the skills in this collection and the command to type. Not for doing the work./blenderInspect, edit and render Blender scenes and films through the Blender MCP or headless CLI. Not for Remotion films (`rostrum`)./browseDrive the user's real Chromium browser (logins, tabs, extensions) via the browse MCP: logged-in/JS sites, forms, screenshots, recordings, HAR capture, and 2FA/payment handoffs. Not for QA (`fieldtest`) or native Mac apps (`computer-use`)./chiaroscuroDesign, build, polish or critique web UI in Tailwind v4. Use when an interface should look gorgeous, looks generic or unfinished, or feels off. Not for design options (`maquette`), app shells (`armature`), screen sizes (`reflow`), Paper (`paste-up`) or QA (`fieldtest`)./computer-useControl Mac apps, including signed-in Chrome, with native Computer Use or a headless Codex runner. Not for browser-only QA (`fieldtest`).npx claudepluginhub howells/skills --plugin howells-skills