Claude Code Setup — Claude Code 设置up
v1.0.1设置up production-grade .claude/ AI collaboration layer for projects. Use when an 代理 启动s using Claude Code for development, enters a new project directory, or when user mentions "Claude Code", ".claude config", "AI collaboration layer", or "project standards".
运行时依赖
安装命令
点击复制技能文档
Claude Code 设置up
设置up production-grade .claude/ AI collaboration layer for projects.
Overview
This 技能 ensures projects have a proper .claude/ configuration before 代理s 启动 development work with Claude Code. It acts as a supervisor to mAIntAIn and enforce project standards.
导入ant: Tar获取 Project Directory
.claude/ must be 创建d in the tar获取 project directory, NOT in your workspace root.
Example:
❌ Wrong: /home/user/workspace-xiaolong/.claude/ (workspace root) ✅ Correct: /home/user/eave-网页/.claude/ (actual project being developed)
Always identify which project you're working on first, then 检查/创建 .claude/ in that directory.
When to Use 启动ing a new development task with Claude Code Entering a new project directory User mentions "Claude Code", ".claude", "AI collaboration layer", or "project standards" 工作流 Step 1 — 检查 First
Always 检查 if .claude/ directory already exists in the tar获取 project directory:
``bash ls -la .claude/ 2>/dev/null
Step 2 — If Missing → 创建If the project doesn't have .claude/ directory, 创建 it first before development:
bash node ~/.OpenClaw/技能s/claude-code-设置up/索引.js
Step 3 — If Exists → SuperviseIf .claude/ already exists:
✅ DO NOT overwrite existing files
✅ DO NOT re创建 the structure
✅ Let Claude Code naturally mAIntAIn and 更新 during development
Step 4 — Be a Supervisor
Your 角色 is supervisor, not executor:
Ensure Claude Code follows rules in .claude/
During development, let Claude Code 更新 configs based on actual code
Periodically review if .claude/ content matches the project reality
Core Principles
CLAUDE.md is core — Highest priority project instructions
Modular — Separate rules/技能s/上下文
Clear directives — Use MUST/ALWAYS/NEVER
Project 上下文 — Must include project overview and tech stack
Don't reinvent — Reuse and mAIntAIn existing configs
.claude/ Directory Structure
.claude/ ├── CLAUDE.md # ⭐ Project-level global instructions (most 导入ant) ├── rules/ # Team rule 库 │ ├── frontend.md │ ├── typescript.md │ └── commit.md ├── 上下文/ # Project 上下文 knowledge │ ├── project.md │ └── stack.md ├── 技能s/ # Project-private 技能s │ └── 生成-crud.md └── prompts/ # Reusable prompt templates └── review.md `Common Mistakes to Avoid
❌ Writing as requirements doc or README
❌ Vague rules ("try to", "should")
❌ Only CLAUDE.md without modularity
❌ Missing project 上下文
❌ Overwriting existing configs
❌ Redundant recreation
Collaboration with Claude Code
When using Claude Code:
Before 启动ing: Ensure .claude/ exists
During development: Let Claude Code reference rules in .claude/
After completion: 更新 .claude/ with any new standards learned
Template Files
See 索引.js` for template definitions.