Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 5 additions & 42 deletions packages/claude-plugin/skills/stories/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,52 +34,15 @@ stories in sync with every frontend component you create, modify, or delete.

## Prerequisites

- Storybook must be installed in the project. If it is not, go to
"When Storybook is not installed" below and stop here unless the user opts in.
- Storybook must be installed in the project. If it is not installed:
- If this skill is not explicitly invoked by the user, silently ignore this skill.
- Otherwise, ask the user whether they want to set up Storybook and write stories.
- If the user decline, silently skip all story work, finish the component change (if any), and move on.
- If the user accepts, invoke the **storybook-setup** skill to set up Storybook and write stories.
- Storybook must be a canary version (0.0.0-canary) or at least version 10.5. If an older version is
installed, invoke the **storybook-upgrade** skill to upgrade it before
proceeding.

### When Storybook is not installed

Installing and configuring Storybook is invasive, so it is the **user's choice**.
Never set it up on your own initiative as a side effect of a component change.

Before asking the user anything, check whether they have already declined. A
decline can apply at two scopes:

- **User-level** — the user never wants Storybook set up in any project.
- **Project-level** — the user only declined for this project.

1. **Look for a previously recorded decline.** If you find one that applies here
(at either scope), the user has ALREADY refused Storybook. Do NOT ask again —
silently skip all story work, finish the component change (if any), and move
on.
2. **If there is no recorded decline**, briefly tell the user the project has no
Storybook and ask whether they want to set it up (and write stories). Offer
three choices:
- **Yes** — set it up for this project.
- **No, not for this project** — decline at the project level.
- **No, and don't ask me again in any project** — decline at the user level.
3. **If the user declines**, remember that decision durably so future
invocations don't re-ask, recording the scope they chose (this project vs.
all projects) and a short paraphrase of their reason. Choose an appropriate
place and format yourself — but do NOT commit it to the project's version
control; if the only durable option lives inside the repo, keep it out of
commits (e.g. via `.gitignore`). Then finish the component change (if any)
without any story work. If the user explicitly asked for story work, STOP and
report that Storybook is required for it.

4. **If the user opts in**, set Storybook up via the setup skills
(`storybook-init` / `storybook-setup`), then resume this workflow from
Step 1. If you recorded a decline at either scope from a previous "no", clear
it.

**Gate:** Do NOT install Storybook, scaffold `.storybook/`, add Storybook
dependencies, or invoke the setup skills unless the user has explicitly opted in
this time. A recorded decline at either scope MUST be respected on every later
invocation without re-prompting.

## Load the rules (before touching any story file)

- Run `STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai --help` to get all available subcommands and options. This also gets the latest rules for how to write stories.
Expand Down
46 changes: 5 additions & 41 deletions packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,51 +23,15 @@ stories in sync with every frontend component you create, modify, or delete.

## Prerequisites

- Storybook must be installed in the project. If it is not, go to "When Storybook is not installed" below and stop here unless the user opts in.
- Storybook must be installed in the project. If it is not installed:
- If this skill is not explicitly invoked by the user, silently ignore this skill.
- Otherwise, ask the user whether they want to set up Storybook and write stories.
- If the user decline, silently skip all story work, finish the component change (if any), and move on.
- If the user accepts, invoke the **setup** skill to set up Storybook and write stories.
- Storybook must be a canary version (0.0.0-canary) or at least version 10.5. If an older version is
installed, invoke the **upgrade** skill to upgrade it before
proceeding.

### When Storybook is not installed

Installing and configuring Storybook is invasive, so it is the **user's choice**.
Never set it up on your own initiative as a side effect of a component change.

Before asking the user anything, check whether they have already declined. A
decline can apply at two scopes:

- **User-level** — the user never wants Storybook set up in any project.
- **Project-level** — the user only declined for this project.

1. **Look for a previously recorded decline.** If you find one that applies here
(at either scope), the user has ALREADY refused Storybook. Do NOT ask again —
silently skip all story work, finish the component change (if any), and move
on.
2. **If there is no recorded decline**, briefly tell the user the project has no
Storybook and ask whether they want to set it up (and write stories). Offer
three choices:
- **Yes** — set it up for this project.
- **No, not for this project** — decline at the project level.
- **No, and don't ask me again in any project** — decline at the user level.
3. **If the user declines**, remember that decision durably so future
invocations don't re-ask, recording the scope they chose (this project vs.
all projects) and a short paraphrase of their reason. Choose an appropriate
place and format yourself — but do NOT commit it to the project's version
control; if the only durable option lives inside the repo, keep it out of
commits (e.g. via `.gitignore`). Then finish the component change (if any)
without any story work. If the user explicitly asked for story work, STOP and
report that Storybook is required for it.

4. **If the user opts in**, set Storybook up via the setup skills
(`init` / `setup`), then resume this workflow from
Step 1. If you recorded a decline at either scope from a previous "no", clear
it.

**Gate:** Do NOT install Storybook, scaffold `.storybook/`, add Storybook
dependencies, or invoke the setup skills unless the user has explicitly opted in
this time. A recorded decline at either scope MUST be respected on every later
invocation without re-prompting.

## Load the rules (before touching any story file)

- Run `STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai --help` with `require_escalated` to get all available subcommands and options. This also gets the latest rules for how to write stories.
Expand Down
Loading