add-onboarding-tour
Add a first-run guided tour, product walkthrough, coachmarks, or empty-state mock/example data to a Lightdash frontend feature. Use when the user wants to…
от lightdash★ 6 265 звёзд на GitHub
Установить add-onboarding-tour в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Add an Onboarding Tour
A zero-dependency, centralised kit for first-run onboarding in packages/frontend. Three reusable pieces do the heavy lifting; each feature only supplies its own steps, copy, anchors, and (optionally) example data.
Building blocks
| Piece | Path | Job |
|---|---|---|
useGuidedTour |
src/hooks/useGuidedTour.ts |
localStorage seen-flag, first-visit auto-open, replay. Returns { isOpen, startTour, closeTour }. |
GuidedTour |
src/components/common/GuidedTour |
Spotlight rendering. Dims the page, highlights a data-tour target, anchors a Next/Back/Skip card. target: null → centered card. |
useOnboardingMock |
src/hooks/useOnboardingMock.ts |
A react-query select that swaps real data for deterministic mock rows while a flag is on. |
Reference implementation: the Reviews page — src/ee/features/aiCopilot/components/Admin/settings/AiReviewsSettingsPage.tsx (wiring), AiAgentAdminReviewItemsTable.tsx (mock rows), and Admin/onboarding/ (the content). Read these first — copying them is the fastest path.
Where content lives
Kit = global, content = per-feature. The three building blocks above are shared. Everything specific to one feature — its steps, copy, sample rows, and any onboarding-only visuals — goes in a co-located onboarding/ folder next to the feature, with the same fixed layout every time:
<feature-dir>/onboarding/
index.ts public surface (re-exports)
steps.tsx TOUR_STEPS: GuidedTourStep[] (all the step copy)
exampleData.ts EXAMPLE_*, isExample*() (only if the feature shows mock rows)
<Visual>.tsx onboarding-only visuals, e.g. a diagram (+ .module.css)
The feature imports from ./onboarding. Do not put feature content in a global folder, and do not inline steps or mock data in the page/table — keep components about rendering. Only re-export from index.ts what's consumed outside the folder (ts-unused-exports is enforced).
Recipe
Wire the tour state in the feature page:
const { isOpen, startTour, closeTour } = useGuidedTour({ storageKey: 'ld.<feature>.tour.v1', });Define steps in
onboarding/steps.tsxas a module constant (they're static — nouseMemoneeded). Eachtargetis a CSS selector resolved when the step is reached, ornullfor a centered explainer:export const TOUR_STEPS: GuidedTourStep[] = [ { target: '[data-tour="<feature>-intro"]', title: '…', body: '…' }, { target: '[data-tour="<feature>-row"]', title: '…', body: '…' }, { target: null, title: '…', body: <SomeDiagram /> }, // centered ];The page imports
{ TOUR_STEPS }from./onboardingand passes it to<GuidedTour>.Add
data-touranchors to the elements each step points at. For a table row, add it in the row props so the whole row is spotlit:mantineTableBodyRowProps: ({ row }) => row.index === 0 ? { 'data-tour': '<feature>-row' } : {},Render the tour and a replay button:
<Button variant="subtle" leftSection={<MantineIcon icon={IconRoute} />} onClick={startTour}> Take the tour </Button> <GuidedTour steps={steps} opened={isOpen} onClose={closeTour} />(Optional) Deterministic example data so a tour on an empty (or any) page always highlights the same rows. Put stable, clearly-labelled mock rows and the
isExamplehelper inonboarding/exampleData.ts, and inject them viaselectwhile the tour is open:const select = useOnboardingMock(EXAMPLE_ROWS, isOpen); const { data } = useThings(args, { select }); // hook must forward `select` to useQueryRender example rows muted and inert (disabled actions, no navigation); mark them with an "Example" badge. Gate interactivity off a sentinel id (e.g.
id.startsWith('example:')).
Conventions
- Zero dependencies. No joyride/driver/intro.js. The spotlight is a
box-shadow: 0 0 0 9999pxdim — already handled byGuidedTour. - storageKey:
ld.<feature>.tour.v<n>. Bump the version to re-show the tour after a redesign. - Copy: warm, natural, straight to the point. No em dashes, no arrows. Short titles.
- Styling: follow
frontend-style-guide— nostyleprop (pass runtime geometry via__vars), CSS modules, theme tokens /ldGray/ldDark. - Mock rows must never look or act real: muted, "Example" badge, disabled actions.
Gotchas
No auto-start in local dev or PR previews:
useGuidedTouranduseOnboardingTourkeep first-visit tours closed whenhealth.modeisdevelopmentorpr(useIsTourAutoStartSuppressed).startTourstill opens one. To test the auto-start itself, runlocalStorage.setItem('ld.tours.autoStart', '1')and reload. Never gate auto-start per tour; a new first-visit trigger must go through one of the two hooks.Targets that render late (data still loading): handled — `Guid
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Edit - 03
Write - 04
Glob - 05
Grep
FAQ
Что делает скилл add-onboarding-tour?
Add a first-run guided tour, product walkthrough, coachmarks, or empty-state mock/example data to a Lightdash frontend feature. Use when the user wants to onboard users to a page, add a "Take the tour" flow, explain an unfamiliar UI, or show sample data on an empty page.
Как установить скилл add-onboarding-tour?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-onboarding-tour запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…