Communitygithub.com

Next.js Storybook CSF3 스토리 생성 (nextjs-storybook-story)

동일 위치에 배치된 Storybook CSF3 스토리([ComponentName].stories.tsx)를 대화형 컨트롤, 액션 스파이 및 4가지 표준 테마 변형과 함께 생성하고 업데이트하기 위한 워크플로우 및 엔지니어링 표준입니다.

Next.js Storybook CSF3 스토리 생성 (nextjs-storybook-story)란 무엇인가요?

이 스킬은 Next.js 프로젝트에서 CSF3 형식을 사용하여 동일 위치에 배치된 Storybook 스토리를 생성하고 업데이트하는 전문 워크플로우를 제공합니다. TypeScript Props를 대화형 컨트롤(텍스트, 선택, 불리언, 숫자)에 매핑하고, `storybook/test`의 `fn()`을 사용하여 액션 스파이를 바인딩함으로써 Storybook Actions 패널에서 사용자 상호 작용을 깔끔하게 기록합니다. 또한 강력한 문서화를 위해 `parameters.docs`에 마크다운을 포함하고, 의미론적 프로덕션 토큰을 사용하여 4가지 표준 변형(라이트, 다크, 스켈레톤 라이트, 스켈레톤 다크)을 내보내도록 강제하며, 하드코딩된 색상 값을 금지합니다. 이 스킬은 Claude Code, Cursor, Codex와 같은 AI 에이전트에서 Next.js 및 Storybook과 함께 사용되며, `examples/` 디렉토리에서 참조 구현을 제공하고 PowerShell 및 Bash 스크립트를 통한 검증 단계를 지원하여 일관된 스토리 품질과 엔지니어링 표준 준수를 보장합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BIGboss248/nextjs-wordpress/tree/HEAD/.agents/skills/nextjs-storybook-story

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Next.js Storybook CSF3 스토리 생성 (nextjs-storybook-story)은(는) 무엇을 하나요?

동일 위치에 배치된 Storybook 스토리([ComponentName].stories.tsx)를 Component Story Format 3(CSF3)으로 생성하고 업데이트하기 위한 전문 워크플로우입니다.

[!TIP] 모듈식 에셋:


아키텍처 규칙 및 표준

1. 메인 컴포넌트 범위만 (마이크로 리프 클라이언트 제외)

  • 대화형 클라이언트 로직은 작은 리프 클라이언트 컴포넌트(예: 토글 버튼, 클릭 리스너)로 하향 이동됩니다.
  • 내부 마이크로 리프 클라이언트 헬퍼에 대한 스토리를 생성하지 마십시오.
  • 오직 메인 컴포넌트(주요 기능 섹션 또는 복합 UI 블록)에만 Storybook 스토리가 필요합니다.

2. CSF3 구조 및 대화형 컨트롤

  • Meta<typeof ComponentName> 및 StoryObj<typeof ComponentName>과 함께 Component Story Format 3(CSF3)을 사용하십시오.
  • 태그 포함: tags: ["autodocs", "ai-generated"].
  • TypeScript Props를 meta.argTypes의 대화형 컨트롤(text, select, boolean, number)에 매핑하십시오.
  • args에 현실적인 기본 prop 값을 제공하십시오.

3. 액션 스파이(storybook/test의 fn())

  • 모든 콜백 및 뮤테이션 prop(예: onClick, onToggle, onSubmit)에 대해 기본 args에 'storybook/test'의 fn()을 바인딩하여 사용자 상호 작용이 Storybook Actions 패널에 깔끔하게 기록되도록 하십시오.

4. 구조화된 문서(parameters.docs)

  • meta.parameters.docs.description.component에 포괄적인 마크다운을 작성하십시오:
    • 개요 및 목적: 컴포넌트가 무엇이며 왜 존재하는지.
    • 아키텍처 및 경계: RSC vs 리프 클라이언트 컴포넌트("use client"), 훅, 캐싱.
    • 주요 상호 작용: 클릭 핸들러, 상태 토글 및 애니메이션.
    • 접근성 및 모션: ARIA 역할/레이블 및 prefers-reduced-motion.
  • 개별 스토리에 parameters.docs.description.story로 주석을 추가하십시오.

