一键导入
doccopilot-project-standards
面向 Astro + React 项目的稳健开发规范,目标是约束实现过程并产出健壮代码。用于功能开发、缺陷修复、重构落地、边界条件处理、异常恢复、类型与测试补强、以及依赖选择决策;要求先读取 package.json,优先复用现有依赖,避免引入脆弱实现与高风险改动。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
面向 Astro + React 项目的稳健开发规范,目标是约束实现过程并产出健壮代码。用于功能开发、缺陷修复、重构落地、边界条件处理、异常恢复、类型与测试补强、以及依赖选择决策;要求先读取 package.json,优先复用现有依赖,避免引入脆弱实现与高风险改动。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Skill for building with the Astro web framework. Helps create Astro components and pages, configure SSR adapters, set up content collections, deploy static sites, and manage project structure and CLI commands. Use when the user needs to work with Astro, mentions .astro files, asks about static site generation (SSG), islands architecture, content collections, or deploying an Astro project.
Expert code review of current git changes with a senior engineer lens. Detects SOLID violations, security risks, and proposes actionable improvements.
Manage software complexity through deep modules, information hiding, and strategic programming. Use when the user mentions "module design", "API too complex", "shallow class", "complexity budget", or "strategic vs tactical". Covers deep vs shallow modules, red flags for complexity, and comments as design documentation. For code quality, see clean-code. For boundaries, see clean-architecture.
| name | doccopilot-project-standards |
| description | 面向 Astro + React 项目的稳健开发规范,目标是约束实现过程并产出健壮代码。用于功能开发、缺陷修复、重构落地、边界条件处理、异常恢复、类型与测试补强、以及依赖选择决策;要求先读取 package.json,优先复用现有依赖,避免引入脆弱实现与高风险改动。 |
按以下顺序执行,不要跳步:
package.json,确认可复用依赖与能力边界。package.json 再输出建议。以下要求必须满足:
null/undefined/empty。any 扩散,关键分支使用类型守卫。职责保持清晰:
避免将复杂交互逻辑散落在 Astro 页面文件中。
若 package.json 已包含 react-use,优先复用其 hooks,避免重复造轮子。优先场景:
禁止以下实现:
交付时按以下结构输出:
package.json)组合 className 使用 src/lib/utils.ts 的 cn:
import { cn } from '@/lib/utils';cn(...),避免手工拼接导致 Tailwind 冲突。优先复用:react-use、zustand、clsx、tailwind-merge、dayjs、@floating-ui/react、@radix-ui/react-*、nanostores。
如本次任务包含代码变更,至少执行并报告结果:
pnpm check
pnpm run lint
pnpm run typecheck
pnpm test
涉及交互链路变更时再执行:
pnpm run test:e2e
按需读取:
references/global-prompt.md(加载关键词: 《软件设计的哲学》)