Agent Skillssanity-io/sanity › stories

stories

GitHub

Storybook AI CLI集成技能,用于管理UI组件、故事及样式变更。支持Storybook安装升级、启动预览服务,并强制执行AI工作流以同步代码与文档,确保UI状态验证。

.agents/skills/stories/SKILL.md sanity-io/sanity

Trigger Scenarios

创建或修改前端组件 编写或更新Storybook故事 调整CSS、主题或设计令牌 启动或预览Storybook以验证UI 查询组件文档、Props或使用示例

Install

npx skills add sanity-io/sanity --skill stories -g -y
More Options

Non-standard path

npx skills add https://github.com/sanity-io/sanity/tree/main/.agents/skills/stories -g -y

Use without installing

npx skills use sanity-io/sanity@stories

指定 Agent (Claude Code)

npx skills add sanity-io/sanity --skill stories -a claude-code -g -y

安装 repo 全部 skill

npx skills add sanity-io/sanity --all -g -y

预览 repo 内 skill

npx skills add sanity-io/sanity --list

SKILL.md

Frontmatter
{
    "name": "stories",
    "description": "Invoke FIRST, before creating, editing, or deleting components, stories, styles, CSS, themes, colors, or design tokens — anything that changes how the UI looks, no exceptions. Also for starting or previewing Storybook to verify UI, requests to show, browse, or list components, stories, or UI states, and docs, props, or usage lookups."
}

Prerequisites:

  1. Storybook must be installed in the project. Invoke the /storybook-init skill to set up Storybook, but only if the user explicitly invoked this skill and approves a Storybook installation.
  2. Storybook must be at least 10.5 (or next while 10.5 is not yet released). Invoke the /storybook-upgrade skill to upgrade it, but only if the user explicitly approved a Storybook upgrade.
  3. Ensure @storybook/addon-mcp is installed. If it is missing, install it with npx storybook add @storybook/addon-mcp.

Run the Storybook dev server and every storybook ai command from the same working directory: the package where Storybook is installed (in a monorepo often a leaf package such as packages/ui).

Run STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai --help and read the output in its entirety to get the mandatory, ordered workflow for working on UI changes, writing stories, and keeping stories in sync with every frontend component you create, modify, or delete. This workflow explains how to write stories, preview stories, and display a curated Storybook review.

Before invoking any storybook ai command for the first time in a session, run STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai <command> --help and read it fully. The top-level help only lists the commands; each command's payload shape and usage rules (which fields to include when) live in its own help output. Never guess a --json payload from the command name — a validation error only reports missing required fields, not the optional fields the workflow expects you to provide.

Some commands require a running Storybook dev server. When Claude preview tooling is available, start the dev server through that tooling:

  1. Ensure there is a Storybook launch entry in .claude/launch.json (the preview_start tool description documents the file format) with autoPort: true and port: 6006. Use the project's preferred package manager and existing package.json Storybook script instead of inventing a new command whenever possible.
  2. Start the Storybook launch entry with the preview_start tool.

Version History

  • a94b3d8 Current 2026-08-28 22:14

Same Skill Collection

.agents/skills/code-review-and-quality/SKILL.md
.agents/skills/code-simplification/SKILL.md
.agents/skills/deslop/SKILL.md
.agents/skills/grill-me/SKILL.md
.agents/skills/improve-codebase-architecture/SKILL.md
.agents/skills/performance-optimization/SKILL.md
.agents/skills/playwright-cli/SKILL.md
.agents/skills/pr-description/SKILL.md
.agents/skills/rxjs-like-a-pro/SKILL.md
.agents/skills/sanity-config-reducers/SKILL.md
.agents/skills/sanity-default-plugins/SKILL.md
.agents/skills/sanity-i18n-translate/SKILL.md
.agents/skills/sanity-plugin-authoring/SKILL.md
.agents/skills/sanity-visual-regression/SKILL.md
.agents/skills/storybook-init/SKILL.md
.agents/skills/storybook-setup/SKILL.md
.agents/skills/storybook-upgrade/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/vercel-react-best-practices/SKILL.md
.agents/skills/write-a-skill/SKILL.md
.agents/skills/find-skills/SKILL.md
.agents/skills/playwright-best-practices/SKILL.md

Metadata

Files
0
Version
a94b3d8
Hash
a32e6eab
Indexed
2026-08-28 22:14

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 08:14
浙ICP备14020137号-1 $Carte des visiteurs$