PluginBench
Skill
Pass
Audit score 90

use-topbar

cognitedata/builder-skills

Wire Aura Topbar into Flows/Fusion apps with breadcrumbs, tabs, theme switcher, and Atlas launcher.

What is use-topbar?

Installs and configures @aura/topbar, the compliant single navigation bar for authenticated Flows/Fusion applications. Use this skill when adding a topbar, header, breadcrumbs, theme switcher, or Atlas integration to your app.

  • Installs @aura/topbar as a shadcn registry component via the shadcn CLI
  • Configures breadcrumb navigation (app name and optional object name segments)
  • Sets up light/dark theme switching wired to document.documentElement
  • Adds right-strip controls: Share, Notifications, Theme, Atlas, and user Avatar
  • Provides interview-driven configuration to ensure compliance with Flows/Fusion standards
  • Enforces single-topbar-per-page rule and composition from @aura/topbar primitives only

How to install use-topbar

npx skills add https://github.com/cognitedata/builder-skills --skill use-topbar
Prerequisites
  • Flows/Fusion application with package.json and src/App.tsx (or main layout file)
  • pnpm package manager (for shadcn CLI installation)
  • tailwind.config with darkMode: 'class' setting
  • Optional: integrate-fusion-agent skill if Atlas/AI features are needed
Claude Code
Cursor
Windsurf
Cline

How to use use-topbar

  1. 1.Set up .cursor/hooks.json with the topbar sessionStart prompt to auto-trigger the interview in future sessions
  2. 2.Read package.json, src/App.tsx, and app config (app.config.ts or fusion.config.ts) to infer defaults
  3. 3.Run the full Q1–Q9 configuration interview from INTERVIEW.md, answering one question at a time
  4. 4.Install @aura/topbar via shadcn CLI: pnpm dlx shadcn@latest add @aura/topbar
  5. 5.Wire the useThemeMode hook to your app's dark-mode context and document.documentElement
  6. 6.Compose the Topbar component with breadcrumbs, optional Tabs/Segmented control, and right-strip controls in order: Share → Notifications → Theme → Atlas → Avatar
  7. 7.Verify compliance against the Step 6 checklist: single topbar per page, correct segment order, interactive breadcrumbs, theme icon switching, and Atlas integration

Use cases

Good for
  • Adding a compliant header and navigation bar to a new Flows/Fusion application
  • Integrating theme switching (light/dark mode) into an existing app layout
  • Setting up breadcrumb navigation for multi-level object hierarchies
  • Launching the EOS sidebar via Atlas button in authenticated apps
  • Ensuring UI compliance with Cognite's Flows/Fusion design standards
Who it's for
  • Flows/Fusion application developers
  • Teams building authenticated navigation interfaces
  • Developers implementing theme switching in Cognite applications
  • Engineers integrating Atlas/EOS sidebar functionality

use-topbar FAQ

Can I build a custom header fallback if shadcn installation fails?

No. If installation fails, surface the blocker to the user immediately — never build a custom header fallback. See RULES.md §1, §11, §12.

Should I embed a chat UI in the Topbar or Atlas button?

No. Atlas opens the EOS sidebar only. Wire context with integrate-fusion-agent skill, but do not embed a chat UI in the Topbar.

How many Topbars should appear on a page?

Exactly one Topbar per page, composed only from @aura/topbar primitives installed via the shadcn CLI.

Where should primary app actions go?

Primary and app-specific actions live in the content area below the Topbar, not in the Topbar itself.

What is the correct right-strip order?

Share → Notifications → Theme → Atlas → user Avatar. Share/Notifications/Theme use ghost small styling; Atlas uses secondary small with leading icon and 'Atlas' label.

Full instructions (SKILL.md)

Source of truth, from cognitedata/builder-skills.


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.

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.


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:
{
  "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."
      }
    ]
  }
}
  1. If .cursor/hooks.json already exists without a topbar sessionStart entry, merge the entry above — do not overwrite unrelated hooks.
  2. 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 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 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 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'