Claude Code Setup
简介
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 directo...
通过你的 Agent 添加
安装目录:claude-code-setup/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
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
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
- CLAUDE.md is core — Highest priority project instructions
- Modular — Separate rules/skills/context
- Clear directives — Use MUST/ALWAYS/NEVER
- Project context — 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 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:
- Before starting: Ensure `.claude/` exists
- During development: Let Claude Code reference rules in `.claude/`
- After completion: Update `.claude/` with any new standards learned
Template Files
See `index.js` for template definitions.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。