/itixo-component-library:add-component-library-to-projectfrom itixo-component-library
Add @itixo/component-library to a React project — the `@itixo:registry` scope mapping in the project `.npmrc`, installing the package with tailwindcss 4, importing the library stylesheet into the global CSS, and mounting ComponentLibraryProvider with its config options. Use when a project does not have @itixo/component-library yet, when setting up a new ITIXO frontend, when the project `.npmrc` lacks the @itixo scope mapping (404 from registry.npmjs.org), when library components render unstyled, or when ComponentLibraryProvider is missing or misconfigured. Trigger on indirect phrasing too — "add our component library here", "set up the design system in this app", "wire up the provider", "components have no styles".
Ships in itixo-component-library. 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.
None: SKILL.md is the whole skill.
@itixo/component-library to a projectThis skill is about the project: one-time changes to the repository that every developer then shares. It does not set up anyone's machine — if npm fails with 401 or the developer has no token, use the unlock-itixo-packages skill. For using components after setup (component/prop reference, DashboardLayout, design tokens, styling rules), use the itixo-component-library skill.
.npmrcAdd the scope mapping to the .npmrc in the project root:
registry=https://registry.npmjs.org
@itixo:registry=https://npm.pkg.github.com
The @itixo:registry line scopes only @itixo/* package names to GitHub Packages — everything else still resolves from registry.npmjs.org. These lines are registry configuration, not credentials, so they belong in version control; after adding them, tell the user the change should be committed. A .npmrc is also where npm keeps credentials (_authToken, _password, _auth), so check the project file holds only configuration before committing it. If it contains a token, move it to the user-level ~/.npmrc and tell the user the token was exposed in the repository and should be revoked.
Use the project's package manager — tell it from the lockfile:
| Lockfile | Command |
|---|---|
pnpm-lock.yaml | pnpm add @itixo/component-library@latest [email protected] |
package-lock.json (or none) | npm install @itixo/component-library@latest [email protected] |
yarn.lock | yarn add @itixo/component-library@latest [email protected] |
Run the install yourself. Only when the environment's rules forbid installing packages, give the user the exact command and say which rule applies.
This needs a working credential on the machine — if the install fails with 401, switch to the unlock-itixo-packages skill.
tailwindcss ^4.1.10 is the only peer dependency. React 19, react-router 7, Radix primitives, and the library's other runtime dependencies come in with the package.
In the app's global stylesheet:
@import "@itixo/component-library/dist/index.css";
@import "tailwindcss" and Tailwind source scanning are already handled by the library — don't add them yourself, and don't create a tailwind.config.* file. Import the CSS exactly once, never per component.
| Framework | Global stylesheet |
|---|---|
| Next.js App Router | app/globals.css (imported by app/layout.tsx) |
| Next.js Pages Router | styles/globals.css (imported by pages/_app.tsx) |
| Vite + React | src/index.css (imported by src/main.tsx) |
| Anything else | Wherever the app's single global stylesheet lives |
ComponentLibraryProviderRequired. Mount ComponentLibraryProvider once at the very top of the app — above everything that renders library components. It bundles the providers every library component expects: I18nextProvider (the library's own i18n instance), TooltipProvider, ColorSchemeProvider (light/dark/system theming and per-tenant primary color), and Toaster (so never mount <Toaster /> by hand).
import { ComponentLibraryProvider } from "@itixo/component-library";
export const App = ({ children }) => (
<ComponentLibraryProvider
config={{
allowTheming: true, // enables light/dark/system toggle
allowCustomPrimaryColor: true, // enables per-tenant primary color
}}
>
{children}
</ComponentLibraryProvider>
);
config prop | Type | Default | Description |
|---|---|---|---|
allowTheming | boolean | false | Enables light/dark/system colour-scheme switching |
allowCustomPrimaryColor | boolean | false | Enables per-tenant primary-colour overrides |
allowCustomTypography | boolean | false | When false (strict), raw Tailwind font-size classes (text-sm, text-lg, …) throw in development. Use library tokens (text-small-text, text-heading-1, …) or <Typography> instead. Set true to disable the guard. |
tooltipDelayDuration | number | — | Global tooltip open delay in ms |
language ("en" default, "cs") and toaster config options are covered in the itixo-component-library skill's references/dashboard-layout.md. If the app has its own i18next translations, query the itixo-component-library MCP server's get_integration_guide (topic i18n) before wiring them — the app and the library must share one copy of i18next and react-i18next.
DashboardLayout (optional, recommended)Once the provider is mounted, ask the user whether the app should use DashboardLayout as its app shell. Recommend it, but it is not required — library components work under ComponentLibraryProvider without it. Do not add it without an answer.
When asking, say briefly what it brings: the shared ITIXO navbar (logo, app name, breadcrumbs, agenda waffle menu, account dropdown, settings dialog), an optional sidebar, and a content area — so the app looks and behaves like the other ITIXO apps. If the app already has its own layout, point out that switching replaces it.
If the user says yes, collect what the layout needs before writing code: the current route, the signed-in user (name, email, signOut), the company logo and app name, the sidebar routes, and the framework's Link (and Image, if used) for adapters. Then mount it directly inside ComponentLibraryProvider:
import { ComponentLibraryProvider, DashboardLayout } from "@itixo/component-library";
import Link from "next/link"; // or the router's Link in a non-Next.js app
export const App = ({ children }) => (
<ComponentLibraryProvider config={{ allowTheming: true, allowCustomPrimaryColor: true }}>
<DashboardLayout
currentRoute={pathname}
user={{ name: "Jan Novák", email: "[email protected]", signOut }}
navbar={{ companyLogo: LOGO, appName: "Dashboard UI" }}
navigation={{ sidebarRoutes: ROUTES }}
adapters={{ Link }}
>
{children}
</DashboardLayout>
</ComponentLibraryProvider>
);
For the full prop set (breadcrumbs, agendas, stripe banner, settings, account switching, footer, slots), use the DashboardLayout section of the itixo-component-library skill and its references/dashboard-layout.md, and confirm props with the MCP server's get_component_props for DashboardLayout.
If the user says no, the setup is complete.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/itixo-component-libraryHow to consume the @itixo/component-library npm package inside an external React app — DashboardLayout shell, design tokens, styling rules, and the component/prop reference. For adding the library to a project (scope mapping, install, stylesheet, ComponentLibraryProvider), use add-component-library-to-project; if npm cannot download the package on this machine, use unlock-itixo-packages. Use whenever an ITIXO app imports, themes, or upgrades @itixo/component-library, or whenever the user mentions ITIXO components, DashboardLayout, GenericTable, or design tokens. Trigger on indirect phrasing too — "add a button to match our other apps", "set up our shared layout", "what props does X take", "how do I theme this", "wire up the sidebar / breadcrumbs / waffle menu". When in doubt, trigger./unlock-itixo-packagesSet up a developer machine so npm can download @itixo packages (such as @itixo/component-library) from GitHub Packages — classic personal access token with read:packages, SSO authorization, and storing it in the user-level `~/.npmrc`. Use when a developer is new on a project, runs `npm install` / `pnpm install` for the first time, or the install fails on an @itixo package — 401 "authentication token not provided", "User cannot be authenticated with the token provided", 404 from registry.npmjs.org, or questions about PAT tokens, `~/.npmrc`, SSO authorization, or a hanging `npm login`. Trigger on indirect phrasing too — "I can't install the project", "npm can't find @itixo", "how do I get access to our packages".npx claudepluginhub itixo/itixo-marketplace --plugin itixo-component-library