bklit-ui-design — скилл для Claude Code: оформление графиков
Скилл bklit-ui-design для Claude Code превращает описание внешнего вида графика в компоненты и props Bklit UI. Включается, когда нужно подобрать оформление или привести графики к теме приложения.
MIT 308 установок ★ 1 999 обновлён 2026-10-23
npx skills add bklit/bklit-ui --skill bklit-ui-design -a claude-codeЧто делает bklit-ui-design
Скилл сопоставляет описание графика с компонентами Bklit UI и настраивает их под дизайн проекта. Он определяет версию Tailwind, формат цветов, режим тёмной темы и токены; затем подбирает готовый вариант, устанавливает нужные элементы реестра и пишет JSX с импортами из алиаса проекта.
В комплекте есть скрипт scripts/detect-design.mjs, справочник соответствий, рецепты и правила оформления. Для скрипта нужен Node 18 или новее. Компоненты устанавливаются через shadcn CLI, например npx shadcn@latest add @bklit/bar-chart; если запрос требует неподдерживаемый эффект, скилл сообщает об этом и предлагает близкий вариант.
Какие задачи решает
- подобрать компоненты графика по словесному описанию
- оформить графики в цветах и режиме темы приложения
- перевести термины стилей другой библиотеки в компоненты Bklit UI
- найти подходящий вариант для неподдерживаемого эффекта
Примеры запросов агенту
- Сделай столбцы графика объёмными, как стекло, и подстрой цвета под тему проекта.
- Добавь графику диагональный фон, который затухает по краям.
- Приведи графики Bklit к тёмной теме и радиусу скругления приложения.
Как установить bklit-ui-design
1Через Skills CLI (Vercel)
npx skills add bklit/bklit-ui --skill bklit-ui-design -a claude-code2Вручную: положить файлы
~/.claude/skills/bklit-ui-design/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/bklit-ui-design/
1Через Skills CLI (Vercel)
npx skills add bklit/bklit-ui --skill bklit-ui-design -a codex2Вручную: положить файлы
.agents/skills/bklit-ui-design/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add bklit/bklit-ui --skill bklit-ui-design -a cursor2Вручную: положить файлы
.cursor/skills/bklit-ui-design/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install bklit/bklit-ui skills/bklit-ui-design2Вручную: положить файлы
.github/skills/bklit-ui-design/SKILL.md1Через Skills CLI (Vercel)
npx skills add bklit/bklit-ui --skill bklit-ui-design -a gemini-cli2Командой платформы
gemini skills install https://github.com/bklit/bklit-ui --path skills/bklit-ui-designВручную: положить файлы
.devin/skills/bklit-ui-design/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add bklit/bklit-ui --skill bklit-ui-design -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о bklit-ui-design
Как установить bklit-ui-design в Claude Code?
Выполни npx skills add bklit/bklit-ui --skill bklit-ui-design -a claude-code. Файл скилла появится по пути ~/.claude/skills/bklit-ui-design/SKILL.md.
Что делает bklit-ui-design?
Скилл переводит описание желаемого вида графика в компоненты и props Bklit UI, а затем подстраивает их под токены и тему проекта.
Что нужно для работы bklit-ui-design?
Для скрипта определения дизайна нужен Node 18 или новее. Компоненты Bklit UI устанавливаются через shadcn CLI.
Исходный текст
SKILL.md · MIT
---
name: bklit-ui-design
description: >
Turns plain-language chart design requests into exact Bklit UI (@bklit shadcn
registry) components and props, styled to fit the host app. Use when someone
describes how a chart should look rather than naming props, e.g. "diagonal
pattern background that fades out", "squircle bars", "3D glass bars", "hatched
area", "dot grid", "skeleton loading state", "dashed forecast", "half donut",
"make the charts match my brand / dark mode / border radius". Detects the
project's Tailwind version, colour format, dark-mode strategy, radius and
existing chart tokens, then picks a proven recipe, installs the right
@bklit/<item>, adapts colours to theme tokens and states honestly when Bklit
has no prop for the request. Also use when theming or restyling Bklit charts.
---
# Bklit UI design
Map what people *say* ("a hatched backdrop that fades at the edges") to what
Bklit *has* (`<Background />`), then make it look native to the app it lands in.
Bklit charts are installed as source with `npx shadcn@latest add @bklit/<item>`
(use the project's runner: `pnpm dlx`, `bunx --bun`, …) and imported from the
project's alias, e.g. `@/components/charts/background`. Never import from
`@bklitui/ui/charts` — that is the private monorepo package.
## Workflow
### 1. Detect the host design
Run the bundled detector from the user's project root. `<skill-dir>` is the
folder containing this SKILL.md (commonly `.claude/skills/bklit-ui-design`,
`.agents/skills/bklit-ui-design` or `~/.claude/skills/bklit-ui-design`):
```bash
node <skill-dir>/scripts/detect-design.mjs
```
Zero dependencies, Node ≥ 18, never throws. It prints JSON: `tailwindVersion`,
`cssPath`, `colorFormat`, `darkMode`, `tokens` (`--primary`, `--radius`, …),
`chartVars` (light/dark `--chart-*`), `themeInline`, `components` (from
`components.json`), `primitives`, `chartLibs`, `bklit.installed` and
`warnings`. Agents without shell access: read `components.json`, the global CSS
file it names, and `package.json`, and collect the same facts by hand.
Read `warnings` first — they flag the problems that make charts look broken
(gray default palette, Tailwind v3 bare-HSL tokens, missing `@theme` mappings).
### 2. Parse the request into design intents
If the request uses another library's styling words (Nivo `borderRadius`, `enableGridX`, `colors={{ scheme }}`; Recharts `radius`, `CartesianGrid`, `Cell`), translate them first with the **bklit-ui-vocabulary** crosswalk.
Split the sentence into intents (background, fade, shape, fill, line, markers,
tooltip, grid, legend, loading, motion, annotation) and look each up in
[references/vocabulary.md](./references/vocabulary.md). Example:
> "squircle bars with a ghost track and a ring on hover"
> → shape: `BarSquares squareRadius={0.5}` + `BarChart squareSnap` ·
> track: `BarColumnTrack` · tooltip: `ChartTooltip dotVariant="ring" dotRadiusFraction={0.5}`
> "diagonal pattern background that fades out on all sides"
> → `<Background />` (diagonal and 4-side fade are the defaults)
### 3. Pick a recipe and adapt it
Start from the closest composition in [references/recipes.md](./references/recipes.md)
rather than assembling from scratch — those are the gallery's proven looks.
Then adapt to the detection output:
- colours → `var(--chart-1..5)` / `chartCssVars`, never literals;
- corner style → host `--radius` (rules/taste.md §4);
- density → fewer grid rows / no background in small dashboard cards;
- palette, dark mode, Tailwind v3 quirks → [rules/theming.md](./rules/theming.md).
### 4. Install the registry items
Install every item the composition touches (the vocabulary's import table lists
which slug provides each export), e.g.:
```bash
npx shadcn@latest add @bklit/bar-chart @bklit/bar-depth @bklit/chart-tooltip
```
shadcn adds missing CSS variables without overwriting the host's existing ones.
If `@bklit` does not resolve, see the `bklit-ui` skill's installation notes.
### 5. Confirm props against the installed source
Open the installed files (`components/charts/<file>.tsx`) and check every prop
you plan to use exists with the expected type. The registry source is the
contract; this skill can lag behind it.
### 6. Apply the taste rules
Run through [rules/taste.md](./rules/taste.md): one decorative layer, subtle
backgrounds, no stacked effects, corners matching `--radius`, rings with
squares, tokens only, dark mode verified, unique pattern ids.
### 7. Be honest about gaps
If the request needs something Bklit lacks (see "Not supported" in the
vocabulary — e.g. hexagon `Background` preset, glow on areas or bars, stacked
areas, value labels on lines), say so plainly, then offer the nearest supported
look or a small custom composition (recipe 15 shows the pattern). Never invent
props such as `pattern="hexagons"` or `Bar glow`.
If the user can't name what they want ("the line that follows the mouse",
"the dot on a stick"), the **bklit-ui-vocabulary** skill turns the description
into the term and the Bklit component first.
## Output checklist
- Install command(s) with the exact `@bklit/<item>` slugs.
- Complete JSX with imports from the project alias.
- Any CSS token changes, in the host's colour format, for light **and** dark.
- One line per honest gap or trade-off.
- Links when useful: `https://bklit.com/docs/components/<slug>`,
`https://bklit.com/charts/<slug>`, `https://bklit.com/studio?chart=<slug>`.
## Files
| File | Use |
|---|---|
| [references/vocabulary.md](./references/vocabulary.md) | Phrase → JSX/props → registry slug; import map; unsupported list |
| [references/recipes.md](./references/recipes.md) | 15 complete compositions for named looks |
| [rules/taste.md](./rules/taste.md) | Design rules with incorrect/correct pairs |
| [rules/theming.md](./rules/theming.md) | Host signals → chart token overrides (v4, v3, dark mode) |
| [scripts/detect-design.mjs](./scripts/detect-design.mjs) | Design detection (JSON) |
| [evals/evals.json](./evals/evals.json) | Behaviour checks for this skill |
© bklit · MIT · bklit/bklit-ui