5. 4가지 표준 스토리 변형 및 프로덕션 토큰 (필수)

  • 하드코딩된 색상 없음: 어떤 상황에서도 임의의 16진수 값(#FAFAFA, #050505)이나 비토큰 팔레트 색상(border-zinc-200, text-zinc-500)을 사용하지 마십시오.
  • 의미론적 프로덕션 토큰: app/globals.css의 의미론적 테마 토큰(bg-background, text-foreground, border-border, text-muted-foreground)만 독점적으로 사용하십시오.
  • 범위가 지정된 .light 및 .dark 클래스가 있는 의미론적 컨테이너 카드에 정확히 4가지 스토리 변형을 내보내십시오:
    1. Light: { themes: { themeOverride: "light" }, backgrounds: { default: "light" } }로 구성되고 "Light Mode"라고 레이블이 지정된 .light bg-background text-foreground border-border 카드에 있습니다.
    2. Dark: { themes: { themeOverride: "dark" }, backgrounds: { default: "dark" } }로 구성되고 "Dark Mode"라고 레이블이 지정된 .dark bg-background text-foreground border-border 카드에 있습니다.
    3. SkeletonLight: render: () => <[ComponentName]Skeleton />이고 "Skeleton (Light)"라고 레이블이 지정된 .light bg-background text-foreground border-border 카드에 있습니다.
    4. SkeletonDark: render: () => <[ComponentName]Skeleton />이고 "Skeleton (Dark)"라고 레이블이 지정된 .dark bg-background text-foreground border-border 카드에 있습니다.

워크플로우 단계

  • 1단계: 컴포넌트 계약 및 Props 검사

    • [ComponentName].tsx를 읽고 내보낸 모든 props, 콜백 핸들러 및 시각적 상태를 확인합니다.
  • 2단계: 동일 위치 스토리 생성 ([ComponentName].stories.tsx)

    • [ComponentName].stories.tsx를 [ComponentName].tsx와 직접적으로 동일한 위치에 배치합니다.
    • CSF3 메타데이터, argTypes, fn() 액션 스파이, 마크다운 문서 및 4가지 표준 스토리 변형을 구현합니다.
  • 3단계: 검증 및 스모크 테스트 실행

    • 검증 스크립트를 실행하여 스토리 존재 여부를 확인하고 Storybook 스모크 테스트를 실행합니다:
      • Windows (PowerShell):
        pwsh .agents/skills/nextjs-storybook-story/scripts/verify-storybook.ps1 -ComponentPath <target_component_dir>
        
      • Linux / macOS (Bash):
        bash .agents/skills/nextjs-storybook-story/scripts/verify-storybook.sh <target_component_dir>
        
    • 구문 충돌이나 누락된 내보내기 오류를 수정합니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

BIGboss248/nextjs-wordpress

Create, configure, manage, and validate Google Antigravity customizations including skills, rules, MCP servers, lifecycle hooks, plugins, and custom JSON configs. Use when adding new capabilities to Antigravity, configuring MCP servers, writing rules, creating skills, setting up hooks, or modernizing legacy workflows.

BIGboss248/nextjs-wordpress

Spawn multiple agents into a shared conversation where they debate, disagree, and converge on a solution via a shared chat.json file. Use for architecture decisions, code review debates, design trade-offs, or any problem that benefits from adversarial reasoning. Triggers on "chatroom", "agent debate", "have agents discuss", "agent chatroom", "debate this", or /agent-chatrooms. Also triggers on phrases like "have 3 agents argue about", "multi-agent discussion", or "let them debate".

BIGboss248/nextjs-wordpress

Always-active code intelligence, search, and navigation skill utilizing the codebase-memory MCP server. Enforces an index-first protocol (verifying and refreshing the knowledge graph via index_repository or index_status before searching, required because background auto_watch is disabled to eliminate editor stutter and system lag), followed by graph-first exploration (search_graph, trace_path, get_code_snippet, query_graph, get_architecture, detect_changes) instead of naive text grep or full-file reads. Always activate before searching the codebase, inspecting unknown architecture, finding symbols, or tracing callers/callees.

BIGboss248/nextjs-wordpress

>- Discover, interview, and craft comprehensive UX/UI design specifications (design-spec.md) and design tokens for web components. Triggers on "/component-design", "design component", "design section", "design UI", "wireframe component", or "create design spec".

BIGboss248/nextjs-wordpress

>- Configure and query WooCommerce APIs including WPGraphQL, WooGraphQL, and JWT auth for headless frontends. Use when connecting Next.js to WooCommerce or fetching store catalog data.

BIGboss248/nextjs-wordpress

Orchestrate parallel browser automation using multiple Chrome DevTools MCP instances. Use when a task requires doing the same browser action across many targets simultaneously (e.g., submitting contact forms, filling applications, scraping pages that need JS rendering). Spin up 1-5 parallel Chrome agents.

BIGboss248/nextjs-wordpress

Workflow for spawning an independent subagent to conduct unbiased code reviews and inject adversarial edge-case tests ([ComponentName].edge.test.tsx).

BIGboss248/nextjs-wordpress

>- Build Next.js App Router React components with Suspense skeletons, semantic OKLCH tokens, Jest + RTL unit tests, Playwright visual/hydration checks, and Tailwind logical styling. Triggers on "/nextjs-component-dev", "create component", "new component", "build component", or "develop component".

BIGboss248/nextjs-wordpress

>- Bootstrap, configure, and verify the complete Next.js App Router development environment, developer tooling, testing suites, MCP servers, Docker containerization, and CI/CD. Triggers on "/nextjs-dev-setup", "setup nextjs dev environment", "start a nextjs project", or "containerize nextjs app".

BIGboss248/nextjs-wordpress

>- Configure production health monitoring endpoints (/api/health), Docker Compose probes, and runtime metrics in Next.js App Router applications. Use when asked to "setup health check", "add health endpoint", "docker compose healthcheck nextjs", "configure health monitor", or "/nextjs-healthcheck".

BIGboss248/nextjs-wordpress

Bootstrap, configure, and verify next-intl App Router internationalization (proxy.ts/middleware.ts, next/root-params, [locale] layout, routing). Triggers on "/nextjs-i18n-setup", "setup i18n", "install next-intl", "configure next-intl", "add internationalization", "setup locale routing", "migrate to [locale]".

BIGboss248/nextjs-wordpress

Read/write translation dictionaries (messages/[locale].json), next-intl hooks (getTranslations/useTranslations), providers (Storybook/tests/subtrees), and BiDi styling. Triggers on "/nextjs-i18n-usage", "i18n dictionary", "use translations", "read dictionary", "i18n provider", "next-intl hooks", "storybook i18n", "test i18n", "add translation keys", "localize component", "create a component", "update a component".

BIGboss248/nextjs-wordpress

>- Configure, test, and verify OpenTelemetry (OTel) observability in Next.js App Router applications. Triggers on "/nextjs-otel", "setup otel", "configure opentelemetry", "test otel", or "verify opentelemetry".

BIGboss248/nextjs-wordpress

Step-by-step workflow for designing and building Next.js App Router pages (RSC page.tsx, loading skeleton, metadata, JSON-LD schema, and dynamic static params). Triggers on "/nextjs-page-dev", "create page", "new page", "develop page", "build route", or "implement page".

BIGboss248/nextjs-wordpress

>- Orchestrate end-to-end planning for Next.js App Router projects, generating canonical specifications, design systems, and a 7-phase modular implementation roadmap in docs/plan/. Triggers on "/nextjs-plan", "plan a nextjs project", "plan nextjs app", "create nextjs project plan", "outline nextjs architecture", or "generate plan".

BIGboss248/nextjs-wordpress

>- Build Next.js e-commerce frontends backed by WooCommerce APIs, handling ISR catalogs, cart sessions, and JWT authentication. Use when building or querying Next.js stores with WooCommerce.

BIGboss248/nextjs-wordpress

Self-correcting rules engine and feedback loop that learns from user corrections, mistakes, and project-specific constraints by maintaining a persistent autofix ruleset. Scans learned rules before starting any task, resolves conflicts, and automatically appends new rules upon corrections. Triggers on user corrections ("no, do it this way", "never do X", "always use Y"), /learn, "self repair", "add rule", "update rules", or when diagnosing assumptions and bugs. CRITICAL ALWAYS-ACTIVE LIFECYCLE SKILL. Must always be kept in context, loaded at session start, and consulted before starting ANY task to read and apply active constraints from autofix.json. MUST ALWAYS be triggered immediately whenever the user provides ANY correction, preference, criticism, rejection of an approach, or adjustment ("no", "don't do X", "use Y", "remember", "prefer"), or when any mistake/bug is identified. Automatically and immediately formulates and appends the new imperative rule to the project's autofix.json ruleset file.

BIGboss248/nextjs-wordpress

Setup, automate, and execute SEO audits, CI/CD pre-push/pre-deploy checks, and ranking optimizations using the seo CLI and MCP server.

BIGboss248/nextjs-wordpress

End-to-end repository onboarding and development environment setup skill. Scans repository structure, configures project metadata (docs/project.json), sets up the codebase-memory-mcp code intelligence knowledge graph server (in workspace mcp.json and globally for AGY only), configures git hooks with Husky and Commitlint, establishes multi-stage production Docker containerization, and automates credit-optimized Release Please CI/CD with multi-arch (AMD64 & ARM64) GHCR package deployment. Triggers on "/setup-repository", "setup repository", "setup repo", "initialize repository", "new repo setup", or when preparing any repository for development and AI agent workflows.

BIGboss248/nextjs-wordpress

AI screen scaffolding, layout generation, and variant exploration workflow powered by Google Stitch (StitchMCP). Consumes a component design specification (docs/design/components/[page name]/[component name]/design-spec.md), verifies and reuses the central Stitch project in docs/project.json (or creates/persists one if absent), seeds the project's design system into Stitch, synthesizes layout prompts to generate a screen and create one variant of the given design spec file, downloads and saves Stitch JPG screenshots and HTML code files directly into docs/design/components/[page name]/[component name]/stitch/ using binary-safe PowerShell Invoke-WebRequest, outputs image prompts to the user if visual assets are needed (without calling generate_image to conserve tokens), updates design-spec.md with Stitch layout benchmarks, and audits asset download integrity with an independent subagent. Triggers on "/stitch-design", "generate stitch screen", "create stitch variant", "scaffold screen with stitch", or "stitch...

관련 스킬