一键导入
react-scaffold
Use when starting a new React/Vite/Bun frontend with testing-library, feature-based structure, and typed API client
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when starting a new React/Vite/Bun frontend with testing-library, feature-based structure, and typed API client
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user wants to free disk space, investigate disk usage, clean caches, remove unused artifacts, or when disk capacity is high. Also use when asked to "clean up", "free space", "disk full", or "what's using disk space". Always uses AskUserQuestion for every deletion decision.
Use at the start of every conversation and for every user message — orchestrates the full engineering skills suite by understanding intent, clarifying requirements interactively, and invoking the right skills
Use when refactoring Go code, cleaning up legacy codebases, optimizing performance, or enforcing clean architecture boundaries in a Go/Fiber backend
Use when refactoring Python code, cleaning up legacy codebases, optimizing performance, enforcing type safety, or improving clean architecture in a FastAPI backend
Use when refactoring React components, cleaning up legacy frontends, optimizing performance, improving component architecture, or reducing bundle size
Use when reviewing changed code before committing or after completing a feature — checks performance, architecture, type safety, and code quality against project standards
| name | react-scaffold |
| description | Use when starting a new React/Vite/Bun frontend with testing-library, feature-based structure, and typed API client |
Bootstrap a React/Vite/Bun frontend with feature-based architecture, Vitest + testing-library, typed API client, and production Docker build.
Core principle: Feature modules with co-located tests. Type-safe API layer from day one.
bun create vite project-name --template react-ts
cd project-name
bun add @tanstack/react-query axios
bun add -d vitest @testing-library/react @testing-library/jest-dom @testing-library/user-event happy-dom msw
src/
features/ # Feature modules
auth/
components/
hooks/
api/
types/
index.ts
shared/
components/ # Shared UI components
hooks/ # Shared hooks
utils/ # Utilities
api/
client.ts # Axios instance with interceptors
types.ts # Shared API types (envelope, pagination)
mocks/
handlers.ts # MSW handlers
server.ts # MSW server setup
App.tsx
main.tsx
router.tsx
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/api': 'http://localhost:8000',
},
},
test: {
globals: true,
environment: 'happy-dom',
setupFiles: './src/test-setup.ts',
},
})
import '@testing-library/jest-dom'
import { server } from './mocks/server'
beforeAll(() => server.listen())
afterEach(() => server.resetHandlers())
afterAll(() => server.close())
// src/api/client.ts
import axios from 'axios'
export const api = axios.create({ baseURL: '/api/v1' })
export interface ApiResponse<T> {
data: T
meta?: { total?: number; page?: number }
}
export interface ApiError {
error: { code: string; message: string }
}
FROM oven/bun:1 AS build
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
REQUIRED: Invoke superpowers:test-driven-development for App.test.tsx.
import { render, screen } from '@testing-library/react'
import App from './App'
it('renders app', () => {
render(<App />)
expect(screen.getByRole('main')).toBeInTheDocument()
})
claude-md)go-scaffold or py-scaffold for full-stackreact-feature for adding features