Agent skill

Writing Storybook Stories

by Comfy-Org in Comfy-Org/ComfyUI_frontend

Write or update Storybook stories for Vue components in ComfyUIfrontend.

GPL-3.0Auto-check passedFrontend & Design

Install Writing Storybook Stories

skills CLI
$ npx skills add Comfy-Org/ComfyUI_frontend --skill writing-storybook-stories -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Comfy-Org/ComfyUI_frontend writing-storybook-stories --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Comfy-Org/ComfyUI_frontend.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/writing-storybook-stories .claude/skills/writing-storybook-stories && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
writing-storybook-stories
GitHub stars
2.1k
Token cost
~2.2k tokens
SKILL.md length
818 words
Files
2
Skills in repo
22
Repo updated
First seen
Licence
GPL-3.0

At a glance

Write or update Storybook stories for Vue components in ComfyUIfrontend.

  • Works in 7 steps: !!!!IMPORTANT Confirm the worktree is on… → Read the component source first.… → Read nearby stories before writing… → …
  • Debugging .stories.ts files
  • SKILL.md covers Workflow, Controls Versus Scenarios, Match Local Conventions and Title Patterns, plus 5 more sections
  • Calls rg and pnpm

What it does

Writing Storybook Stories is an agent skill from Comfy-Org/ComfyUI_frontend. Write or update Storybook stories for Vue components in ComfyUIfrontend. Use when adding, modifying, reviewing, or debugging .stories.ts files, Storybook docs, component demos, or visual catalog entries.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Frontend & Design, covering Diffusion and image models. It works with Storybook, ComfyUI and Vue.js. The repository describes itself as: Official front-end implementation of ComfyUI. The licence is GPL-3.0.

When your agent uses it

  • Debugging .stories.ts files
  • Component demos
  • Visual catalog entries

