/sitecore-blok:blok-setupfrom Sitecore Blok
Provides exact commands to scaffold Blok (Sitecore's shadcn-based design system) into a project: shadcn init, theme install, registry aliases, and first component. Use when adopting Sitecore design language.
Ships in Sitecore Blok. 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.
Do not install Chakra or @sitecore/blok-theme — that's legacy Blok v1. Always use the shadcn registry path below.
| Requirement | Minimum | Notes |
|---|---|---|
| Node.js | 16+ | shadcn CLI requirement |
| npm | 10+ | or pnpm/yarn equivalent |
| Tailwind CSS | v3 or v4 | must be configured before shadcn init |
| React | 18+ | primitives assume modern React |
| TypeScript | Recommended | registry components ship with .tsx + types |
For Next.js projects, Tailwind is enabled via the --tailwind flag at create-next-app time.
For Vite projects, shadcn auto-detects Vite during init.
npx shadcn@latest init
Follow the prompts:
@/* is fineThis creates components.json at the project root.
Run this before adding any component. The theme provides the CSS variables that all Blok primitives and bloks depend on.
npx shadcn@latest add https://blok.sitecore.com/r/theme.json
This writes Blok's color, typography, spacing, radius, and shadow tokens into your global CSS and Tailwind config.
Adding Blok as a named registry in components.json lets you reference components as @blok/button instead of the full URL.
Edit components.json to add:
{
"$schema": "https://ui.shadcn.com/schema.json",
"registries": {
"@blok": "https://blok.sitecore.com/r/{name}.json"
}
}
After this, installs become:
npx shadcn@latest add @blok/button @blok/card @blok/dialog
Without the registry entry, use the full URL form: npx shadcn@latest add https://blok.sitecore.com/r/button.json.
Individual primitive:
npx shadcn@latest add @blok/button
Multiple at once:
npx shadcn@latest add @blok/button @blok/card @blok/dialog @blok/input
A full blok (composite block):
npx shadcn@latest add @blok/topbar
npx shadcn@latest add @blok/sidebar-rhs
npx shadcn@latest add @blok/dashboard-widget
See the blok-components skill for the full catalog.
@/ alias: import { Button } from "@/components/ui/button"bg-primary, text-foreground)If styling looks generic shadcn instead of Blok: the theme wasn't installed — re-run Step 2.
The Nova preset's scaffolded app/layout.tsx already loads Geist Sans and Geist Mono via next/font/google. Do not additionally npm install geist and import from geist/font/sans — that adds a parallel font loader that fights the scaffolded one (duplicate @font-face rules, two sets of CSS variables, flash of unstyled text on cold loads).
Instead: use the scaffolded next/font/google loader and, if your project / Tailwind layer expects the canonical --font-sans / --font-mono variable names, rename Next's emitted variables to those names:
// app/layout.tsx — scaffolded form, renamed to canonical variable names
import { Geist, Geist_Mono } from "next/font/google";
const geistSans = Geist({ variable: "--font-sans", subsets: ["latin"] });
const geistMono = Geist_Mono({ variable: "--font-mono", subsets: ["latin"] });
export default function RootLayout({ children }) {
return (
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
{children}
</body>
</html>
);
}
Heads-up: the scaffolded app/globals.css contains a self-referential token declaration that looks broken at first glance — something like:
--font-sans: var(--font-sans);
It is not a bug. The var(--font-sans) on the right-hand side is the variable that next/font/google publishes on the <body> (from geistSans.variable above); the --font-sans on the left is the Tailwind / Nova token consumers reference. The rule only becomes meaningful once app/layout.tsx sets the outer variable with a real font loader. A newcomer inspecting globals.css in isolation can spend five minutes staring at the no-op CSS rule before the layering clicks — flag it so future builders skip the detour.
Blok's Nova preset is Tailwind v4, which is CSS-first. There is no tailwind.config.ts in a scaffolded project (verify with ls — you won't find one). Design tokens (colors, shadows, motion, typography, spacing, radius) live in app/globals.css inside the @theme inline { … } block, not in a JS config file.
When an implementation plan, ADR, or code-review checklist references "extend the Tailwind config" or "add a color to tailwind.config.ts", that's Tailwind v3 language. Translate to v4 before acting:
| v3 (legacy) | v4 / Nova preset (current) |
|---|---|
Extend colors in tailwind.config.ts → theme.extend.colors | Add --color-<name>: …; inside @theme inline { … } in app/globals.css |
Extend spacing / typography in theme.extend.* | Add --spacing-<name> / --font-<name> inside @theme inline { … } |
Declare keyframes in theme.extend.keyframes + animation in theme.extend.animation | @keyframes <name> { … } at the top level of app/globals.css + --animate-<name>: <name> <duration> <easing>; inside @theme inline { … } |
plugins: [require('tailwindcss-animate')] | @import "tw-animate-css"; at the top of app/globals.css (the quickstart already does this) |
No tailwind.config.ts file is present, needed, or correct to create for Nova preset work. If an implementation plan says "edit tailwind.config.ts", treat that as a doc bug and patch the token inside @theme inline { … } in globals.css instead.
npm install @sitecore/blok-theme — that's the deprecated Chakra v1 routeshadcn add so future updates are traceabletailwind.config.ts "to extend Blok" — Nova is Tailwind v4; extend @theme inline { … } in app/globals.css instead (see section above)Record in your project's dependencies log (or the implementation plan's dependencies section):
shadcn CLI used (version auto-resolved via @latest)components.json exists with @blok registry entry<list> (from components/ui/ directory)No package-lock entry is added for Blok itself — it's code-owned, not dependency-managed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub chris1415/sitecore-skills-pocs --plugin sitecore-blok5 skills in this plugin
/blok-componentsCatalog of Blok primitives (65+) and composite bloks with registry URLs and the Marketplace quickstart inventory. Use to pick the right Sitecore-styled building block before writing custom markup in a Marketplace app or any Sitecore-styled UI./blok-marketplace-integrationHow Blok works inside a Marketplace app: iframe size limits per extension point, which Bloks fit where, shell patterns, theming in iframes, public-app submission checklist. Load when building a Marketplace app with Blok UI./blok-mcpConfigures the Blok MCP (via the shadcn MCP server) for Claude Code, Cursor or VS Code, so agents can list, add and compose Blok components. Use for AI-assisted UI in a Sitecore-styled project; needs blok-setup first./blok-themingBlok theming tokens (colors, typography, spacing, radius, shadows, breakpoints) and how to customise while staying on brand: dark mode, RTL, iframe limits. Load before overriding any visual style in a Blok-based app.