Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.

fix: duplicate prerequisite instructions into skills - #343

Closed
huang-julien wants to merge 1 commit into
mainfrom
fix/prerequisite
Closed

huang-julien wants to merge 1 commit into
mainfrom
fix/prerequisite

Conversation

@huang-julien

@huang-julien huang-julien commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Suplicate prerequisite instructions into all skills.

Another solution would be to have a duplciated <skill>/references/PREQUISITE.md but it 's basically the same thing.

Having a single storybook/skills/PREQUISITIE.md doesn't work because claude don't have permission to read any files outside of a skill directory.

Summary by CodeRabbit

  • Documentation
    • Clarified Storybook setup guidance across multiple skills with a consistent prerequisites flow.
    • Added clearer paths for when Storybook is missing, outdated, or already up to date.
    • Noted when to proceed with setup versus when to switch to an init or upgrade step.
    • Added guidance to ensure the Storybook MCP addon is installed before continuing.

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3f8ba62

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for storybook-mcp-self-host-example canceled.

Name Link
🔨 Latest commit 3f8ba62
🔍 Latest deploy log https://app.netlify.com/projects/storybook-mcp-self-host-example/deploys/6a4ccc25f3a94100081d4a17

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/storybookjs/mcp/@storybook/addon-mcp@343
npx https://pkg.pr.new/storybookjs/mcp/@storybook/mcp@343

commit: 3f8ba62

@codecov

codecov Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.66%. Comparing base (a73f329) to head (3f8ba62).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #343      +/-   ##
==========================================
- Coverage   79.71%   79.66%   -0.05%     
==========================================
  Files          50       50              
  Lines        2085     2095      +10     
  Branches      619      624       +5     
==========================================
+ Hits         1662     1669       +7     
  Misses        220      220              
- Partials      203      206       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Storybook “skill” markdown files so each skill carries its own prerequisite guidance (instead of relying on a shared prerequisite file that the model can’t access outside the skill directory).

Changes:

  • Added a shared “Prerequisites” block to the init, upgrade, and stories skills in both the codex-plugin and claude-plugin variants.
  • Reworded the stories prerequisites to a clearer conditional form (“not installed / outdated / up to date”).
  • Simplified setup prerequisites to a single-line summary.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/codex-plugin/plugins/storybook/skills/upgrade/SKILL.md Adds prerequisites block to the codex “upgrade” skill.
packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md Replaces older prerequisite wording with the standardized conditional block.
packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md Changes prerequisites to a one-line summary.
packages/codex-plugin/plugins/storybook/skills/init/SKILL.md Adds prerequisites block to the codex “init” skill.
packages/claude-plugin/skills/storybook-upgrade/SKILL.md Adds prerequisites block to the claude “storybook-upgrade” skill.
packages/claude-plugin/skills/storybook-setup/SKILL.md Changes prerequisites to a one-line summary.
packages/claude-plugin/skills/storybook-init/SKILL.md Adds prerequisites block to the claude “storybook-init” skill.
packages/claude-plugin/skills/stories/SKILL.md Replaces older prerequisite wording with the standardized conditional block.

Comment on lines +6 to +10
Prerequisites:

1. **Storybook is not installed** (no Storybook dependencies in `package.json`, no `.storybook/` directory): invoke the `$storybook:init` skill, but only if the user explicitly approves a Storybook installation.
2. **Storybook is installed but outdated** (version < 10.5 and not an alpha/canary version): invoke the `$storybook:upgrade` skill, but only if the user explicitly approved a Storybook upgrade.
3. **Storybook is installed and up to date**: proceed. Ensure `@storybook/addon-mcp` is installed; if it is missing, install it with `npx storybook add @storybook/addon-mcp`.
Comment on lines +6 to +10
Prerequisites:

1. **Storybook is not installed** (no Storybook dependencies in `package.json`, no `.storybook/` directory): invoke the `$storybook:init` skill, but only if the user explicitly approves a Storybook installation.
2. **Storybook is installed but outdated** (version < 10.5 and not an alpha/canary version): invoke the `$storybook:upgrade` skill, but only if the user explicitly approved a Storybook upgrade.
3. **Storybook is installed and up to date**: proceed. Ensure `@storybook/addon-mcp` is installed; if it is missing, install it with `npx storybook add @storybook/addon-mcp`.

