format-storybook — Claude Code skill: Storybook file structure
format-storybook keeps Storybook files in one shape across a component library: stories beside components, a shared template, args and controls, MDX docs.
MIT 213 installs ★ 35 updated 2026-10-21
npx skills add podo/design-agent-skills --skill format-storybook -a claude-codeWhat format-storybook does
The skill keeps one layout across the whole component library. A story sits next to its component in stories/component.stories.js, shared markup goes into stories/template.js, and docs live in an optional component.docs.mdx. Child templates get imported instead of copied, so an edit in one file does not drift across the rest.
Args and controls follow progressive disclosure: working defaults, plus controls for edge cases. The skill also covers CSF 3.0 (metadata in the default export, stories as named exports) and MDX pages with component API tables. For visual regression it lays out the Chromatic workflow and a snapshot strategy.
React Native stories fall outside it; that is storybook-rn-skill. Building components from scratch is not its job either, shadcn-ui or baseline-ui handle that.
What it helps with
- lay out component stories in one file scheme
- pull duplicated markup into a shared template
- migrate stories to CSF 3.0
- set up Chromatic snapshots for visual regression
- write an MDX docs page with the component API table
Example prompts for the agent
- Lay out the stories for
Buttonasstories/Button.stories.js,stories/template.jsandButton.docs.mdx. - Move our stories to CSF 3.0 and put the repeated markup into one shared template.
- Wire Chromatic snapshots for the components I just changed.
How to install format-storybook
1Skills CLI (Vercel)
npx skills add podo/design-agent-skills --skill format-storybook -a claude-code2Manually: put the files in place
~/.claude/skills/format-storybook/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/format-storybook/
1Skills CLI (Vercel)
npx skills add podo/design-agent-skills --skill format-storybook -a codex2Manually: put the files in place
.agents/skills/format-storybook/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add podo/design-agent-skills --skill format-storybook -a cursor2Manually: put the files in place
.cursor/skills/format-storybook/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install podo/design-agent-skills skills/format-storybook2Manually: put the files in place
.github/skills/format-storybook/SKILL.md1Skills CLI (Vercel)
npx skills add podo/design-agent-skills --skill format-storybook -a gemini-cli2Platform CLI
gemini skills install https://github.com/podo/design-agent-skills --path skills/format-storybookManually: put the files in place
.devin/skills/format-storybook/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add podo/design-agent-skills --skill format-storybook -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about format-storybook
How do I install format-storybook in Claude Code?
Run npx skills add podo/design-agent-skills --skill format-storybook -a claude-code. The skill file lands in ~/.claude/skills/format-storybook/SKILL.md.
What does format-storybook do?
It gives Storybook a single layout: stories next to their components, one template instead of copied markup, args and controls, MDX docs pages, Chromatic snapshots.
Does it handle React Native Storybook stories?
No, it points those to storybook-rn-skill instead.
Source text
SKILL.md · MIT
--- name: format-storybook description: | Structures and organizes Storybook files for scalability using battle-tested patterns from Cassondra Roberts' "A Storybook format that scales with you". Covers story definitions, template composition, controls/args, visual regression with Chromatic, component documentation, and CSF conventions. Activates on any Storybook question — file structure, controls, args, or component documentation. triggers: - "Storybook" - "Storybook story" - "format-storybook" - "Chromatic visual regression" - "CSF story format" - "component story" das: type: skill category: design-engineering upstream: "https://github.com/mikemai2awesome/agent-skills" upstream_path: "skills/format-storybook/SKILL.md" version: latest --- # format-storybook > Catalogue stub — full skill: [mikemai2awesome/agent-skills](https://github.com/mikemai2awesome/agent-skills) <!-- das:install:start — generated from stub.yaml by `npm run generate`; edit stub.yaml, not this block --> ## Decision tree 1. **Is the full skill already installed?** - Global: `f=~/.agents/skills/format-storybook/SKILL.md; [ -f "$f" ] && ! grep -q "^das:" "$f" && echo "installed" || echo "pointer"` - Project: `f=.agents/skills/format-storybook/SKILL.md; [ -f "$f" ] && ! grep -q "^das:" "$f" && echo "installed" || echo "pointer"` - `installed` → the skill is installed as `format-storybook`, invoke it and proceed - `pointer` → go to step 2 2. **Detect scope, then install:** ```bash [ -e ~/.agents/skills/format-storybook ] && echo "global" || echo "project" ``` **Global:** ```bash npx skills add mikemai2awesome/agent-skills --skill format-storybook -g -y ``` **Project:** ```bash npx skills add mikemai2awesome/agent-skills --skill format-storybook -y ``` > **Claude Code:** send a command as a chat message starting with `!` to run it without leaving the conversation. **Heads-up** - **License:** MIT <!-- das:install:end --> ## Invoke after install - Skill name: `format-storybook` - Trigger phrases: "Storybook", "Storybook story", "Chromatic visual regression", "CSF story format" ## What it does Enforces scalable, maintainable Storybook patterns across a component library: - **File structure** — co-locate stories with components; `stories/component.stories.js` + `stories/template.js` + optional `component.docs.mdx` - **Template composition** — import child component templates instead of duplicating markup; single source of truth per component - **Controls & args** — progressive disclosure: sensible defaults + optional controls for edge cases; arg types and descriptions - **Visual regression** — Chromatic integration patterns; snapshot testing strategy - **CSF conventions** — Component Story Format 3.0; default export metadata; named story exports - **Documentation** — MDX docs pages; component API tables; usage examples; do/don't patterns ## When NOT to use - React Native Storybook stories specifically → use `storybook-rn-skill` - Design token generation → use `design-tokens-skill` - Component implementation from scratch → use `shadcn-ui` or `baseline-ui`
© podo · MIT · podo/design-agent-skills