一键导入
nextjs
This skill should be used every time you work on Next.js projects or Next.js app code changes in this repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill should be used every time you work on Next.js projects or Next.js app code changes in this repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
This skill should be used every time you do software engineering
Use this skill for all context planning, creation, updates, review, search, and sync work in this repository.
Use this skill when working on Nexus context workflows, CDD specifications, or deriving reusable skills from repository code.
| name | nextjs |
| description | This skill should be used every time you work on Next.js projects or Next.js app code changes in this repository. |
| compatibility | opencode |
This file defines the preferred Next.js project organization for this repo, constrained to folder names that appear in the official Bulletproof React project structure.
app/ only.features/ as the primary unit of change and ownership.components/, hooks/, lib/, types/, utils/, and config/, never by reaching into another feature.next/link for internal navigation - never use <a href="..."> for internal routes.pino as the approved server logging library.agent-browser skill.agent-browser requirement is strict; do not substitute ad-hoc/manual browser testing.Tailwind CSS v4 is the only permitted CSS framework.
w-[300px].clsx and tailwind-merge for conditional classes.@apply to extract classesstyle propssrc/
├── app/ # application layer
├── assets/ # static assets
├── components/ # shared components
├── config/ # global configuration
├── features/ # feature based modules
├── hooks/ # shared hooks
├── lib/ # reusable libraries
├── stores/ # global state stores
├── testing/ # test utilities and mocks
├── types/ # shared types
└── utils/ # shared utility functions
app/: application glue and composition only.
routes/, app.tsx, provider.tsx, router.tsxfeatures/: each feature is a self-contained folder.
features/awesome-feature/components/: shared components used across the application.hooks/: shared hooks used across the application.lib/: reusable libraries preconfigured for the application.types/: shared types used across the application.utils/: shared utility functions.config/: global configuration and exported environment variables.assets/: static assets such as images and fonts.stores/: global state stores.testing/: test utilities and mocks.Each feature owns its UI, logic, and API integration. Add only what the feature needs.
src/features/awesome-feature/
├── api/ # exported API request declarations and API hooks
├── assets/ # feature-specific static assets
├── components/ # feature-scoped UI
├── hooks/ # feature-scoped hooks
├── stores/ # feature state stores
├── types/ # feature types
└── utils/ # feature utilities
Features must stay small, focused, and explainable in one sentence. Avoid turning a single feature into a god-folder that owns multiple unrelated responsibilities.
When a feature grows too large, split it into smaller atomic features using flat names under features/:
features/<feature-name>-<subfeature>/
This keeps boundaries explicit without introducing an extra architectural layer that Bulletproof React does not define.
Good examples:
features/chat-panel-transcript/features/chat-panel-sidebar/features/chat-panel-summary/features/conversation-list/features/conversation-search/Avoid splitting by arbitrary file type or low-level implementation detail.
Less useful examples:
features/chat-panel-buttons/features/chat-panel-utils/features/chat-panel-misc/Use a separate feature when the code has its own UI, logic, state, API interaction, or user-facing responsibility. Keep code nested inside an existing feature when it is only a private implementation detail of that feature.
Rules of thumb:
app/ layer.kebab-case for folders and files.features/ can import from components/, hooks/, lib/, types/, utils/, config/, and stores/.components/, hooks/, lib/, types/, utils/, config/, and stores/ never import from features/.app/ layer.src/
├── app/
│ ├── routes/
│ ├── app.tsx
│ ├── provider.tsx
│ └── router.tsx
├── assets/
├── components/
├── config/
├── features/
│ └── awesome-feature/
│ ├── api/
│ ├── assets/
│ ├── components/
│ ├── hooks/
│ ├── stores/
│ ├── types/
│ └── utils/
├── hooks/
├── lib/
├── stores/
├── testing/
├── types/
└── utils/