# The Claude Code Starter Kit for New Projects (All Config Files Included)
**作者**: darkzodchi
**日期**: 2026-05-05T09:15:17.000Z
**来源**: [https://x.com/zodchiii/status/2051591553701835137](https://x.com/zodchiii/status/2051591553701835137)
---

The average developer spends 2-3 hours configuring Claude Code per project. This kit does it in 5 minutes.
Every new project starts with no CLAUDE.md, no settings.json, no skills, no deny rules. Claude doesn't know your stack, asks permission for every command, and reads your .env without asking.
One folder with 4 config files and 9 slash commands fixes all of this. Drop it into any project and Claude Code is fully configured before your first prompt.
Here's the full kit 👇
Before we dive in, I share daily notes on AI & vibe coding in my Telegram channel: https://t.me/zodchixquant🧠

## What's inside
```
your-project/
├── CLAUDE.md → project context + rules
├── .gitignore → secrets + AI tool protection
├── .claude/
│ ├── settings.json → permissions + hooks
│ ├── settings.local.json → personal overrides (gitignored)
│ └── skills/
│ ├── review/SKILL.md → /review
│ ├── test/SKILL.md → /test
│ ├── commit/SKILL.md → /commit
│ ├── pr/SKILL.md → /pr
│ ├── debug/SKILL.md → /debug
│ ├── refactor/SKILL.md → /refactor
│ ├── docs/SKILL.md → /docs
│ ├── deploy-check/SKILL.md → /deploy-check
│ └── security/SKILL.md → /security
```
5 minutes to set up. Every session after that starts with full context, proper permissions, and 9 ready-to-use slash commands.
## File 1: CLAUDE.md
This is the first file Claude reads. Stack, commands, architecture, rules. Under 60 lines.
```
# CLAUDE.md
## Project
[One line: what this project does]
## Stack
[Framework, language, database, deployment target]
## Commands
- Dev: `pnpm dev`
- Build: `pnpm build`
- Test single: `pnpm vitest run src/lib/__tests__/[file]`
- Test all: `pnpm test`
- Lint: `pnpm lint --fix`
- Type check: `npx tsc --noEmit`
## Architecture
- src/app/ → pages and API routes
- src/components/ → stateless UI components
- src/lib/services/ → business logic and data fetching
- src/lib/hooks/ → custom React hooks
- src/lib/utils/ → shared helpers
- src/lib/types/ → TypeScript types
## Rules
- NEVER commit .env files or secrets
- All database queries through src/lib/services/, never in components
- All async calls must use try/catch
- Prefix commits: feat:, fix:, docs:, refactor:, test:, chore:
- IMPORTANT: run type check after every code change
- No console.log in production code
## Workflow
- Ask before making architectural decisions
- Make minimal changes, don't refactor unrelated code
- Run tests after every change, fix failures before moving on
- Create separate commits per logical change
- When unsure between two approaches, explain both and let me choose
## Out of scope
- migrations/ → managed by ORM CLI, don't create manually
- public/assets/ → static files, don't modify
- .github/workflows/ → CI/CD, don't touch without asking
```
Replace the brackets with your project's details. Delete sections that don't apply.
## File 2: settings.json
Permissions + hooks. Claude stops asking permission for safe commands and stays blocked from dangerous ones.
```
{
"permissions": {
"allow": [
"Read",
"Glob",
"Grep",
"LS",
"Edit",
"MultiEdit",
"Write(src/**)",
"Write(tests/**)",
"Write(docs/**)",
"Bash(npm run *)",
"Bash(pnpm *)",
"Bash(npm install *)",
"Bash(npm test *)",
"Bash(npx tsc *)",
"Bash(npx vitest *)",
"Bash(npx prettier *)",
"Bash(npx eslint *)",
"Bash(git status)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git checkout *)",
"Bash(git branch *)",
"Bash(cat *)",
"Bash(head *)",
"Bash(tail *)",
"Bash(wc *)",
"Bash(find *)",
"Bash(echo *)"
],
"deny": [
"Read(**/.env*)",
"Read(**/.dev.vars*)",
"Read(**/*.pem)",
"Read(**/*.key)",
"Read(**/secrets/**)",
"Read(**/credentials/**)",
"Read(**/.aws/**)",
"Read(**/.ssh/**)",
"Read(**/.npmrc)",
"Write(**/.env*)",
"Write(**/secrets/**)",
"Write(**/.ssh/**)",
"Write(.github/workflows/*)",
"Write(package-lock.json)",
"Bash(rm -rf *)",
"Bash(sudo *)",
"Bash(git push *)",
"Bash(git merge *)",
"Bash(git rebase *)",
"Bash(npm publish *)",
"Bash(docker *)",
"Bash(curl * | sh)",
"Bash(wget *)",
"Bash(chmod *)"
],
"defaultMode": "acceptEdits"
},
"hooks": {
"PostToolUse": [
{
"matcher": "Write(*.ts)",
"hooks": [
{
"type": "command",
"command": "npx prettier --write $file"
}
]
},
{
"matcher": "Write(*.tsx)",
"hooks": [
{
"type": "command",
"command": "npx prettier --write $file"
}
]
}
]
}
}
```
## File 3: .gitignore
Protects secrets, AI tool configs, and build artifacts from ever reaching git.
```
# Dependencies
node_modules/
.pnp.*
# Build
dist/
build/
.next/
out/
# Environment
.env
.env.*
!.env.example
# AI tools
.claude/settings.local.json
.cursor/
.aider*
.continue/
.cody/
# Secrets & credentials
*.pem
*.key
*.p12
credentials.json
service-account*.json
.npmrc
.aws/
.ssh/
.docker/config.json
# IDE
.vscode/settings.json
.idea/
# OS
.DS_Store
Thumbs.db
# Logs & coverage
*.log
coverage/
.nyc_output/
# Terraform
.terraform/
*.tfstate
*.tfstate.backup
```
Note: .claude/settings.local.json is gitignored (personal overrides), but .claude/settings.json and .claude/skills/ are committed so your team shares them.
## File 4: The 9 skills
Each skill is a SKILL.md file inside .claude/skills/[name]/.
Here are the 3 most-used ones.
The other 6 are in the full kit download at the end.
## /review
```
---
name: review
description: Review code for bugs, security issues, and style violations.
Use when reviewing PRs, checking code quality, or when user mentions
"review", "PR", "code quality".
allowed-tools: Read, Grep, Glob, Bash(git diff *)
---
Review the current diff or specified files for:
1. Bugs: logic errors, null handling, race conditions
2. Security: hardcoded secrets, SQL injection, XSS
3. Performance: N+1 queries, unnecessary re-renders
4. Style: naming, dead code, TODOs
Output as checklist grouped by severity: CRITICAL / WARNING / INFO
End with summary: "X critical, Y warnings, Z info"
```
## /commit
```
---
name: commit
description: Create structured git commits from current changes.
Use when user says "commit", "save changes", or after finishing a feature.
allowed-tools: Read, Bash(git *)
---
1. Run `git status` and `git diff` to see all changes
2. Group related changes into logical units
3. For each unit, create a commit:
type(scope): description under 50 chars
- What changed
- Why (if not obvious)
4. Stage and commit each unit separately
5. Show summary: "Created N commits: [titles]"
Types: feat, fix, refactor, docs, test, chore
```
## /deploy-check
```
---
name: deploy-check
description: Run pre-deployment checks. Use when user mentions
"deploy", "ship", "release", or "production".
allowed-tools: Read, Bash(npm *), Bash(npx tsc *), Bash(git *), Grep
---
Run in order, stop at first failure:
1. `npx tsc --noEmit` — types pass
2. `npm test` — tests pass
3. `npm run lint` — no lint errors
4. `npm run build` — build succeeds
5. grep for console.log in src/
6. Check for .env references in committed code
7. git status — no uncommitted changes
Output: ✅ or ❌ per check
Summary: "Ready to deploy" or "N issues to fix first"
```
## How to install
Option A: New project
```
mkdir my-project && cd my-project
git init
# Create CLAUDE.md (paste the template above)
# Create .claude/settings.json (paste above)
# Create .gitignore (paste above)
# Copy skills into .claude/skills/
git add -A
git commit -m "chore: add Claude Code starter kit"
```
Option B: Existing project
```
cd your-project
# Add CLAUDE.md to root (fill in your details)
# Merge settings.json into existing .claude/settings.json
# Update .gitignore with missing rules
# Copy skills folder
git add -A
git commit -m "chore: add Claude Code config files"
```
Option C: Global (every project)
```
# Copy settings.json to ~/.claude/settings.json
# Copy skills to ~/.claude/skills/
# CLAUDE.md stays per-project (different stack each time)
```
## The workflow after setup
Your first session in a new project now looks like this:
```
Before the kit:
1. Open Claude Code
2. Type your stack, commands, and rules manually
3. Click "Allow" 30 times for basic operations
4. Realize .env was read 5 minutes ago
5. Try to remember your commit format
6. Give up and type prompts from scratch
After the kit:
1. Open Claude Code
2. Claude already knows your stack, commands, and rules
3. Permission prompts: 0-3 per session
4. .env is blocked at system level
5. /commit, /review, /deploy-check ready to go
6. Start working
```
## What to customize first
Don't use these files as-is forever. They're a starting point. After your first week:
1. CLAUDE.md — add rules every time Claude makes a mistake. "Update CLAUDE.md so this doesn't happen again" is the most powerful prompt in Claude Code
2. settings.json — adjust Write scopes for your folder structure, add Bash rules for your specific tools
3. Skills — modify /review to check for patterns specific to your codebase
4. .gitignore — add entries for any new tools or credentials your project uses
The kit compounds over time. By month three, your CLAUDE.md has captured every mistake Claude has made in your project and prevents all of them automatically.
Thanks for reading!
I share daily notes on AI, finance, and vibe coding in my Telegram channel: https://t.me/zodchixquant

## 相关链接
- [darkzodchi](https://x.com/zodchiii)
- [@zodchiii](https://x.com/zodchiii)
- [85K](https://x.com/zodchiii/status/2051591553701835137/analytics)
- [https://t.me/zodchixquant](https://t.me/zodchixquant)
- [https://t.me/zodchixquant](https://t.me/zodchixquant)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [5:15 PM · May 5, 2026](https://x.com/zodchiii/status/2051591553701835137)
- [85.3K Views](https://x.com/zodchiii/status/2051591553701835137/analytics)
- [View quotes](https://x.com/zodchiii/status/2051591553701835137/quotes)
---
*导出时间: 2026/5/6 11:19:30*
---
## 中文翻译
# 新项目的 Claude Code 启动套件(包含所有配置文件)
**作者**: darkzodchi
**日期**: 2026-05-05T09:15:17.000Z
**来源**: [https://x.com/zodchiii/status/2051591553701835137](https://x.com/zodchiii/status/2051591553701835137)
---

普通开发者每个项目配置 Claude Code 平均需要 2-3 小时。这个套件只需 5 分钟。
每个新项目开始时都没有 CLAUDE.md,没有 settings.json,没有技能,没有拒绝规则。Claude 不知道你的技术栈,每个命令都要请求权限,还会在未经询问的情况下读取你的 .env 文件。
只需一个包含 4 个配置文件和 9 个斜杠命令的文件夹就能解决所有问题。将其放入任何项目,在你输入第一个提示词之前,Claude Code 就已完全配置好。
以下是完整的套件 👇
在深入之前,我在我的 Telegram 频道分享关于 AI 和氛围编程的日常笔记:https://t.me/zodchixquant🧠

## 套件内容
```
your-project/
├── CLAUDE.md → 项目上下文 + 规则
├── .gitignore → 密钥 + AI 工具保护
├── .claude/
│ ├── settings.json → 权限 + 钩子
│ ├── settings.local.json → 个人覆盖设置 (已 gitignore)
│ └── skills/
│ ├── review/SKILL.md → /review
│ ├── test/SKILL.md → /test
│ ├── commit/SKILL.md → /commit
│ ├── pr/SKILL.md → /pr
│ ├── debug/SKILL.md → /debug
│ ├── refactor/SKILL.md → /refactor
│ ├── docs/SKILL.md → /docs
│ ├── deploy-check/SKILL.md → /deploy-check
│ └── security/SKILL.md → /security
```
5 分钟设置。此后的每次会话都拥有完整的上下文、适当的权限和 9 个现成的斜杠命令。
## 文件 1: CLAUDE.md
这是 Claude 读取的第一个文件。包含技术栈、命令、架构、规则。少于 60 行。
```
# CLAUDE.md
## Project
[一行说明:这个项目是做什么的]
## Stack
[框架、语言、数据库、部署目标]
## Commands
- Dev: `pnpm dev`
- Build: `pnpm build`
- Test single: `pnpm vitest run src/lib/__tests__/[file]`
- Test all: `pnpm test`
- Lint: `pnpm lint --fix`
- Type check: `npx tsc --noEmit`
## Architecture
- src/app/ → 页面和 API 路由
- src/components/ → 无状态 UI 组件
- src/lib/services/ → 业务逻辑和数据获取
- src/lib/hooks/ → 自定义 React hooks
- src/lib/utils/ → 共享辅助函数
- src/lib/types/ → TypeScript 类型
## Rules
- 绝不提交 .env 文件或密钥
- 所有数据库查询通过 src/lib/services/,绝不在组件中直接查询
- 所有异步调用必须使用 try/catch
- 提交前缀:feat:, fix:, docs:, refactor:, test:, chore:
- 重要:每次代码更改后运行类型检查
- 生产代码中不得有 console.log
## Workflow
- 做出架构决策前先询问
- 做最小化更改,不要重构不相关的代码
- 每次更改后运行测试,修复失败后再继续
- 为每个逻辑更改创建单独的提交
- 在两种方法之间不确定时,解释两者并让我选择
## Out of scope
- migrations/ → 由 ORM CLI 管理,不要手动创建
- public/assets/ → 静态文件,不要修改
- .github/workflows/ → CI/CD,未经询问请勿触碰
```
用你项目的详细信息替换括号中的内容。删除不适用的部分。
## 文件 2: settings.json
权限 + 钩子。Claude 停止对安全命令请求权限,并保持对危险命令的阻止。
```
{
"permissions": {
"allow": [
"Read",
"Glob",
"Grep",
"LS",
"Edit",
"MultiEdit",
"Write(src/**)",
"Write(tests/**)",
"Write(docs/**)",
"Bash(npm run *)",
"Bash(pnpm *)",
"Bash(npm install *)",
"Bash(npm test *)",
"Bash(npx tsc *)",
"Bash(npx vitest *)",
"Bash(npx prettier *)",
"Bash(npx eslint *)",
"Bash(git status)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git checkout *)",
"Bash(git branch *)",
"Bash(cat *)",
"Bash(head *)",
"Bash(tail *)",
"Bash(wc *)",
"Bash(find *)",
"Bash(echo *)"
],
"deny": [
"Read(**/.env*)",
"Read(**/.dev.vars*)",
"Read(**/*.pem)",
"Read(**/*.key)",
"Read(**/secrets/**)",
"Read(**/credentials/**)",
"Read(**/.aws/**)",
"Read(**/.ssh/**)",
"Read(**/.npmrc)",
"Write(**/.env*)",
"Write(**/secrets/**)",
"Write(**/.ssh/**)",
"Write(.github/workflows/*)",
"Write(package-lock.json)",
"Bash(rm -rf *)",
"Bash(sudo *)",
"Bash(git push *)",
"Bash(git merge *)",
"Bash(git rebase *)",
"Bash(npm publish *)",
"Bash(docker *)",
"Bash(curl * | sh)",
"Bash(wget *)",
"Bash(chmod *)"
],
"defaultMode": "acceptEdits"
},
"hooks": {
"PostToolUse": [
{
"matcher": "Write(*.ts)",
"hooks": [
{
"type": "command",
"command": "npx prettier --write $file"
}
]
},
{
"matcher": "Write(*.tsx)",
"hooks": [
{
"type": "command",
"command": "npx prettier --write $file"
}
]
}
]
}
}
```
## 文件 3: .gitignore
保护密钥、AI 工具配置和构建产物,使其永远无法进入 git。
```
# Dependencies
node_modules/
.pnp.*
# Build
dist/
build/
.next/
out/
# Environment
.env
.env.*
!.env.example
# AI tools
.claude/settings.local.json
.cursor/
.aider*
.continue/
.cody/
# Secrets & credentials
*.pem
*.key
*.p12
credentials.json
service-account*.json
.npmrc
.aws/
.ssh/
.docker/config.json
# IDE
.vscode/settings.json
.idea/
# OS
.DS_Store
Thumbs.db
# Logs & coverage
*.log
coverage/
.nyc_output/
# Terraform
.terraform/
*.tfstate
*.tfstate.backup
```
注意:.claude/settings.local.json 已被 gitignore(个人覆盖设置),但 .claude/settings.json 和 .claude/skills/ 会被提交,以便你的团队共享它们。
## 文件 4: 9 个技能
每个技能都是 .claude/skills/[name]/ 内的 SKILL.md 文件。
以下是使用最频繁的 3 个。
其余 6 个在文末的完整套件下载中。
## /review
```
---
name: review
description: 审查代码中的 Bug、安全问题和风格违规。
用于审查 PR、检查代码质量,或当用户提到
"review"、"PR"、"code quality" 时。
allowed-tools: Read, Grep, Glob, Bash(git diff *)
---
审查当前 diff 或指定文件是否存在:
1. Bugs:逻辑错误、空值处理、竞态条件
2. Security:硬编码的密钥、SQL 注入、XSS
3. Performance:N+1 查询、不必要的重渲染
4. Style:命名、死代码、TODOs
输出按严重程度分组的检查清单:CRITICAL / WARNING / INFO
以总结结尾:"X critical, Y warnings, Z info"
```
## /commit
```
---
name: commit
description: 根据当前更改创建结构化的 git 提交。
当用户说 "commit"、"save changes" 或完成功能时使用。
allowed-tools: Read, Bash(git *)
---
1. 运行 `git status` 和 `git diff` 查看所有更改
2. 将相关更改归类为逻辑单元
3. 为每个单元创建一个提交:
type(scope): 50 字符以内的描述
- 更改了什么
- 为什么(如果不明显)
4. 分别暂存并提交每个单元
5. 显示总结:"Created N commits: [titles]"
Types: feat, fix, refactor, docs, test, chore
```
## /deploy-check
```
---
name: deploy-check
description: 运行部署前检查。当用户提到
"deploy"、"ship"、"release" 或 "production" 时使用。
allowed-tools: Read, Bash(npm *), Bash(npx tsc *), Bash(git *), Grep
---
按顺序运行,遇到第一个失败时停止:
1. `npx tsc --noEmit` — 类型检查通过
2. `npm test` — 测试通过
3. `npm run lint` — 无 lint 错误
4. `npm run build` — 构建成功
5. 在 src/ 中 grep 查找 console.log
6. 检查已提交代码中的 .env 引用
7. git status — 无未提交的更改
输出:每个检查 ✅ 或 ❌
总结:"Ready to deploy" 或 "N issues to fix first"
```
## 如何安装
选项 A:新项目
```
mkdir my-project && cd my-project
git init
# 创建 CLAUDE.md (粘贴上面的模板)
# 创建 .claude/settings.json (粘贴上面的)
# 创建 .gitignore (粘贴上面的)
# 将技能复制到 .claude/skills/
git add -A
git commit -m "chore: add Claude Code starter kit"
```
选项 B:现有项目
```
cd your-project
# 将 CLAUDE.md 添加到根目录 (填写你的详细信息)
# 将 settings.json 合并到现有的 .claude/settings.json
# 用缺失的规则更新 .gitignore
# 复制 skills 文件夹
git add -A
git commit -m "chore: add Claude Code config files"
```
选项 C:全局(每个项目)
```
# 将 settings.json 复制到 ~/.claude/settings.json
# 将技能复制到 ~/.claude/skills/
# CLAUDE.md 保留在每个项目中(每次技术栈不同)
```
## 设置后的工作流程
现在你在新项目的第一次会话看起来是这样的:
```
使用套件前:
1. 打开 Claude Code
2. 手动输入你的技术栈、命令和规则
3. 为基本操作点击 "Allow" 30 次
4. 意识到 5 分钟前 .env 被读取了
5. 试图回忆你的提交格式
6. 放弃并从头开始输入提示词
使用套件后:
1. 打开 Claude Code
2. Claude 已经知道你的技术栈、命令和规则
3. 权限提示:每次会话 0-3 个
4. .env 在系统级别被阻止
5. /commit、/review、/deploy-check 准备就绪
6. 开始工作
```
## 首先要定制什么
不要永远一成不变地使用这些文件。它们只是一个起点。在第一周后:
1. CLAUDE.md — 每次 Claude 犯错时添加规则。"Update CLAUDE.md so this doesn't happen again" 是 Claude Code 中最强大的提示词。
2. settings.json — 根据你的文件夹结构调整 Write 范围,为你的特定工具添加 Bash 规则
3. Skills — 修改 /review 以检查特定于你代码库的模式
4. .gitignore — 为你的项目使用的任何新工具或凭据添加条目
这个套件会随着时间推移产生复利效应。到第三个月,你的 CLAUDE.md 已经捕获了 Claude 在你项目中犯过的每一个错误,并自动防止所有这些错误。
感谢阅读!
我在我的 Telegram 频道分享关于 AI、金融和氛围编程的日常笔记:https://t.me/zodchixquant

## 相关链接
- [darkzodchi](https://x.com/zodchiii)
- [@zodchiii](https://x.com/zodchiii)
- [85K](https://x.com/zodchiii/status/2051591553701835137/analytics)
- [https://t.me/zodchixquant](https://t.me/zodchixquant)
- [https://t.me/zodchixquant](https://t.me/zodchixquant)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [5:15 PM · May 5, 2026](https://x.com/zodchiii/status/2051591553701835137)
- [85.3K Views](https://x.com/zodchiii/status/2051591553701835137/analytics)
- [View quotes](https://x.com/zodchiii/status/2051591553701835137/quotes)
---
*导出时间: 2026/5/6 11:19:30*