Onboarding Flow

A first-run walkthrough that shows once, with a persisted "seen it" flag and a real skip path.

adds it to an existing project · no account needed
Currentas published in v1.5.1

The rule

This is the whole text, exactly as your agent receives it. Nothing is held back for the paid tier.

  • completed from useOnboarding() is boolean | undefined — undefined means "still loading from storage," not "not onboarded." Routing on completed === false before the load finishes sends every fresh install through onboarding twice; check for undefined first and render nothing (or a splash) until it resolves.
  • complete() runs on both finishing the last step and skipping. Skip is not "ask again next launch" — it is "user chose not to see this," and it should be persisted exactly the same way finishing is.
  • Step *content* (OnboardingStep[]) is a prop, not hardcoded in OnboardingFlow — add or reorder steps where the flow is rendered, not inside the component.

6 formats, one per tool

Each tab is the file that tool actually reads, at the path it actually looks in. Knowing where each one looks is most of the work of supporting it.

.cursor/rules/onboarding.mdchand-written
---
description: Onboarding flow conventions
globs: ["src/features/onboarding/**/*.ts", "src/features/onboarding/**/*.tsx"]
alwaysApply: false
---

# Onboarding Flow

- `completed` from `useOnboarding()` is `boolean | undefined` — `undefined`
  means "still loading from storage," not "not onboarded." Routing on
  `completed === false` before the load finishes sends every fresh install
  through onboarding twice; check for `undefined` first and render nothing
  (or a splash) until it resolves.
- `complete()` runs on **both** finishing the last step and skipping. Skip is
  not "ask again next launch" — it is "user chose not to see this," and it
  should be persisted exactly the same way finishing is.
- Step *content* (`OnboardingStep[]`) is a prop, not hardcoded in
  `OnboardingFlow` — add or reorder steps where the flow is rendered, not
  inside the component.

Hand-written by the module author, frontmatter and all. It is the source the four derived formats are rendered from, so a correction lands here first.

What else this module writes

The rule is one file of several. Selecting Onboarding Flow contributes all of this too — merged with every other module you pick, with conflicts resolved rather than duplicated.

Dependencies
Depends on the rest of the stack — this module installs different packages depending on what else you select, so there is no single list to show.
Folders
src/features/onboarding/

Advisory history

Every time this rule turned out to be wrong, and what we did about it.

No corrections yet

This rule has been accurate since it was published. That is a fact about the rule, not a promise about the future — which is the whole reason this section exists.

Pro tells you the day a correction lands that affects a repo you actually have.

See what Pro adds →
Put this rule in a real project

The wizard picks the rest of the stack with you, writes all 6 formats, and leaves a manifest so check can tell you when any of it drifts.