project-kickoff
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProject Kickoff
项目快速启动
Bootstrap a new project or clean up an existing one so Claude Code has the right permissions, documentation, and git setup from the start.
Problem: Every new project accumulates dozens of permission approvals one click at a time, resulting in bloated settings files with leaked secrets, shell fragments, and deprecated MCP refs. This skill generates HQ-quality project scaffolding upfront.
Output: , , (and optionally git init + GitHub repo).
settings.local.jsonCLAUDE.md.gitignore快速启动新项目或整理现有项目,让Claude Code从一开始就拥有正确的权限、文档和Git配置。
问题:每个新项目都会逐步积累数十项权限审批,导致配置文件臃肿,还可能包含泄露的密钥、Shell片段和已弃用的MCP引用。本工具可提前生成高质量的项目脚手架。
输出:、、(可选Git初始化及GitHub仓库创建)。
settings.local.jsonCLAUDE.md.gitignoreOperating Modes
运行模式
Mode 1: New Project Setup
模式1:新项目设置
When: Starting a new project, or working in a directory without .
.claude/settings.local.jsonSteps:
-
Detect project type from files present in the directory:
Indicator Type orwrangler.jsoncwrangler.tomlcloudflare-worker orvercel.jsonnext.config.*vercel-app (no deploy target)package.jsonnode-generic orpyproject.tomlsetup.pypython or operational scripts.claude/agents/ops-admin Empty directory Ask the user If ambiguous, ask. Types can stack (e.g. cloudflare-worker + node-generic). -
Generate:
.claude/settings.local.json- Read references/permission-presets.md for the preset definitions
- Combine Universal Base + type-specific preset
- Write with comment groups for organisation
// - Warn the user: "Project settings.local.json SHADOWS your global settings — it does not merge"
-
Generate:
CLAUDE.md- Read references/claude-md-templates.md for templates
- Fill in: project name (from directory name or ask), today's date, detected stack
- Pre-fill Jez's defaults (Cloudflare account ID, pnpm, EN-AU)
-
Generate:
.gitignore- Use the type-appropriate template from references/claude-md-templates.md
- Always include and
.claude/settings.local.json.dev.vars
-
Optionally (ask first):
- + first commit
git init - + push
gh repo create jezweb/[name] --private
适用场景:启动新项目,或在无的目录中工作时。
.claude/settings.local.json步骤:
-
检测项目类型:根据目录中的文件判断:
识别标识 项目类型 或wrangler.jsoncwrangler.tomlcloudflare-worker 或vercel.jsonnext.config.*vercel-app (无部署目标)package.jsonnode-generic 或pyproject.tomlsetup.pypython 或运维脚本.claude/agents/ops-admin 空目录 询问用户 若类型不明确,将询问用户。类型可叠加(例如cloudflare-worker + node-generic)。 -
生成:
.claude/settings.local.json- 读取references/permission-presets.md获取预设定义
- 合并通用基础预设与特定类型预设
- 写入时使用注释分组
// - 向用户发出警告:"项目的settings.local.json会覆盖全局设置——不会进行合并"
-
生成:
CLAUDE.md- 读取references/claude-md-templates.md获取模板
- 填充内容:项目名称(取自目录名或询问用户)、当前日期、检测到的技术栈
- 预填充Jez的默认配置(Cloudflare账户ID、pnpm、EN-AU)
-
生成:
.gitignore- 使用references/claude-md-templates.md中对应类型的模板
- 始终包含和
.claude/settings.local.json.dev.vars
-
可选操作(需先询问用户):
- + 首次提交
git init - + 推送代码
gh repo create jezweb/[name] --private
Mode 2: Tidy Existing Permissions
模式2:整理现有权限
When: User says "tidy permissions", "clean settings", or the existing has more than ~50 entries.
settings.local.jsonSteps:
-
Run the tidy script to analyse the current file:bash
python3 ${SKILL_DIR}/scripts/tidy_permissions.py .claude/settings.local.json -
Review the report. It flags:
- Leaked secrets: API keys, tokens, hex strings embedded in approval patterns
- Shell fragments: ,
Bash(do),Bash(fi),Bash(then),Bash(else)Bash(done) - Deprecated MCP refs: and similar
mcp__bitwarden__* - Duplicates: Entries covered by a broader pattern already present
- One-time entries: Entire commit messages, hardcoded paths that will never match again
- Consolidation opportunities: e.g. 5 separate ,
Bash(git add:*)could becomeBash(git commit:*)Bash(git *)
-
Present the cleaned version with a diff showing what changed.
-
Apply after user confirmation. Recommend the user rotate any leaked secrets.
适用场景:用户输入"tidy permissions"、"clean settings",或现有条目超过约50条时。
settings.local.json步骤:
-
运行整理脚本分析当前文件:bash
python3 ${SKILL_DIR}/scripts/tidy_permissions.py .claude/settings.local.json -
查看分析报告,报告将标记:
- 泄露的密钥:嵌入在审批规则中的API密钥、令牌、十六进制字符串
- Shell片段:、
Bash(do)、Bash(fi)、Bash(then)、Bash(else)Bash(done) - 已弃用的MCP引用:及类似格式
mcp__bitwarden__* - 重复条目:已被更宽泛规则覆盖的条目
- 一次性条目:完整的提交信息、硬编码的路径(后续不会再匹配)
- 可合并项:例如5个独立的、
Bash(git add:*)可合并为Bash(git commit:*)Bash(git *)
-
展示清理后的版本,并附带差异对比说明变更内容。
-
获得用户确认后应用变更。建议用户轮换所有泄露的密钥。
Mode 3: Add Preset
模式3:添加预设权限
When: User says "add wrangler permissions" or "add MCP permissions" to an existing project.
Steps:
- Read the relevant preset section from references/permission-presets.md
- Read the existing
.claude/settings.local.json - Merge without duplicating — add new entries, keep existing groups
- Write the updated file
适用场景:用户要求为现有项目"add wrangler permissions"或"add MCP permissions"时。
步骤:
- 从references/permission-presets.md读取相关预设章节
- 读取现有的
.claude/settings.local.json - 合并预设且不重复——添加新条目,保留现有分组
- 写入更新后的文件
Permission Syntax Quick Reference
权限语法快速参考
| Pattern | Meaning |
|---|---|
| Current syntax — space before |
| Deprecated colon syntax (still works) |
| Domain-scoped web access |
| Blanket web search |
| Specific MCP tool |
Critical: Project shadows global settings. It does not merge. If a project has its own allow list, the global allow list is ignored entirely for that project.
settings.local.jsonShell operators (, , ) are handled safely — won't match .
&&||;Bash(git *)git add && rm -rf /| 规则格式 | 含义 |
|---|---|
| 当前语法—— |
| 已弃用的冒号语法(仍可生效) |
| 域名范围的网络访问权限 |
| 全局网络搜索权限 |
| 特定MCP工具权限 |
重要提示:项目的会覆盖全局设置,不会进行合并。若项目有自己的允许列表,全局允许列表将完全被忽略。
settings.local.jsonShell操作符(、、)会被安全处理——不会匹配。
&&||;Bash(git *)git add && rm -rf /Autonomy
自主操作规则
- Just do it: Detect project type, read existing files
- Brief confirmation: Write settings.local.json, CLAUDE.md, .gitignore (show what will be written)
- Ask first: git init, GitHub repo creation, overwriting existing files, applying tidy fixes
- 直接执行:检测项目类型、读取现有文件
- 简短确认后执行:写入settings.local.json、CLAUDE.md、.gitignore(展示将写入的内容)
- 需先询问用户:Git初始化、GitHub仓库创建、覆盖现有文件、应用整理后的配置
Reference Files
参考文件
| When | Read |
|---|---|
| Building permission presets | references/permission-presets.md |
| Generating CLAUDE.md and .gitignore | references/claude-md-templates.md |
| 场景 | 读取文件 |
|---|---|
| 构建权限预设 | references/permission-presets.md |
| 生成CLAUDE.md和.gitignore | references/claude-md-templates.md |