new-project
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNew Project
新项目
Plan and safely bootstrap modern software projects from typed presets and capability preferences.
基于类型化预设和功能偏好,规划并安全启动现代化软件项目。
Dispatch
命令调度
| Action |
|---|---|
| Empty | Gallery: show modes, presets, preference categories, examples; do not edit |
| Preferences: list capability categories and defaults |
| Preferences: validate capability and preset catalogs |
| Preferences: explain the safe preference addition workflow |
| Presets: show curated presets and tradeoffs |
| Plan: read-only blueprint for a new or existing target |
| Init: new target setup after preflight, blueprint, and approval |
| Bootstrap Existing: non-destructive missing-file setup |
| Audit: read-only scaffold and convention health report |
| Repair: approved additive repair based on audit findings |
| Doctor: validate toolchain/config health without changing files |
| Docs: classify docs-lite, docs-themed, docs-interactive, or docs-product |
| Docs Lite: Astro Starlight static docs profile |
| Docs Themed: Starlight plus CSS/Tailwind brand layer |
| Docs Interactive: Starlight plus React islands |
| Docs Product: Next.js plus Fumadocs advanced docs profile |
| AI Instructions: AGENTS, nested AGENTS, Claude Code, OpenCode, Codex planning |
| GitHub: CI, templates, release workflow planning |
| Init/Plan: Python-focused preset |
| Init/Plan: Node/web preset |
| Init/Plan: Supabase, SQLite, DuckDB, notebooks preset |
| Plan: Bedrock/AgentCore planning; provider mutation is opt-in |
| Init/Plan: monorepo preset |
| Plan: comprehensive blueprint; apply module-by-module only |
| Natural language new repo/bootstrap request | Auto-classify, then ask only high-impact missing questions |
| Product feature request | Refuse or redirect to implementation skills |
| Agent or MCP server request | Refuse or redirect to |
| Destructive or force request | Stop, explain risk, require file-by-file approval |
| 操作说明 |
|---|---|
| 空值 | 展示库:显示模式、预设、偏好类别及示例;不进行编辑操作 |
| 偏好设置:列出功能类别及默认值 |
| 偏好设置:验证功能与预设目录的有效性 |
| 偏好设置:说明安全的偏好添加流程 |
| 预设:展示精选预设方案及其权衡要点 |
| 规划:为新目标或现有目标生成只读蓝图 |
| 初始化:在预检、蓝图确认及审批完成后,完成新目标的搭建 |
| 现有项目启动:为现有项目无损添加缺失文件 |
| 审计:生成只读的脚手架与规范健康报告 |
| 修复:基于审计结果,执行已获批的增量修复操作 |
| 诊断:验证工具链/配置健康状态,不修改文件 |
| 文档:将文档分类为轻量文档、主题文档、交互式文档或产品级文档 |
| 轻量文档:Astro Starlight静态文档配置 |
| 主题文档:Starlight + CSS/Tailwind品牌层配置 |
| 交互式文档:Starlight + React islands配置 |
| 产品级文档:Next.js + Fumadocs高级文档配置 |
| AI指令:AGENTS、嵌套AGENTS、Claude Code、OpenCode、Codex规划 |
| GitHub:CI、模板、发布流程规划 |
| 初始化/规划:Python专属预设 |
| 初始化/规划:Node/Web预设 |
| 初始化/规划:Supabase、SQLite、DuckDB、笔记本预设 |
| 规划:Bedrock/AgentCore规划;提供商变更为可选操作 |
| 初始化/规划:单体仓库预设 |
| 规划:全面蓝图;仅支持逐个模块应用 |
| 自然语言描述的新仓库/启动请求 | 自动分类,仅询问高影响的缺失信息 |
| 产品功能请求 | 拒绝请求或重定向至实现类技能 |
| Agent或MCP服务器请求 | 拒绝请求或重定向至 |
| 破坏性或强制请求 | 终止操作,说明风险,要求逐文件审批 |
Operating Flow
操作流程
- Classify the request as new project, existing repo bootstrap, audit, repair, preferences, docs, AI instructions, GitHub, cloud/data, or refusal.
- Read for ambiguous or natural-language requests.
references/intake-and-routing.md - Run read-only preflight before any mutating mode.
- Resolve presets and capabilities from , not from ad hoc prose.
data/ - Produce a blueprint with files, commands, skipped existing files, risks, approvals, and validation.
- Apply only after explicit approval, one module at a time.
- Run validation and summarize created, skipped, and deferred work.
- 将请求分类为新项目、现有仓库启动、审计、修复、偏好设置、文档、AI指令、GitHub、云/数据或拒绝处理。
- 若请求模糊或为自然语言输入,阅读。
references/intake-and-routing.md - 在执行任何修改操作前,先运行只读预检。
- 从目录解析预设与功能,而非临时文本。
data/ - 生成包含文件、命令、跳过的现有文件、风险、审批项及验证内容的蓝图。
- 仅在获得明确审批后,逐个模块应用变更。
- 执行验证并总结已创建、已跳过及已延迟的工作内容。
Pattern Implementation
模式实现
Classification-Gating
分类管控
Classify every request before acting: new project, existing bootstrap, audit, repair, preferences, docs, AI instructions, GitHub, cloud/data, or refusal. Ambiguous requests stay read-only until the missing choice is resolved.
在执行操作前对所有请求进行分类:新项目、现有项目启动、审计、修复、偏好设置、文档、AI指令、GitHub、云/数据或拒绝处理。模糊请求保持只读状态,直至明确缺失选项。
Progressive-Disclosure
渐进式披露
Keep as the routing contract. Load references for domain detail, data files for preferences, scripts for deterministic checks, and templates only for report rendering.
SKILL.md将作为路由契约。加载参考文件获取领域细节,加载数据文件获取偏好设置,加载脚本执行确定性检查,仅在生成报告时使用模板。
SKILL.mdScaling-Strategy
扩展策略
Add future stacks as capabilities and presets first. Change the dispatch table only when a new top-level mode is needed.
新增技术栈时,先将其作为功能与预设添加。仅当需要新增顶层模式时,才修改命令调度表。
Canonical Vocabulary
标准术语
Use these canonical terms exactly.
| Term | Meaning |
|---|---|
| Preset | Curated setup bundle, such as |
| Capability | Atomic setup feature, such as |
| Blueprint | Read-only project setup plan with files, commands, risks, approvals, and checks |
| Apply step | One approved mutation unit from a blueprint |
| External side effect | Cloud, deploy, release, DNS, account, or provider mutation |
严格使用以下标准术语。
| 术语 | 含义 |
|---|---|
| Preset | 精选的搭建包,例如 |
| Capability | 原子化搭建功能,例如 |
| Blueprint | 只读的项目搭建规划,包含文件、命令、风险、审批项及检查内容 |
| Apply step | 蓝图中单个已获批的修改单元 |
| External side effect | 云服务、部署、发布、DNS、账户或提供商变更操作 |
Reference File Index
参考文件索引
| File | Purpose | Read When |
|---|---|---|
| End-to-end safe setup flow | Mutating modes |
| Capability schema and conflict semantics | Preference/catalog work |
| Presets and tradeoffs | Preset selection |
| Human-readable preference list | |
| Future preference extension workflow | |
| Classification and ambiguity handling | Natural language inputs |
| Artifact matrices by preset | Blueprinting |
| uv, uvx, pyproject, Python packages | Python profiles |
| pnpm, npm/npx, TypeScript, Next, Astro, Nx, Changesets | Node profiles |
| Starlight docs-lite/themed/interactive guidance | Docs light modes |
| Fumadocs docs-product guidance | Docs product mode |
| DESIGN.md and anti-slop design guidance | Web/docs/design profiles |
| Supabase, SQLite, DuckDB, Kaggle, Colab | Data/notebook profiles |
| Pydantic AI, LangGraph, Vercel AI SDK, Bedrock, AgentCore | AI app profiles |
| Actions, releases, least-privilege CI | GitHub mode |
| Vercel, Cloudflare DNS, AWS deploy gates | Cloud modes |
| pre-commit and CI mirroring | Quality gates |
| Conventional Commits, Changesets, releases | Release profile |
| AGENTS, nested AGENTS, Claude Code, OpenCode, Codex | AI instruction mode |
| OpenSpec setup and generated artifact policy | OpenSpec profile |
| Secrets, package generators, Docker, CI, supply chain | Risky modes |
| Audit, doctor, repair workflow | Audit/repair/doctor |
| Skeletons and template guidance | Artifact generation |
| 文件 | 用途 | 读取时机 |
|---|---|---|
| 端到端安全搭建流程 | 修改模式时 |
| 功能 schema 及冲突语义 | 偏好设置/目录操作时 |
| 预设方案及其权衡要点 | 选择预设时 |
| 人类可读的偏好列表 | |
| 未来偏好扩展流程 | |
| 分类及模糊请求处理 | 自然语言输入时 |
| 按预设分类的产物矩阵 | 生成蓝图时 |
| uv、uvx、pyproject、Python包相关内容 | Python配置时 |
| pnpm、npm/npx、TypeScript、Next、Astro、Nx、Changesets相关内容 | Node配置时 |
| Starlight轻量/主题/交互式文档指南 | 轻量文档模式时 |
| Fumadocs产品级文档指南 | 产品级文档模式时 |
| DESIGN.md及防冗余设计指南 | Web/文档/设计配置时 |
| Supabase、SQLite、DuckDB、Kaggle、Colab相关内容 | 数据/笔记本配置时 |
| Pydantic AI、LangGraph、Vercel AI SDK、Bedrock、AgentCore相关内容 | AI应用配置时 |
| Actions、发布、最小权限CI相关内容 | GitHub模式时 |
| Vercel、Cloudflare DNS、AWS部署门禁相关内容 | 云模式时 |
| pre-commit及CI镜像相关内容 | 质量门禁配置时 |
| Conventional Commits、Changesets、发布相关内容 | 发布配置时 |
| AGENTS、嵌套AGENTS、Claude Code、OpenCode、Codex相关内容 | AI指令模式时 |
| OpenSpec搭建及生成产物策略 | OpenCode配置时 |
| 密钥、包生成器、Docker、CI、供应链相关内容 | 高风险模式时 |
| 审计、诊断、修复流程 | 审计/修复/诊断时 |
| 骨架及模板指南 | 产物生成时 |
Script Index
脚本索引
| Script | Purpose |
|---|---|
| List, validate, resolve, merge, and explain preferences |
| Read-only project detection and risk flags |
| Build a JSON blueprint from request, preset, and capabilities |
| Validate schemas, dependencies, conflicts, templates, and references |
| Validate blueprint safety before apply |
| Query package/version facts for selected packages |
| Verify existing scaffold health without mutations |
| Render report data for HTML templates |
Scripts use , JSON stdout, diagnostics on stderr, and . They must not read secret files.
argparse--help| 脚本 | 用途 |
|---|---|
| 列出、验证、解析、合并及说明偏好设置 |
| 只读的项目检测及风险标记 |
| 根据请求、预设及功能构建JSON蓝图 |
| 验证schema、依赖、冲突、模板及参考文件的有效性 |
| 在应用前验证蓝图的安全性 |
| 查询所选包的版本信息 |
| 验证现有脚手架健康状态,不执行修改操作 |
| 为HTML模板渲染报告数据 |
脚本使用、JSON标准输出、标准错误输出诊断信息,并支持。脚本不得读取机密文件。
argparse--helpSafety Gates
安全门禁
- Preflight first for scaffold, bootstrap, repair, docs, AI, GitHub, cloud, or apply modes.
- Blueprint before mutation or package install.
- Skip existing files by default; overwrite requires file-by-file approval.
- Preserve detected package managers unless migration is approved.
- Never ask users to paste secrets into chat, and never read secret files.
- Generate or
.env.example, not real credentials..env.template - Cloud, deploy, release, DNS, Docker, and account mutations require explicit provider-specific approval.
- GitHub Actions default to ; add only narrow permissions.
permissions: contents: read - Docker Compose templates must avoid privileged mode, host networking, Docker socket mounts, broad host mounts, root services, and public DB binds by default.
- Generated AI instructions must not bypass approvals, disable credential guards, auto-deploy, or ignore higher-priority instructions.
- 在脚手架、启动、修复、文档、AI、GitHub、云或应用模式下,先执行预检。
- 在执行修改或安装包前,先生成蓝图。
- 默认跳过现有文件;覆盖操作需要逐文件审批。
- 保留检测到的包管理器,除非迁移操作已获批。
- 绝不要要求用户在聊天中粘贴机密信息,也不要读取机密文件。
- 生成或
.env.example,而非真实凭证。.env.template - 云服务、部署、发布、DNS、Docker及账户变更操作需要明确的提供商专属审批。
- GitHub Actions默认设置为;仅添加必要的窄权限。
permissions: contents: read - Docker Compose模板默认禁止特权模式、主机网络、Docker套接字挂载、宽泛主机挂载、root服务及公共数据库绑定。
- 生成的AI指令不得绕过审批、禁用凭证防护、自动部署或忽略更高优先级的指令。
Critical Rules
关键规则
- Use the capability catalog for stack selection; do not hardcode preferences only in prose.
- Distinguish one-off tools from
uvxproject commands.uv run - Prefer for new Node projects, but preserve detected npm/yarn/bun unless migration is approved.
pnpm - Prefer Starlight for lightweight docs; use Fumadocs only when product/API/docs-heavy requirements justify it.
- Make Tailwind v4 and shadcn/ui opt-in outside web/product profiles; add only needed shadcn components.
- Never claim without live registry or official-doc evidence gathered during the run.
latest - Do not create agents or MCP servers; redirect those requests.
- Do not create branches, worktrees, commits, pushes, releases, or PRs unless explicitly requested.
- Mirror local quality gates in GitHub Actions or document why CI was deferred.
- Include mobile-first responsive UI requirements in web/docs/design profiles.
- Update evals when dispatch modes, presets, capabilities, or safety gates change.
- Keep this body under 500 lines; move details to references.
- 使用功能目录选择技术栈;不要仅在文本中硬编码偏好设置。
- 区分一次性工具与
uvx项目命令。uv run - 新项目优先使用,但保留检测到的npm/yarn/bun,除非迁移操作已获批。
pnpm - 轻量文档优先使用Starlight;仅当产品/API/文档需求较重时,才使用Fumadocs。
- 在Web/产品配置外,Tailwind v4和shadcn/ui为可选功能;仅添加必要的shadcn组件。
- 若无运行时从注册表或官方文档获取的证据,不要声称使用版本。
latest - 不要创建Agent或MCP服务器;将此类请求重定向。
- 除非明确请求,否则不要创建分支、工作区、提交、推送、发布或PR。
- 在GitHub Actions中镜像本地质量门禁,或记录CI延迟的原因。
- 在Web/文档/设计配置中包含移动端优先的响应式UI要求。
- 当命令调度模式、预设、功能或安全门禁变更时,更新评估内容。
- 保持本文档在500行以内;将细节移至参考文件。
Validation Contract
验证契约
Before declaring changes to this skill complete, run:
bash
python skills/new-project/scripts/check.py
uv run pytest tests/test_new_project.py
uv run python skills/new-project/scripts/preflight.py --path . --format jsonAfter changing skill definitions, public descriptions, references, or eval behavior, invoke if available.
docs-steward在宣布本技能的变更完成前,运行以下命令:
bash
python skills/new-project/scripts/check.py
uv run pytest tests/test_new_project.py
uv run python skills/new-project/scripts/preflight.py --path . --format json在修改技能定义、公开描述、参考文件或评估行为后,若可用,调用该工具。
docs-steward