Example prompts

  • “/writing-storybook-stories”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. !!!!IMPORTANT Confirm the worktree is on a feat/* or fix/* branch. Base PRs on the local main, not a fork branch.
  2. Read the component source first. Understand props, emits, slots, exposed methods, and any supporting types or composables.
  3. Read nearby stories before writing anything.
  4. If a Figma link is provided, list the states you need to cover before writing stories.
  5. Co-locate the story file with the component: ComponentName.stories.ts.
  6. Sort every variation into a control or a scenario before writing exports (see "Controls Versus Scenarios"). Hover, focus, and active come…
  7. Run Storybook and validation checks before handing off.

What it can do on your machine

Read from SKILL.md and the folder at commit d53a1c7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Writing Storybook Stories loads about 2.2k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 818 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Comfy-Org/ComfyUI_frontend at commit d53a1c7, republished under its GPL-3.0 licence (© Comfy-Org). 818 words, ~2,243 tokens.

Download SKILL.mdSave it as .claude/skills/writing-storybook-stories/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
writing-storybook-stories
description
Write or update Storybook stories for Vue components in ComfyUI_frontend. Use when adding, modifying, reviewing, or debugging `.stories.ts` files, Storybook docs, component demos, or visual catalog entries.

Write Storybook Stories for ComfyUI_frontend

Workflow

  1. !!!!IMPORTANT Confirm the worktree is on a feat/* or fix/* branch. Base PRs on the local main, not a fork branch.
  2. Read the component source first. Understand props, emits, slots, exposed methods, and any supporting types or composables.
  3. Read nearby stories before writing anything.
    • Search stories: rg --files src apps | rg '\.stories\.ts$'
    • Inspect title patterns: rg -n "title:\\s*'" src apps --glob '*.stories.ts'
  4. If a Figma link is provided, list the states you need to cover before writing stories.
  5. Co-locate the story file with the component: ComponentName.stories.ts.
  6. Sort every variation into a control or a scenario before writing exports (see "Controls Versus Scenarios"). Hover, focus, and active come from the implementation and never get a story.
  7. Run Storybook and validation checks before handing off.

Controls Versus Scenarios

docs/guidance/storybook.md holds the rule; apply it to each variation from step 4:

VariationBecomes
One enum prop (size, shape)meta.args default plus an argTypes control
One boolean prop (bordered, disabled)meta.args default; the control is inferred
Design state spanning several props (Loading, Invalid)A story
Data shape that stresses layout (LongTitle, ManyItems)A story with a named fixture
Store, mock, flag, or locale stateA story with beforeEach setting the mock
State reached only by interaction (menu open, form filled)A story with play
Side-by-side comparison of a prop's whole domainOne grid story (AllSizes, AllVariants)

A file whose exports differ by one prop value each is the pattern to fix, not copy, even when the nearest sibling does it.

Match Local Conventions

  • Copy the closest neighboring story's title, decorators, and mock setup instead of forcing one universal template.
  • Most repo stories use @storybook/vue3-vite.
  • Add tags: ['autodocs'] unless the surrounding stories in that area intentionally omit it.
  • Put shared defaults in meta.args; a story's args lists only what differs. Derive stories with ...Other.args.
  • Put render on meta when every story shares the wrapper; a story-level render is for a structurally different template.
  • Use ComponentPropsAndSlots<typeof Component> when it helps with prop and slot typing.
  • Keep render functions stateful when needed. Use ref(), computed(), and toRefs(args) instead of mutating Storybook args directly.
  • Use args.default or other slot-shaped args when the component content is provided through slots.
  • Wire emits as on<Event>: fn() args from storybook/test.
  • Use ComponentExposed only when a component's exposed API breaks the normal Storybook typing.
  • Add decorators for realistic width or background context when the component needs it.

Title Patterns

Do not invent titles from scratch when a close sibling story already exists. Match the nearest domain pattern.

Component areaTypical title pattern
src/components/ui/button/Button.vueComponents/Button/Button
src/components/ui/input/Input.vueComponents/Input
src/components/ui/search-input/SearchInput.vueComponents/Input/SearchInput
src/components/common/SearchBox.vueComponents/Input/SearchBox
src/renderer/extensions/vueNodes/widgets/components/*Widgets/<WidgetName>
src/platform/assets/components/*Platform/Assets/<ComponentName>

If multiple patterns seem plausible, follow the closest sibling story in the same folder tree.

Common Story Shapes

Stateful input or v-model

The render lives on meta so every story shares it and varies only args:

typescript
const meta: Meta<typeof MyComponent> = {
  component: MyComponent,
  args: { disabled: false, size: 'md' },
  argTypes: { size: { control: 'select', options: ['sm', 'md', 'lg'] } },
  render: (args) => ({
    components: { MyComponent },
    setup() {
      const value = ref('Hello world')
      return { value, ...toRefs(args) }
    },
    template:
      '<MyComponent v-model="value" :disabled="disabled" :size="size" />'
  })
}

export const Default: Story = {}
Slot-driven content
typescript
const meta: Meta<ComponentPropsAndSlots<typeof Button>> = {
  argTypes: {
    default: { control: 'text' }
  },
  args: {
    default: 'Button'
  },
  render: (args) => ({
    components: { Button },
    setup() {
      return { args }
    },
    template: '<Button v-bind="args">{{ args.default }}</Button>'
  })
}

export const Default: Story = {}
export const LongLabel: Story = {
  args: { default: 'A label long enough to wrap inside a narrow toolbar' }
}
Store or mock-driven scenarios
typescript
function story(billing: Partial<BillingContextMockState>): Story {
  return {
    beforeEach() {
      setBillingContextMock({ isTeamPlan: true, ...billing })
    }
  }
}

export const Paused: Story = story({ billingStatus: 'paused' })
export const OutOfCredits: Story = story({ subscription: exhausted })
Interaction-only state
typescript
export const MenuOpen: Story = {
  play: async ({ canvas, userEvent }) => {
    await userEvent.click(canvas.getByRole('button', { name: 'Open' }))
    await expect(canvas.getByRole('menu')).toBeVisible()
  }
}
Variants or edge cases grid
typescript
export const AllVariants: Story = {
  render: () => ({
    components: { MyComponent },
    template: `
      <div class="grid gap-4 sm:grid-cols-2">
        <MyComponent />
        <MyComponent disabled />
        <MyComponent loading />
        <MyComponent invalid />
      </div>
    `
  })
}
Show full SKILL.md (325 more words)Show less

Figma Mapping

  • Extract the named states from the design first, then run each through "Controls Versus Scenarios".
  • Named design states that span several props or need fixture data (Loading, Invalid with its message, WithPlaceholder) become stories; a one-prop state (Disabled) and a size or color ramp become controls, plus one AllSizes or AllVariants grid when side-by-side review matters.
  • Use pseudo-state parameters only if the addon is already configured in this repo.
  • If a Figma state cannot be represented exactly, capture the closest prop-driven version and explain the gap in the story docs.

Component-Specific Notes

  • Widget components often need a minimal SimplifiedWidget object. Build it in setup() and use computed() when args change widget.options.
  • Input and search components often need a width-constrained wrapper so they render at realistic sizes.
  • Asset and platform cards often need background decorators such as bg-base-background and fixed-width containers.
  • Desktop installer stories may need custom backgrounds parameters and may intentionally keep the older Storybook import style used by neighboring files.
  • Use semantic tokens such as bg-base-background and bg-node-component-surface instead of dark: variants or hardcoded theme assumptions.

Checklist

  • Read the component source and any supporting types or composables
  • Match the nearest local title pattern and story style
  • Include a baseline story; name it Default only when that matches nearby conventions
  • Every enum and boolean prop has a meta.args default; every enum prop has an argTypes control with options
  • Every export is a scenario from the "Controls Versus Scenarios" table, not a single prop value
  • Add tags: ['autodocs']
  • Keep the story co-located with the component
  • Run pnpm storybook
  • Run pnpm typecheck
  • Run pnpm lint

Avoid

  • Do not guess props, emits, slots, or exposed methods.
  • Do not force one generic title convention across the repo.
  • Do not mutate Storybook args directly for v-model components.
  • Do not introduce dark: Tailwind variants in story wrappers.
  • Do not create barrel files.
  • Do not assume every story needs layout: 'centered' or a Default export; follow the nearest existing pattern.

© Comfy-Org, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .claude/skills/writing-storybook-stories of Comfy-Org/ComfyUI_frontend.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit d53a1c7

Compare with similar skills

Writing Storybook Stories next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Writing Storybook Stories compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Writing Storybook Stories this skillComfy-Org/ComfyUI_frontend2.1k—~2.2kAutomated safety check: PassGPL-3.0
Storybook Checkrstackjs/storybook-rsbuild156—~2.5kAutomated safety check: PassMIT
Docs I18n ReviewComfy-Org/docs300—~926Automated safety check: NotesGPL-3.0
Docs I18n TranslateComfy-Org/docs300—~3.2kAutomated safety check: NotesGPL-3.0
Storybook Syncrstackjs/storybook-rsbuild156—~5.2kAutomated safety check: PassMIT
Update Component DocsAgnosticUI/agnosticui827—~607Automated safety check: PassApache-2.0

Similar skills

  • Storybook Check

    rstackjs/storybook-rsbuild

    Audit ported storybook-rsbuild source files against the CURRENT upstream Storybook source, grouped by the local package that owns each port, independent of commit history.

    156 GitHub stars~2.5k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Docs I18n Review

    Comfy-Org/docs

    Review ComfyUI docs translation quality with LLM-as-a-judge (review-i18n.ts).

    300 GitHub stars~926 tokensUpdated today
    Frontend & DesignAuto-check: notes
  • Docs I18n Translate

    Comfy-Org/docs

    Translate ComfyUI Mintlify docs from English MDX to ja/zh/ko using translate-i18n.ts.

    300 GitHub stars~3.2k tokensUpdated today
    Frontend & DesignAuto-check: notes
  • Storybook Sync

    rstackjs/storybook-rsbuild

    Check and analyze upstream Storybook repository changes that may need to be synced to storybook-rsbuild.

    156 GitHub stars~5.2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Update Component Docs

    AgnosticUI/agnosticui

    Update component documentation when code changes. An agent skill from AgnosticUI/agnosticui.

    827 GitHub stars~607 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Managing Templates

    Comfy-Org/workflow_templates

    Manages ComfyUI workflow templates end-to-end: add new templates and rename existing ones (files, index metadata, bundles, i18n, package sync).

    1.3k GitHub stars~2.8k tokensUpdated today
    Frontend & DesignAuto-check passed

More from Comfy-Org/ComfyUI_frontend

All 22 skills in this repo
  • Adding Deprecation Warnings

    Comfy-Org/ComfyUI_frontend

    Adds deprecation warnings for renamed or removed properties/APIs.

    2.1k GitHub stars~775 tokensUpdated today
    Auto-check passed
  • Agent Integration Replay

    Comfy-Org/ComfyUI_frontend

    Replay recorded agent conversations as Playwright tests against the real chat panel and canvas.

    2.1k GitHub stars~805 tokensUpdated today
    Auto-check: notes
  • Codegen Transform

    Comfy-Org/ComfyUI_frontend

    Transforms raw Playwright codegen output into ComfyUI convention-compliant tests.

    2.1k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Comment Sicko

    Comfy-Org/ComfyUI_frontend

    Dispatches the comment-sicko subagent to hunt gratuitous comments in a PR/diff, triages its raw findings, and posts a polite, professional writeup.

    2.1k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Hardening Flaky E2E Tests

    Comfy-Org/ComfyUI_frontend

    Diagnoses and fixes flaky Playwright e2e tests by replacing race-prone patterns with retry-safe alternatives.

    2.1k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Perf Fix With Proof

    Comfy-Org/ComfyUI_frontend

    Ships performance fixes with CI-proven improvement using stacked PRs.

    2.1k GitHub stars~1.6k tokensUpdated today
    Auto-check passed

Questions about Writing Storybook Stories

What does Writing Storybook Stories do?

Write or update Storybook stories for Vue components in ComfyUIfrontend. Writing Storybook Stories is an agent skill from Comfy-Org/ComfyUI_frontend. Write or update Storybook stories for Vue components in ComfyUIfrontend.

When should I use Writing Storybook Stories?

Writing Storybook Stories fits situations like: debugging .stories.ts files; component demos; visual catalog entries.

How do I install Writing Storybook Stories in Claude Code?

Run `npx skills add Comfy-Org/ComfyUI_frontend --skill writing-storybook-stories -a claude-code`. Or copy the skill folder (.claude/skills/writing-storybook-stories in Comfy-Org/ComfyUI_frontend) into .claude/skills/writing-storybook-stories in your project. Claude Code loads it when a task matches its description.

How do I install Writing Storybook Stories in Codex?

Run `npx skills add Comfy-Org/ComfyUI_frontend --skill writing-storybook-stories -a codex`. Or copy the skill folder (.claude/skills/writing-storybook-stories in Comfy-Org/ComfyUI_frontend) into .agents/skills/writing-storybook-stories in your project. Codex loads it when a task matches its description.

Can I use Writing Storybook Stories in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Comfy-Org/ComfyUI_frontend --skill writing-storybook-stories -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-storybook-stories, .gemini/skills/writing-storybook-stories, .github/skills/writing-storybook-stories and .opencode/skills/writing-storybook-stories in your project.

What does Writing Storybook Stories need to run?

Going by SKILL.md and its folder, Writing Storybook Stories needs the command-line tools its instructions call (rg and pnpm).

Does Writing Storybook Stories access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Writing Storybook Stories safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Writing Storybook Stories use?

Writing Storybook Stories is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Writing Storybook Stories use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Writing Storybook Stories?

Skills that share tags, products or a category with Writing Storybook Stories: Storybook Check (rstackjs/storybook-rsbuild, 156 stars), Docs I18n Review (Comfy-Org/docs, 300 stars), Docs I18n Translate (Comfy-Org/docs, 300 stars) and Storybook Sync (rstackjs/storybook-rsbuild, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Writing Storybook Stories?

Comfy-Org (a GitHub organization) maintains it in Comfy-Org/ComfyUI_frontend, which has 2,060 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 11, 2026.

Source: Comfy-Org/ComfyUI_frontend on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.