claude-code-setup
Setup production-grade .claude/ AI collaboration layer for projects. Use when an agent starts using Claude Code for development, enters a new project directory, or when user mentions "Claude Code", ".claude config", "AI collaboration layer", or "project standards".
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install openclaw-skills-claude-code-setup
Repository
Skill path: skills/eaveluo/claude-code-setup
Setup production-grade .claude/ AI collaboration layer for projects. Use when an agent starts using Claude Code for development, enters a new project directory, or when user mentions "Claude Code", ".claude config", "AI collaboration layer", or "project standards".
Open repositoryBest for
Primary workflow: Analyze Data & AI.
Technical facets: Full Stack, Data / AI.
Target audience: everyone.
License: MIT.
Original source
Catalog source: SkillHub Club.
Repository owner: openclaw.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install claude-code-setup into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/openclaw/skills before adding claude-code-setup to shared team environments
- Use claude-code-setup for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: claude-code-setup
description: Setup production-grade .claude/ AI collaboration layer for projects. Use when an agent starts using Claude Code for development, enters a new project directory, or when user mentions "Claude Code", ".claude config", "AI collaboration layer", or "project standards".
license: MIT
metadata:
author: Eave
version: "1.0.1"
---
# Claude Code Setup
Setup production-grade \`.claude/\` AI collaboration layer for projects.
## Overview
This skill ensures projects have a proper \`.claude/\` configuration before agents start development work with Claude Code. It acts as a supervisor to maintain and enforce project standards.
## Important: Target Project Directory
**.claude/ must be created in the target project directory, NOT in your workspace root.**
Example:
- ❌ Wrong: `/home/user/workspace-xiaolong/.claude/` (workspace root)
- ✅ Correct: `/home/user/eave-web/.claude/` (actual project being developed)
Always identify which project you're working on first, then check/create `.claude/` in **that** directory.
## When to Use
- Starting a new development task with Claude Code
- Entering a new project directory
- User mentions "Claude Code", ".claude", "AI collaboration layer", or "project standards"
## Workflow
### Step 1 — Check First
Always check if \`.claude/\` directory already exists **in the target project directory**:
\`\`\`bash
ls -la .claude/ 2>/dev/null
\`\`\`
### Step 2 — If Missing → Create
If the project doesn't have \`.claude/\` directory, **create it first** before development:
\`\`\`bash
node ~/.openclaw/skills/claude-code-setup/index.js
\`\`\`
### Step 3 — If Exists → Supervise
If \`.claude/\` already exists:
- ✅ **DO NOT overwrite** existing files
- ✅ **DO NOT recreate** the structure
- ✅ Let Claude Code naturally maintain and update during development
### Step 4 — Be a Supervisor
Your role is **supervisor**, not executor:
- Ensure Claude Code follows rules in \`.claude/\`
- During development, let Claude Code update configs based on actual code
- Periodically review if \`.claude/\` content matches the project reality
## Core Principles
1. **CLAUDE.md is core** — Highest priority project instructions
2. **Modular** — Separate rules/skills/context
3. **Clear directives** — Use MUST/ALWAYS/NEVER
4. **Project context** — Must include project overview and tech stack
5. **Don't reinvent** — Reuse and maintain existing configs
## .claude/ Directory Structure
\`\`\`
.claude/
├── CLAUDE.md # ⭐ Project-level global instructions (most important)
├── rules/ # Team rule library
│ ├── frontend.md
│ ├── typescript.md
│ └── commit.md
├── context/ # Project context knowledge
│ ├── project.md
│ └── stack.md
├── skills/ # Project-private skills
│ └── generate-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 context
❌ Overwriting existing configs
❌ Redundant recreation
## Collaboration with Claude Code
When using Claude Code:
1. **Before starting**: Ensure \`.claude/\` exists
2. **During development**: Let Claude Code reference rules in \`.claude/\`
3. **After completion**: Update \`.claude/\` with any new standards learned
## Template Files
See \`index.js\` for template definitions.
---
## Skill Companion Files
> Additional files collected from the skill directory layout.
### README.md
```markdown
# claude-code-setup
为项目创建生产级 `.claude/` AI 协作层配置。
## 快速开始
```bash
# 在项目根目录运行
openclaw skill claude-code-setup
```
## 生成的目录结构
```
.claude/
├── CLAUDE.md # ⭐ 项目级全局指令(最重要)
├── rules/ # 团队规则库
│ ├── frontend.md # React/Vue 组件规范
│ ├── typescript.md # TypeScript 类型规则
│ └── commit.md # Git 提交规范
├── context/ # 项目上下文知识
│ ├── project.md # 项目概述和模块
│ └── stack.md # 技术栈详情
├── skills/ # 项目私有技能
│ └── generate-crud.md # CRUD 生成工作流
└── prompts/ # 可复用 Prompt 模板
└── review.md # 代码审查清单
```
## 核心文件说明
### CLAUDE.md
权重最高的项目指令,Claude Code 每次工作都会优先读取。
**关键内容:**
- AI 角色定义
- 技术栈声明
- 编码规则(MUST/ALWAYS/NEVER)
- 代码生成要求
### rules/
团队硬规则,AI 必须遵守的约束。
**规则示例:**
- `NEVER use any type`
- `ALWAYS include error handling`
- `MUST use functional components`
### context/
项目知识库,让 Claude 真正理解你的项目。
**包含:**
- 项目概述
- 核心模块
- 技术栈详情
### skills/
可复用的工作流模板。
**示例:**
- CRUD 生成流程
- API 设计规范
- 测试编写流程
## 最佳实践
### ✅ 必做
1. **CLAUDE.md 控总规则** - 定义 AI 行为和约束
2. **rules/ 放硬约束** - 使用 MUST/ALWAYS/NEVER
3. **context/ 放项目知识** - 让 AI 理解项目背景
4. **skills/ 放稳定工作流** - 复用最佳实践
### ❌ 避免
1. 写成需求文档或 README
2. 规则太模糊("尽量"、"建议")
3. 只有 CLAUDE.md 没有模块化
4. 缺少项目上下文
5. 写太长废话
## 自定义
编辑生成的文件以适配你的项目:
```bash
# 修改 CLAUDE.md 添加项目特定规则
vim .claude/CLAUDE.md
# 添加新的规则
vim .claude/rules/backend.md
# 添加项目特定的技能
vim .claude/skills/generate-api.md
```
## 与其他工具对比
| 目录 | 作用 |
|------|------|
| `.vscode/` | 编辑器配置 |
| `.github/` | CI/CD 和 PR 模板 |
| `.cursor/` | Cursor IDE 配置 |
| **`.claude/`** | **Claude Code AI 行为中枢** |
## 许可证
MIT
```
### _meta.json
```json
{
"owner": "eaveluo",
"slug": "claude-code-setup",
"displayName": "Claude Code Setup",
"latest": {
"version": "1.0.1",
"publishedAt": 1772309296257,
"commit": "https://github.com/openclaw/skills/commit/145dc9b5f82d20c65faf741940dee289acd2f6e9"
},
"history": []
}
```