应该先安装到哪个文件?
Cursor 项目规则优先使用 .cursor/rules;跨多个 AI 编程工具协作时可使用 CLAUDE.md 或 AGENTS.md。
模板详情
适合使用 TypeScript、React Server Components 和稳健组件架构的 Next.js 团队。
命令仍是 MVP 预览。真实使用前请检查目标文件和覆盖行为。
npx rulesmarket add nextjs-typescript-clean-architecture---
description: Next.js TypeScript project rules
globs: ["**/*.{ts,tsx}", "app/**/*", "src/**/*"]
alwaysApply: false
---
# Next.js TypeScript Rules
- Prefer App Router conventions and keep route handlers, server components and client components explicit.
- Use TypeScript strict types for public interfaces, API responses and reusable helpers.
- Keep client components small; move data fetching and secret access to server-only code.
- Do not introduce broad refactors while fixing narrow issues.
- Reuse existing components, tokens and local utilities before adding new abstractions.
- Validate forms at the boundary and return typed error states.
- Add focused tests for shared logic, parsing, permissions and user-facing workflows.
- Never expose API keys, cookies, tokens or private environment values in client code.
Cursor 项目规则优先使用 .cursor/rules;跨多个 AI 编程工具协作时可使用 CLAUDE.md 或 AGENTS.md。
不能。它只是轻量项目指令基线,应链接到仓库里真实的设计决策。