use-topbar — скилл для Claude Code: топбар Aura в Flows/Fusion
Скилл ставит в приложение Flows/Fusion единый топбар из @aura/topbar: хлебные крошки, переключатель темы, кнопка Atlas.
npx skills add cognitedata/builder-skills --skill use-topbar -a claude-codeЧто делает use-topbar
@aura/topbar — это компонент из реестра shadcn, а не npm-пакет. Скилл проводит агента по шагам: сначала читает package.json, главный файл разметки и конфиг приложения, чтобы вытащить имя приложения и брендинг, потом задаёт вопросы по конфигурации, ставит компонент через shadcn CLI и подключает хук useThemeMode для светлой и тёмной темы.
Правила жёсткие: ровно один топбар на страницу, собранный только из примитивов @aura/topbar. Если установка через shadcn CLI падает, скилл требует показать блокер, а не городить самодельный хедер. Кнопка Atlas открывает боковую панель EOS, контекст для неё подключает отдельный скилл integrate-fusion-agent; встраивать свой чат в топбар нельзя.
Отдельный шаг создаёт .cursor/hooks.json с хуком sessionStart, чтобы интервью по топбару запускалось в начале каждой сессии Cursor. Если файл уже есть, запись добавляется к существующим хукам. Ещё в проекте должен быть darkMode: 'class' в tailwind.config — без этого переключение темы не заработает.
Какие задачи решает
- добавить в приложение Flows/Fusion единый топбар по внутренним правилам
- собрать хлебные крошки с кликабельными сегментами и именем объекта
- подключить переключатель светлой и тёмной темы через
useThemeMode - вывести справа Share, уведомления, тему, Atlas и аватар пользователя в нужном порядке
- запускать интервью по конфигурации топбара в начале каждой сессии Cursor
Примеры запросов агенту
- добавь топбар в это приложение Flows/Fusion
- настрой хлебные крошки и переключатель темы в топбаре
- прогони интервью по конфигурации топбара
Как установить use-topbar
1Через Skills CLI (Vercel)
npx skills add cognitedata/builder-skills --skill use-topbar -a claude-code2Вручную: положить файлы
~/.claude/skills/use-topbar/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/use-topbar/
1Через Skills CLI (Vercel)
npx skills add cognitedata/builder-skills --skill use-topbar -a codex2Вручную: положить файлы
.agents/skills/use-topbar/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add cognitedata/builder-skills --skill use-topbar -a cursor2Вручную: положить файлы
.cursor/skills/use-topbar/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install cognitedata/builder-skills use-topbar2Вручную: положить файлы
.github/skills/use-topbar/SKILL.md1Через Skills CLI (Vercel)
npx skills add cognitedata/builder-skills --skill use-topbar -a gemini-cli2Командой платформы
gemini skills install https://github.com/cognitedata/builder-skills --path skills/use-topbarВручную: положить файлы
.devin/skills/use-topbar/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add cognitedata/builder-skills --skill use-topbar -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора12
Похожие
Рядом в теме «Фронтенд и UI»
Всё по теме «Фронтенд и UI» →Вопросы о use-topbar
Как установить use-topbar в Claude?
Выполните npx skills add cognitedata/builder-skills --skill use-topbar -a claude-code. Скилл окажется в ~/.claude/skills/use-topbar/SKILL.md.
Что делает use-topbar?
Ставит компонент @aura/topbar из реестра shadcn в приложение Flows/Fusion и собирает топбар: хлебные крошки, опциональные Tabs или Segmented, правую полосу с Share, уведомлениями, темой, Atlas и аватаром.
Что нужно, чтобы топбар заработал?
Компонент ставится через shadcn CLI, а в tailwind.config должен быть darkMode: 'class'. Контекст для боковой панели EOS подключает скилл integrate-fusion-agent.
Исходный текст
SKILL.md · Apache-2.0
---
name: use-topbar
description: >-
Wires the Aura Topbar (@aura/topbar) into Flows/Fusion apps: breadcrumbs,
optional Tabs/Segmented, right strip (Share, notifications, theme, Atlas,
user Avatar), light/dark. Atlas opens the EOS sidebar — wire context with
integrate-fusion-agent; do not embed a chat UI. Use when adding a topbar,
header, breadcrumbs, theme switcher, or Atlas launcher.
allowed-tools: Read, Glob, Grep, Write, Edit, Bash
---
# Topbar
`@aura/topbar` is the single, compliant top navigation bar for every authenticated Flows/Fusion app. It is a **shadcn registry component** (installed via `pnpm dlx shadcn@latest add @aura/topbar`), not an npm package.
- **Storybook:** https://cognitedata.github.io/aura/storybook/?path=/docs/primitives-topbar--docs
- **Full rules:** [RULES.md](RULES.md) · **Interview:** [INTERVIEW.md](INTERVIEW.md) · **Install + code:** [IMPLEMENTATION.md](IMPLEMENTATION.md)
> **Non-negotiables:** Exactly one Topbar per page, composed only from `@aura/topbar` primitives, installed via the shadcn CLI only. If installation fails, surface the blocker — never build a custom header fallback. See [RULES.md §1, §11, §12](RULES.md).
---
## Step 0 — Auto-prompt hook setup
Ensure the topbar interview is triggered at the start of every future Cursor session in this project.
1. Check whether `.cursor/hooks.json` exists in the project root.
2. If it does not exist, create it:
```json
{
"version": 1,
"hooks": {
"sessionStart": [
{
"type": "prompt",
"prompt": "This is a Flows/Fusion application. Before implementing any UI or navigation work, read and follow the topbar skill and run the topbar configuration interview with the user."
}
]
}
}
```
3. If `.cursor/hooks.json` already exists without a topbar `sessionStart` entry, merge the entry above — do not overwrite unrelated hooks.
4. Confirm to the user, then continue.
---
## Step 1 — Pre-flight: read the app
Before asking any questions, read:
- `package.json` — package manager, existing UI deps, existing `@aura/topbar`
- `src/App.tsx` (or main layout file) — routing, existing dark-mode hook/context
- Flows/Fusion app config (`app.config.ts`, `fusion.config.ts`, manifest) — `displayName`, `name`, app mark / branding
Apply any found defaults and skip the corresponding interview questions. State what was inferred.
---
## Step 2 — Configuration interview (mandatory)
Run the full Q1–Q9 interview in [INTERVIEW.md](INTERVIEW.md) before writing any implementation code. Ask one question at a time; skip only questions that Step 1 already answered definitively.
---
## Steps 3–5 — Install, theme hook, implement
See [IMPLEMENTATION.md](IMPLEMENTATION.md) for:
- Installing `@aura/topbar` via the shadcn CLI (mandatory, no workarounds)
- `useThemeMode` hook wiring for light/dark switching
- Topbar component composition example and layout wrapper
---
## Step 6 — Compliance checklist
Verify before finishing (see [RULES.md §12](RULES.md) for the full enforcement checklist):
- [ ] Exactly **one** Topbar per page
- [ ] Left: `Avatar` application mark (**small**, **fjord**) → app name breadcrumb → object name breadcrumb (only when an object is open)
- [ ] Breadcrumb segments are interactive links — not static text
- [ ] Object dropdown (if present) only on the object name segment; actions are object-scoped only
- [ ] Inline metadata (if present) is a plain string, left-aligned after the breadcrumb — not centered
- [ ] Middle: **Tabs** or **Segmented control** at **small** if present; no sidebar; no primary CTA in the Topbar
- [ ] **Primary / app-specific actions** live in the content area **below** the Topbar
- [ ] Right strip order when used: **Share → Notifications → Theme → Atlas → user Avatar**; Share/Notifications/Theme **ghost small**; Atlas **secondary small** with leading icon + "Atlas" (opens EOS sidebar; default on if the app has AI — `integrate-fusion-agent`)
- [ ] Theme: **sun** in light mode, **moon** in dark mode; Menu with Light/Dark rows + checkmark on active; wired to `document.documentElement`
- [ ] `tailwind.config` has `darkMode: 'class'`
© cognitedata · Apache-2.0 · cognitedata/builder-skills