mock
Generate or update MSW mock handlers and fixtures from feature spec API contracts. Use to set up mock infrastructure, generate feature-specific mocks, or check mock status.
- License 许可
- MIT
- 最近更新
- 2026-03-27
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- mock
- context
- fork
- description
- Generate or update MSW mock handlers and fixtures from feature spec API contracts. Use to set up mock infrastructure, generate feature-specific mocks, or check mock status.
- argument-hint
- [feature-name] | --setup | --status
02 资源文件 1
- 参考文档index.json679 B
03 SKILL.md 正文
Routing
Parse $ARGUMENTS to determine mode:
-
--setup: Set up MSW mock infrastructure from scratch. Spawntask-executoragent (haiku) with:[HANDOFF] TO: task-executor (haiku) TASK: Set up MSW mock infrastructure DONE-WHEN: - mocks/server.ts, mocks/browser.ts, mocks/index.ts, mocks/handlers/index.ts created - msw installed as devDependency - Mock initialization added to app entry point MUST-NOT: - Overwrite existing mocks/ directory READS: - .claude/agents/lead-engineer-msw-mock.md (mock patterns) [/HANDOFF] -
--status: Report current mock status (read-only, no agent spawn). Read and report:- Does
mocks/directory exist? - List all handler files in
mocks/handlers/ - List all fixture files in
mocks/fixtures/ - Check
NEXT_PUBLIC_API_MOCKINGin.env*files - For each feature with
mock: truein spec.md, check if a handler exists
- Does
-
Feature mode (default — when
$ARGUMENTSis a feature name): Spawntask-executoragent (sonnet) with:[HANDOFF] TO: task-executor (sonnet) TASK: Generate MSW mock handlers and fixtures for feature "[feature-name]" DONE-WHEN: - mocks/fixtures/[feature-name].ts created with typed mock data - mocks/handlers/[feature-name].ts created with MSW handlers - mocks/handlers/index.ts updated to include new handlers - npx tsc --noEmit passes MUST-NOT: - Modify source code outside mocks/ READS: - spec/feature/[feature-name]/spec.md (API Contracts section) - .claude/agents/lead-engineer-msw-mock.md (mock patterns) [/HANDOFF]Pre-checks (before spawning):
- Read spec.md — if
mockis not true, ask user to enable it - If
## API Contractsis empty/missing → STOP: "Add API contracts first (run /spec)" - If
mocks/doesn't exist → run --setup first, then proceed
- Read spec.md — if
04 同仓库更多 Skills
zustand
Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.
web-vitals
暂无简介
vercel-storage
Vercel storage expert guidance — Blob, Edge Config, and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.
vercel-functions
Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel.
ui-ux-pro-max
UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, and mobile app. Elements: button, modal, navbar, sidebar, card, table, form, and chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, and flat design. Topics: color systems, accessibility, animation, layout, typography, font pairing, spacing, interaction states, shadow, and gradient. Integrations: shadcn/ui MCP for component search and examples.
turborepo
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.