first-commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefirst-commit
first-commit
create-first-commitAGENTS.mdcreate-first-commitAGENTS.mdWhen to use it
何时使用
- New project in an empty folder ("make me a recipes app with Expo", "a landing with animations"): use a kit instead of scaffolding by hand.
- Existing project with : it came from a kit. Use
kits.lockto get the kit's improvements andupdateto add libraries, so the rules inaddstay in sync.AGENTS.md - Adding a catalog library (Sentry, PostHog, Stripe, Resend, Better Auth, Kokonut UI, Motion…) to any project: writes its config and its rule in
add.AGENTS.md
- 空文件夹中的新项目(“给我做一个使用 Expo 的食谱应用”、“制作一个带动画的落地页”):使用 kit,而不是手动 scaffolding。
- 现有项目包含 :该项目来自某个 kit。使用
kits.lock获取该 kit 的改进,并使用update添加库,从而让add中的规则保持同步。AGENTS.md - 向任意项目添加目录中的库(Sentry、PostHog、Stripe、Resend、Better Auth、Kokonut UI、Motion……):会写入其配置及对应的
add规则。AGENTS.md
Create a project
创建项目
- Pick the kit. If the first-commit MCP server is available, call with the user's description, then
recommend_kitfor the options. Otherwise:get_kit- — official kits.
npx create-first-commit list - — options and their values.
npx create-first-commit info <kit>
- Choose only the options the user asked for; keep the defaults for everything else. Options are flags: (comma-separated for multi options).
--<option> <value> - Show the plan and ask before running anything: (or the
npx create-first-commit <kit> <folder> [options] --dry-runtool). Installing runs commands and downloads packages.plan_init - After the user agrees: the same command without and with
--dry-run(or--yeswithinit_kit). It takes a few minutes.approved: true - Read the new project's and follow its "first steps": do the setup tasks you can, and tell the user which ones need them (API keys, accounts). Copy
AGENTS.mdto.env.examplebut never invent secret values..env
Community kits () that aren't verified ask for confirmation; with they also need . Only add it if the user explicitly trusts that kit.
user/kit--yes--allow-commands- 选择 kit。如果 first-commit MCP server 可用,使用用户描述调用 ,然后调用
recommend_kit获取选项。否则:get_kit- ——查看官方 kits。
npx create-first-commit list - ——查看选项及其值。
npx create-first-commit info <kit>
- 仅选择用户要求的选项;其他所有选项保持默认值。选项以 flags 形式指定:(多选项使用逗号分隔)。
--<option> <value> - 运行任何操作前先展示计划并征得用户同意:(或使用
npx create-first-commit <kit> <folder> [options] --dry-run工具)。安装过程会运行命令并下载软件包。plan_init - 用户同意后:使用相同命令,但去掉 并加上
--dry-run(或调用--yes并设置init_kit)。这需要几分钟。approved: true - 读取新项目的 并遵循其中的“first steps”:完成你能够完成的设置任务,并告诉用户哪些任务需要他们处理(API keys、accounts)。将
AGENTS.md复制为.env.example,但绝不虚构 secret 值。.env
未经验证的社区 kits()会要求确认;使用 时还需要 。只有在用户明确信任该 kit 时,才添加 。
user/kit--yes--allow-commands--allow-commandsMaintain a project
维护项目
- , then
npx create-first-commit update --dry-run: new dependencies, skills, MCP servers and rules from the kit's latest version. Files the user changed are never overwritten; it lists them.npx create-first-commit update --yes - : adds a catalog library with the right variant for the framework (Sentry for Next.js, Expo or Node).
npx create-first-commit add <library|owner/repo@skill> --yes - : checks that the project still follows its rules (one component library, env vars, skills installed). Exit code 1 means errors; fix them or tell the user.
npx create-first-commit doctor
- ,然后运行
npx create-first-commit update --dry-run:从 kit 的最新版本获取新的依赖项、skills、MCP servers 和规则。用户修改过的文件永远不会被覆盖;命令会列出这些文件。npx create-first-commit update --yes - :为相应 framework 添加目录中的库及其正确 variant(例如适用于 Next.js、Expo 或 Node 的 Sentry)。
npx create-first-commit add <library|owner/repo@skill> --yes - :检查项目是否仍然遵循其规则(仅使用一个 component library、env vars 已配置、skills 已安装)。退出码为 1 表示存在错误;修复这些问题或告知用户。
npx create-first-commit doctor
Rules
规则
- The rules in between
AGENTS.mdand<!-- kits:start -->come from the kit: follow them (for example, "only use the chosen component library"). Don't edit that block by hand;<!-- kits:end -->rewrites it.update - Don't install a second library for something the kit already chose (another component system, another auth). Use only if the user explicitly wants to switch.
add --force
- 中位于
AGENTS.md和<!-- kits:start -->之间的规则来自 kit:应遵循这些规则(例如“只使用选定的 component library”)。不要手动编辑该区块;<!-- kits:end -->会重写它。update - 如果 kit 已经为某项功能选择了 library,不要再安装第二个 library(另一套 component system、另一种 auth)。只有在用户明确希望切换时,才使用 。
add --force