1. Confirm Storybook exists (`package.json`, `.storybook/`). If not, switch to `$storybook:init`.
2. If Storybook is outdated or upgrade/repair is needed first, switch to `$storybook:upgrade`.
Prerequisites: Storybook must already be installed and up to date. If it is not installed, switch to `$storybook:init`; if it is outdated, switch to `$storybook:upgrade`.
Comment on lines +6 to +10
Prerequisites:

1. **Storybook is not installed** (no Storybook dependencies in `package.json`, no `.storybook/` directory): invoke the `/storybook-init` skill, but only if the user explicitly approves a Storybook installation.
2. **Storybook is installed but outdated** (version < 10.5 and not an alpha/canary version): invoke the `/storybook-upgrade` skill, but only if the user explicitly approved a Storybook upgrade.
3. **Storybook is installed and up to date**: proceed. Ensure `@storybook/addon-mcp` is installed; if it is missing, install it with `npx storybook add @storybook/addon-mcp`.
Comment on lines +6 to +10
Prerequisites:

1. **Storybook is not installed** (no Storybook dependencies in `package.json`, no `.storybook/` directory): invoke the `/storybook-init` skill, but only if the user explicitly approves a Storybook installation.
2. **Storybook is installed but outdated** (version < 10.5 and not an alpha/canary version): invoke the `/storybook-upgrade` skill, but only if the user explicitly approved a Storybook upgrade.
3. **Storybook is installed and up to date**: proceed. Ensure `@storybook/addon-mcp` is installed; if it is missing, install it with `npx storybook add @storybook/addon-mcp`.

1. Confirm Storybook exists (`package.json`, `.storybook/`). If not, switch to `/storybook-init`.
2. If Storybook is outdated or upgrade/repair is needed first, switch to `/storybook-upgrade`.
Prerequisites: Storybook must already be installed and up to date. If it is not installed, switch to `/storybook-init`; if it is outdated, switch to `/storybook-upgrade`.
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 73c91e1f-ad51-4259-bdb4-5b0d45c2c538

📥 Commits

Reviewing files that changed from the base of the PR and between fcc5504 and 3f8ba62.

📒 Files selected for processing (8)
  • packages/claude-plugin/skills/stories/SKILL.md
  • packages/claude-plugin/skills/storybook-init/SKILL.md
  • packages/claude-plugin/skills/storybook-setup/SKILL.md
  • packages/claude-plugin/skills/storybook-upgrade/SKILL.md
  • packages/codex-plugin/plugins/storybook/skills/init/SKILL.md
  • packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md
  • packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md
  • packages/codex-plugin/plugins/storybook/skills/upgrade/SKILL.md

📝 Walkthrough

Walkthrough

Documentation updates across eight SKILL.md files in claude-plugin and codex-plugin Storybook skills, replacing prior simple installation/version prerequisites with a three-branch decision flow: not installed (approval-gated init), outdated below 10.5 excluding alpha/canary (approval-gated upgrade), or up to date (proceed and ensure addon-mcp is installed).

Changes

Storybook skill Prerequisites documentation

Layer / File(s) Summary
Claude-plugin prerequisites branching
packages/claude-plugin/skills/stories/SKILL.md, packages/claude-plugin/skills/storybook-init/SKILL.md, packages/claude-plugin/skills/storybook-upgrade/SKILL.md, packages/claude-plugin/skills/storybook-setup/SKILL.md
Prerequisites sections now define three states (missing, outdated <10.5 non-alpha/canary, up to date) with approval-gated /storybook-init or /storybook-upgrade invocation, and an up-to-date path that ensures @storybook/addon-mcp is installed via npx storybook add @storybook/addon-mcp``.
Codex-plugin prerequisites branching
packages/codex-plugin/plugins/storybook/skills/init/SKILL.md, packages/codex-plugin/plugins/storybook/skills/upgrade/SKILL.md, packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md, packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md
Same three-state Prerequisites logic is applied using $storybook:init/$storybook:upgrade command invocations, each gated on explicit user approval, with the same addon-mcp installation check when up to date.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • storybookjs/mcp#302: Both PRs update the Storybook "stories" SKILL.md prerequisites with similar approval-gating and conditional handling for missing/outdated Storybook.
  • storybookjs/mcp#309: Both PRs refactor the same set of Storybook skill markdown files (stories, init, setup, upgrade) to adjust the prerequisite/approval workflow.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants