본문으로 건너뛰기
cccskills
무료GitHub에 공개

storybook-startup-benchmark

Measure Storybook startup from launching the process to displaying the first story. Separate server readiness from browser rendering, summarize repeated runs, and compare versions or feature flags to investigate slower startup.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Measure Storybook startup time from spawning `storybook dev` until the first story renders in the browser. Use when the user asks about Storybook boot time, server-ready timing, first story render timing, startup regressions, benchmarking with repeat runs, or comparing Storybook versions or feature flags.

설치 방법 보기

이럴 때 유용합니다

  • Measure startup through the first story render
  • Compare Storybook versions or feature flags
  • Summarize repeated startup measurements
  • Investigate server or browser startup slowdowns

포함된 파일(1)

  • SKILL.md5.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Storybook Startup Benchmark

Purpose

Use this skill to build or explain a repeatable benchmark for Storybook startup:

  • server: process spawn -> Storybook server responds
  • browser: server responds -> first story rendered
  • total: process spawn -> first story rendered

Quick Start

When asked to benchmark Storybook startup:

  1. Confirm the boundary:
    • Start timing immediately before spawning storybook dev
    • Open Storybook at /, not iframe.html
    • Stop timing on first story mount plus one requestAnimationFrame()
  2. Check whether the repo already has a benchmark script. Reuse it if possible.
  3. If not, create a Node script that:
    • starts Storybook with --no-open
    • waits for the server to respond
    • launches a browser it controls
    • waits for a preview-side render signal
    • prints JSON results
  4. Add --repeat <count> support with grouped summary stats.

Measurement Rules

Use these defaults unless the user asks otherwise:

  • Start URL: /
  • Browser path: normal manager page, let Storybook load the preview iframe itself
  • Render signal: first preview story mount + one requestAnimationFrame()
  • Browser launch: external harness launches the browser, not Storybook
  • Auto-open: disable Storybook browser auto-open with storybook dev --no-open

Do not measure only CLI output. Server listening is not the same as first story rendered.

Recommended Implementation

1. Preview-side signal

Add a small global preview decorator or component that runs once on the first story mount:

  • wait one requestAnimationFrame()
  • set a global value like window.__sbStartupBenchmark
  • also mirror that value to window.top when same-origin
  • optionally call performance.mark('sb:first-story-rendered')

Preferred payload:

{
  firstStoryRenderedAt: performance.now(),
  storyId: id
}

2. Harness behavior

The benchmark script should:

  1. Fail fast if the target Storybook port is already in use
  2. Spawn Storybook with --no-open
  3. Start timing immediately before spawn
  4. Wait for HTTP readiness on the Storybook URL
  5. Launch a controlled browser to /
  6. Wait for the preview-side signal
  7. Print JSON results
  8. Kill the full spawned process group during cleanup

3. Repeated runs

For --repeat N, print:

  • per-run results
  • summary stats grouped by server, browser, and total
  • human-readable durations like 5.2s or 2m15s, not raw millisecond field names

Recommended summary fields:

{
  "server": {
    "average": "5.2s",
    "min": "4.8s",
    "max": "6.1s",
    "p95": "6.0s"
  },
  "browser": {
    "average": "1.9s",
    "min": "1.6s",
    "max": "2.4s",
    "p95": "2.3s"
  },
  "total": {
    "average": "7.1s",
    "min": "6.6s",
    "max": "8.2s",
    "p95": "8.1s"
  }
}

Interpretation Guidance

Use these heuristics when explaining results:

  • If server grows, the regression is likely on the server/build side.
  • If browser grows, the regression is likely in manager boot, preview boot, or first-story render.
  • If averages are close but p95 grows a lot, the feature likely increases variability or tail latency.
  • If newer Storybook without a feature is much faster than older Storybook, but enabling the feature returns timings to older levels, the feature likely erases the newer startup gains.

Common Pitfalls

  • Existing Storybook already running on the benchmark port
  • Storybook auto-opening a separate browser window
  • Measuring direct iframe.html loads instead of normal /
  • Leaving child Storybook processes alive between runs
  • Treating warm repeated runs as cold-start data

If a repeated benchmark reports unrealistically low server.average, first check for a stale Storybook server on the same port.

Tooling Notes

  • Prefer a plain Node script for portability.
  • For Chrome-family browsers, remote debugging is a practical control path.
  • If Storybook CLI flags or behavior are in question, fetch current Storybook docs first.

Output Style

When reporting results:

  • clearly separate server, browser, and total
  • call out averages and p95 first, with min/max as supporting bounds
  • highlight whether the regression affects common-case latency, tail latency, or both
  • avoid claiming root cause unless the benchmark isolates server vs render behavior

Example Triggers

Use this skill when the user says things like:

  • "How can I test Storybook startup time?"
  • "Measure from storybook dev to first story render"
  • "Compare Storybook startup with and without this feature flag"
  • "Run 20 startup measurements and summarize averages"
  • "Is this startup regression server-side or render-side?"

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

canary

무료

Find a trial Storybook package for a specific branch, or trigger its publication when needed. Check release progress and obtain the package reference or commands for creating or upgrading a project with that build.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Find a trial package for a Storybook branch
  • Publish a trial build for a fork pull request
  • Check publication progress and installation commands
storybookjs/storybook9.1만2026년 10월 18일 업데이트

Look up a project's existing UI components in Storybook, including their props, or configuration inputs, and usage examples. Use the findings to answer questions and identify components to reuse before building duplicates.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Find existing UI components
  • Check component props and usage examples
  • Answer questions about component usage
storybookjs/storybook9.1만2026년 10월 18일 업데이트

Review, improve, rewrite, or draft Storybook documentation in /docs. Assess each page’s purpose, audience, structure, and examples, then make suitable edits or provide a content plan, with formatting checks after changes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Improve the structure and examples of a documentation page
  • Draft documentation for a new feature
  • Plan page types and outlines
storybookjs/storybook9.1만2026년 10월 18일 업데이트

Check out a GitHub pull request, fix linting and TypeScript errors, and commit and push the changes. The workflow supports forked pull requests and repeats type checks to verify fixes while keeping changes focused on these errors.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Fix linting errors in a pull request
  • Resolve TypeScript errors in a pull request
  • Apply fixes to a pull request from a fork
storybookjs/storybook9.1만2026년 10월 18일 업데이트

Organize GitHub issues and pull requests found during quality assurance testing. Apply release tracking labels, classify bugs by four severity levels, and label multiple findings while keeping documentation issues and feature requests outside the severity scheme.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Group QA findings by release
  • Classify bugs by severity
  • Apply labels to multiple issues and pull requests
storybookjs/storybook9.1만2026년 10월 18일 업데이트

Work through unresolved GitHub pull request reviews one at a time. The skill explains each comment, proposes a fix, asks how to proceed, and handles chosen edits, replies, commits, and thread resolution.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Addressing unresolved pull request review comments
  • Choosing between a code fix, a reply, or skipping a comment
  • Handling duplicate review comments together
storybookjs/storybook9.1만2026년 10월 18일 업데이트

storybookjs의 스킬 모두 보기

이 스킬의 문제 신고