project-kickoff

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Project 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:
settings.local.json
,
CLAUDE.md
,
.gitignore
(and optionally git init + GitHub repo).
快速启动新项目或整理现有项目,让Claude Code从一开始就拥有正确的权限、文档和Git配置。
问题:每个新项目都会逐步积累数十项权限审批,导致配置文件臃肿,还可能包含泄露的密钥、Shell片段和已弃用的MCP引用。本工具可提前生成高质量的项目脚手架。
输出
settings.local.json
CLAUDE.md
.gitignore
(可选Git初始化及GitHub仓库创建)。

Operating Modes

运行模式

Mode 1: New Project Setup

模式1:新项目设置

When: Starting a new project, or working in a directory without
.claude/settings.local.json
.
Steps:
  1. Detect project type from files present in the directory:
    IndicatorType
    wrangler.jsonc
    or
    wrangler.toml
    cloudflare-worker
    vercel.json
    or
    next.config.*
    vercel-app
    package.json
    (no deploy target)
    node-generic
    pyproject.toml
    or
    setup.py
    python
    .claude/agents/
    or operational scripts
    ops-admin
    Empty directoryAsk the user
    If ambiguous, ask. Types can stack (e.g. cloudflare-worker + node-generic).
  2. 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"
  3. 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)
  4. Generate
    .gitignore
    :
    • Use the type-appropriate template from references/claude-md-templates.md
    • Always include
      .claude/settings.local.json
      and
      .dev.vars
  5. Optionally (ask first):
    • git init
      + first commit
    • gh repo create jezweb/[name] --private
      + push
适用场景:启动新项目,或在无
.claude/settings.local.json
的目录中工作时。
步骤
  1. 检测项目类型:根据目录中的文件判断:
    识别标识项目类型
    wrangler.jsonc
    wrangler.toml
    cloudflare-worker
    vercel.json
    next.config.*
    vercel-app
    package.json
    (无部署目标)
    node-generic
    pyproject.toml
    setup.py
    python
    .claude/agents/
    或运维脚本
    ops-admin
    空目录询问用户
    若类型不明确,将询问用户。类型可叠加(例如cloudflare-worker + node-generic)。
  2. 生成
    .claude/settings.local.json
    • 读取references/permission-presets.md获取预设定义
    • 合并通用基础预设与特定类型预设
    • 写入时使用
      //
      注释分组
    • 向用户发出警告:"项目的settings.local.json会覆盖全局设置——不会进行合并"
  3. 生成
    CLAUDE.md
    • 读取references/claude-md-templates.md获取模板
    • 填充内容:项目名称(取自目录名或询问用户)、当前日期、检测到的技术栈
    • 预填充Jez的默认配置(Cloudflare账户ID、pnpm、EN-AU)
  4. 生成
    .gitignore
    • 使用references/claude-md-templates.md中对应类型的模板
    • 始终包含
      .claude/settings.local.json
      .dev.vars
  5. 可选操作(需先询问用户):
    • git init
      + 首次提交
    • gh repo create jezweb/[name] --private
      + 推送代码

Mode 2: Tidy Existing Permissions

模式2:整理现有权限

When: User says "tidy permissions", "clean settings", or the existing
settings.local.json
has more than ~50 entries.
Steps:
  1. Run the tidy script to analyse the current file:
    bash
    python3 ${SKILL_DIR}/scripts/tidy_permissions.py .claude/settings.local.json
  2. 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:
      mcp__bitwarden__*
      and similar
    • 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:*)
      ,
      Bash(git commit:*)
      could become
      Bash(git *)
  3. Present the cleaned version with a diff showing what changed.
  4. Apply after user confirmation. Recommend the user rotate any leaked secrets.
适用场景:用户输入"tidy permissions"、"clean settings",或现有
settings.local.json
条目超过约50条时。
步骤
  1. 运行整理脚本分析当前文件:
    bash
    python3 ${SKILL_DIR}/scripts/tidy_permissions.py .claude/settings.local.json
  2. 查看分析报告,报告将标记:
    • 泄露的密钥:嵌入在审批规则中的API密钥、令牌、十六进制字符串
    • Shell片段
      Bash(do)
      Bash(fi)
      Bash(then)
      Bash(else)
      Bash(done)
    • 已弃用的MCP引用
      mcp__bitwarden__*
      及类似格式
    • 重复条目:已被更宽泛规则覆盖的条目
    • 一次性条目:完整的提交信息、硬编码的路径(后续不会再匹配)
    • 可合并项:例如5个独立的
      Bash(git add:*)
      Bash(git commit:*)
      可合并为
      Bash(git *)
  3. 展示清理后的版本,并附带差异对比说明变更内容。
  4. 获得用户确认后应用变更。建议用户轮换所有泄露的密钥。

Mode 3: Add Preset

模式3:添加预设权限

When: User says "add wrangler permissions" or "add MCP permissions" to an existing project.
Steps:
  1. Read the relevant preset section from references/permission-presets.md
  2. Read the existing
    .claude/settings.local.json
  3. Merge without duplicating — add new entries, keep existing groups
  4. Write the updated file
适用场景:用户要求为现有项目"add wrangler permissions"或"add MCP permissions"时。
步骤
  1. references/permission-presets.md读取相关预设章节
  2. 读取现有的
    .claude/settings.local.json
  3. 合并预设且不重复——添加新条目,保留现有分组
  4. 写入更新后的文件

Permission Syntax Quick Reference

权限语法快速参考

PatternMeaning
Bash(git *)
Current syntax — space before
*
= word boundary
Bash(git:*)
Deprecated colon syntax (still works)
WebFetch(domain:x.com)
Domain-scoped web access
WebSearch
Blanket web search
mcp__server__tool
Specific MCP tool
Critical: Project
settings.local.json
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.
Shell operators (
&&
,
||
,
;
) are handled safely —
Bash(git *)
won't match
git add && rm -rf /
.
规则格式含义
Bash(git *)
当前语法——
*
前的空格表示单词边界
Bash(git:*)
已弃用的冒号语法(仍可生效)
WebFetch(domain:x.com)
域名范围的网络访问权限
WebSearch
全局网络搜索权限
mcp__server__tool
特定MCP工具权限
重要提示:项目的
settings.local.json
覆盖全局设置,不会进行合并。若项目有自己的允许列表,全局允许列表将完全被忽略。
Shell操作符(
&&
||
;
)会被安全处理——
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

参考文件

WhenRead
Building permission presetsreferences/permission-presets.md
Generating CLAUDE.md and .gitignorereferences/claude-md-templates.md
场景读取文件
构建权限预设references/permission-presets.md
生成CLAUDE.md和.gitignorereferences/claude-md-templates.md