claude-md-enhancer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCLAUDE.md File Enhancer
CLAUDE.md 文件增强工具
This skill provides comprehensive CLAUDE.md file generation and enhancement for Claude Code projects. It analyzes existing files, validates against best practices, and generates customized guidelines tailored to your project type, tech stack, and team size.
本Skill为Claude Code项目提供全面的CLAUDE.md文件生成与优化服务。它会分析现有文件,对照最佳实践进行验证,并根据你的项目类型、技术栈和团队规模生成定制化指南。
Capabilities
核心功能
- 🆕 Interactive Initialization: Intelligent workflow that explores your repository, detects project type and tech stack, asks for confirmation, then creates customized CLAUDE.md files
- ✨ 100% Native Format Compliance: All generated files follow official Claude Code format with project structure diagrams, setup instructions, architecture sections, and file structure explanations (matching slash command)
/update-claude-md - Analyze Existing Files: Scan and evaluate current CLAUDE.md files for structure, completeness, and quality
- Validate Best Practices: Check against Anthropic guidelines (file length, required sections, formatting standards)
- Generate New Files: Create complete CLAUDE.md files from scratch for new projects
- Enhance Existing Files: Add missing sections, improve structure, and update to latest best practices
- Modular Architecture: Support context-specific CLAUDE.md files in subdirectories (backend/, frontend/, docs/)
- Tech Stack Customization: Tailor guidelines to specific technologies (TypeScript, Python, Go, React, Vue, etc.)
- Team Size Adaptation: Adjust complexity based on team size (solo, small <10, large 10+)
- Template Selection: Choose appropriate template based on project complexity and development phase
- 🆕 交互式初始化:智能工作流会遍历你的代码仓库,检测项目类型与技术栈,征得确认后创建定制化的CLAUDE.md文件
- ✨ 100% 原生格式合规:所有生成的文件均遵循官方Claude Code格式,包含项目结构示意图、设置说明、架构章节和文件结构解释(与斜杠命令格式匹配)
/update-claude-md - 分析现有文件:扫描并评估当前CLAUDE.md文件的结构、完整性与质量
- 验证最佳实践:对照Anthropic的规范检查(文件长度、必填章节、格式标准)
- 生成新文件:为新项目从零创建完整的CLAUDE.md文件
- 优化现有文件:补充缺失章节、改进结构并更新至最新最佳实践
- 模块化架构支持:支持在子目录(backend/、frontend/、docs/)中创建上下文专属的CLAUDE.md文件
- 技术栈定制:针对特定技术(TypeScript、Python、Go、React、Vue等)调整指南内容
- 团队规模适配:根据团队规模(独立开发者、小型团队<10人、大型团队10+人)调整内容复杂度
- 模板选择:根据项目复杂度与开发阶段选择合适的模板
Input Requirements
输入要求
For Analysis and Enhancement
分析与优化场景
Provide existing CLAUDE.md file content or file path:
json
{
"mode": "enhance",
"file_path": "CLAUDE.md",
"content": "[existing CLAUDE.md content]",
"project_context": {
"type": "web_app",
"tech_stack": ["typescript", "react", "node", "postgresql"],
"team_size": "small",
"phase": "mvp"
}
}提供现有CLAUDE.md文件内容或文件路径:
json
{
"mode": "enhance",
"file_path": "CLAUDE.md",
"content": "[existing CLAUDE.md content]",
"project_context": {
"type": "web_app",
"tech_stack": ["typescript", "react", "node", "postgresql"],
"team_size": "small",
"phase": "mvp"
}
}For New File Generation
新文件生成场景
Provide project context:
json
{
"mode": "create",
"project_context": {
"type": "api",
"tech_stack": ["python", "fastapi", "postgresql", "docker"],
"team_size": "medium",
"phase": "production",
"workflows": ["tdd", "cicd", "documentation_first"]
},
"modular": true,
"subdirectories": ["backend", "database", "docs"]
}提供项目上下文信息:
json
{
"mode": "create",
"project_context": {
"type": "api",
"tech_stack": ["python", "fastapi", "postgresql", "docker"],
"team_size": "medium",
"phase": "production",
"workflows": ["tdd", "cicd", "documentation_first"]
},
"modular": true,
"subdirectories": ["backend", "database", "docs"]
}Context Parameters
上下文参数说明
- type: Project type (,
web_app,api,fullstack,cli,library,mobile)desktop - tech_stack: Array of technologies (e.g., )
["typescript", "react", "node"] - team_size: ,
solo(<10),small(10-50),medium(50+)large - phase: Development phase (,
prototype,mvp,production)enterprise - workflows: Key workflows (,
tdd,cicd,documentation_first, etc.)agile
- type:项目类型(,
web_app,api,fullstack,cli,library,mobile)desktop - tech_stack:技术栈数组(示例:)
["typescript", "react", "node"] - team_size:团队规模(,
solo(<10人),small(10-50人),medium(50+人))large - phase:开发阶段(,
prototype,mvp,production)enterprise - workflows:核心工作流(,
tdd,cicd,documentation_first等)agile
Output Formats
输出格式
Analysis Report
分析报告
json
{
"analysis": {
"file_size": 450,
"line_count": 320,
"sections_found": [
"Quick Navigation",
"Core Principles",
"Tech Stack",
"Workflow Instructions"
],
"missing_sections": [
"Testing Requirements",
"Error Handling Patterns"
],
"issues": [
{
"type": "length_warning",
"severity": "medium",
"message": "File exceeds recommended 300 lines (320 lines)"
},
{
"type": "missing_section",
"severity": "low",
"message": "Consider adding 'Testing Requirements' section"
}
],
"quality_score": 75,
"recommendations": [
"Split into modular files (backend/CLAUDE.md, frontend/CLAUDE.md)",
"Add testing requirements section",
"Reduce root file to <150 lines"
]
}
}json
{
"analysis": {
"file_size": 450,
"line_count": 320,
"sections_found": [
"Quick Navigation",
"Core Principles",
"Tech Stack",
"Workflow Instructions"
],
"missing_sections": [
"Testing Requirements",
"Error Handling Patterns"
],
"issues": [
{
"type": "length_warning",
"severity": "medium",
"message": "File exceeds recommended 300 lines (320 lines)"
},
{
"type": "missing_section",
"severity": "low",
"message": "Consider adding 'Testing Requirements' section"
}
],
"quality_score": 75,
"recommendations": [
"Split into modular files (backend/CLAUDE.md, frontend/CLAUDE.md)",
"Add testing requirements section",
"Reduce root file to <150 lines"
]
}
}Generated Content
生成的内容
Complete CLAUDE.md file content or specific sections to add:
markdown
undefined完整的CLAUDE.md文件内容或需补充的特定章节:
markdown
undefinedCLAUDE.md
CLAUDE.md
This file provides guidance for Claude Code when working with this project.
This file provides guidance for Claude Code when working with this project.
Quick Navigation
Quick Navigation
- Backend Guidelines
- Frontend Guidelines
- Database Operations
- CI/CD Workflows
- Backend Guidelines
- Frontend Guidelines
- Database Operations
- CI/CD Workflows
Core Principles
Core Principles
- Test-Driven Development: Write tests before implementation
- Type Safety First: Use TypeScript strict mode throughout
- Component Composition: Favor small, reusable components
- Error Handling: Always handle errors with proper logging
- Documentation Updates: Keep docs in sync with code changes
[... additional sections based on template ...]
undefined- Test-Driven Development: Write tests before implementation
- Type Safety First: Use TypeScript strict mode throughout
- Component Composition: Favor small, reusable components
- Error Handling: Always handle errors with proper logging
- Documentation Updates: Keep docs in sync with code changes
[... additional sections based on template ...]
undefinedHow to Use
使用方法
Example 1: Initialize CLAUDE.md for New Project (Interactive)
示例1:为新项目初始化CLAUDE.md(交互式)
Hey Claude—I just added the "claude-md-enhancer" skill. I don't have a CLAUDE.md file yet. Can you help me create one for this project?What Happens:
- Claude checks if CLAUDE.md exists (it doesn't)
- Claude explores your repository using built-in commands
- Claude analyzes: project type, tech stack, team size, workflows
- Claude shows discoveries and asks for confirmation
- You confirm the settings
- Claude creates customized CLAUDE.md file(s)
- Claude enhances with best practices
Interactive Flow:
- ✋ User must confirm before creation
- 🔍 Full visibility into what was discovered
- ⚙️ Option to adjust settings before proceeding
Hey Claude—I just added the "claude-md-enhancer" skill. I don't have a CLAUDE.md file yet. Can you help me create one for this project?执行流程:
- Claude检查CLAUDE.md是否存在(此处不存在)
- Claude使用内置命令遍历你的代码仓库
- Claude分析:项目类型、技术栈、团队规模、工作流
- Claude展示分析结果并请求确认
- 你确认设置
- Claude创建定制化的CLAUDE.md文件
- Claude使用最佳实践优化文件
交互式流程特点:
- ✋ 用户必须确认后才会创建文件
- 🔍 完全透明展示分析发现
- ⚙️ 可在创建前调整设置
Example 2: Analyze Existing CLAUDE.md
示例2:分析现有CLAUDE.md文件
Hey Claude—I just added the "claude-md-enhancer" skill. Can you analyze my current CLAUDE.md file and tell me what's missing or could be improved?Hey Claude—I just added the "claude-md-enhancer" skill. Can you analyze my current CLAUDE.md file and tell me what's missing or could be improved?Example 2: Generate New CLAUDE.md for TypeScript Project
示例3:为TypeScript项目生成新的CLAUDE.md
Hey Claude—I just added the "claude-md-enhancer" skill. Can you create a CLAUDE.md file for my TypeScript React project with a team of 5 developers? We use PostgreSQL, Docker, and follow TDD practices.Hey Claude—I just added the "claude-md-enhancer" skill. Can you create a CLAUDE.md file for my TypeScript React project with a team of 5 developers? We use PostgreSQL, Docker, and follow TDD practices.Example 3: Enhance Existing File
示例4:优化现有文件
Hey Claude—I just added the "claude-md-enhancer" skill. Can you enhance my existing CLAUDE.md by adding missing sections and improving the structure? Here's my current file: [paste content]Hey Claude—I just added the "claude-md-enhancer" skill. Can you enhance my existing CLAUDE.md by adding missing sections and improving the structure? Here's my current file: [paste content]Example 4: Generate Modular Architecture
示例5:生成模块化架构文件
Hey Claude—I just added the "claude-md-enhancer" skill. Can you create a modular CLAUDE.md setup for my full-stack project? I need separate files for backend (Python/FastAPI), frontend (React), and database (PostgreSQL).Hey Claude—I just added the "claude-md-enhancer" skill. Can you create a modular CLAUDE.md setup for my full-stack project? I need separate files for backend (Python/FastAPI), frontend (React), and database (PostgreSQL).Initialization Workflow (New Projects)
新项目初始化工作流
When CLAUDE.md doesn't exist in your project, this skill provides an intelligent initialization workflow:
当项目中不存在CLAUDE.md文件时,本Skill会提供智能初始化工作流:
Workflow Steps
工作流步骤
Step 1: Detection
- Skill checks if CLAUDE.md exists in project root
- If not found, initialization workflow begins
Step 2: Repository Exploration
- Uses Claude Code's built-in command
explore - Analyzes project structure, files, and directories
- Examines configuration files (package.json, requirements.txt, go.mod, etc.)
- Reviews existing documentation
Step 3: Intelligent Analysis
- Project Type Detection: web_app, api, fullstack, cli, library, mobile, desktop
- Tech Stack Detection: TypeScript, Python, React, FastAPI, PostgreSQL, Docker, etc.
- Team Size Estimation: Based on project complexity (solo, small, medium, large)
- Development Phase: prototype, mvp, production, enterprise
- Workflow Detection: TDD, CI/CD, documentation-first, agile
- Structure Recommendation: Single file vs. modular architecture
Step 4: User Confirmation ✋
- Displays all discoveries in clear format
- Shows recommended CLAUDE.md structure
- Asks user to confirm or adjust settings
- User must explicitly approve before proceeding
Step 5: File Creation
- Generates customized CLAUDE.md based on confirmed settings
- Creates modular files if recommended (backend/, frontend/, etc.)
- Applies tech-specific best practices
Step 6: Enhancement
- Validates generated content
- Adds quality improvements
- Ensures completeness
Step 7: Summary
- Shows what files were created
- Provides next steps
- Ready for immediate use
步骤1:检测
- Skill检查项目根目录是否存在CLAUDE.md
- 若未找到,启动初始化工作流
步骤2:仓库遍历
- 使用Claude Code的内置命令
explore - 分析项目结构、文件与目录
- 检查配置文件(package.json、requirements.txt、go.mod等)
- 查看现有文档
步骤3:智能分析
- 项目类型检测:web_app、api、fullstack、cli、library、mobile、desktop
- 技术栈检测:TypeScript、Python、React、FastAPI、PostgreSQL、Docker等
- 团队规模估算:基于项目复杂度(独立开发者、小型、中型、大型团队)
- 开发阶段判断:prototype、mvp、production、enterprise
- 工作流检测:TDD、CI/CD、文档优先、敏捷开发
- 结构建议:单文件 vs 模块化架构
步骤4:用户确认 ✋
- 以清晰格式展示所有分析结果
- 展示推荐的CLAUDE.md结构
- 请求用户确认或调整设置
- 必须获得用户明确批准才会继续
步骤5:文件创建
- 根据确认的设置生成定制化CLAUDE.md文件
- 若推荐模块化架构,则创建对应子目录文件(backend/、frontend/等)
- 应用技术专属的最佳实践
步骤6:优化
- 验证生成的内容
- 进行质量改进
- 确保内容完整
步骤7:总结
- 展示已创建的文件
- 提供后续步骤建议
- 可立即投入使用
Interactive Example
交互式示例
User: "I need a CLAUDE.md for this project"
Claude: "I'll explore your repository first to understand the project.
[Explores using built-in commands]
Based on my exploration, here's what I discovered:
Project Type: Full-Stack Application
Tech Stack: TypeScript, React, Node.js, PostgreSQL, Docker
Team Size: Small (2-9 developers)
Development Phase: MVP
Workflows: TDD, CI/CD
Recommended Structure: Modular architecture
- Root CLAUDE.md (navigation hub)
- backend/CLAUDE.md (API guidelines)
- frontend/CLAUDE.md (React guidelines)
Would you like me to create these files?"
User: "Yes, please proceed"
Claude: "Creating customized CLAUDE.md files...
✅ Created CLAUDE.md (100 lines)
✅ Created backend/CLAUDE.md (150 lines)
✅ Created frontend/CLAUDE.md (175 lines)
Your project is ready for AI-assisted development!"User: "I need a CLAUDE.md for this project"
Claude: "I'll explore your repository first to understand the project.
[Explores using built-in commands]
Based on my exploration, here's what I discovered:
Project Type: Full-Stack Application
Tech Stack: TypeScript, React, Node.js, PostgreSQL, Docker
Team Size: Small (2-9 developers)
Development Phase: MVP
Workflows: TDD, CI/CD
Recommended Structure: Modular architecture
- Root CLAUDE.md (navigation hub)
- backend/CLAUDE.md (API guidelines)
- frontend/CLAUDE.md (React guidelines)
Would you like me to create these files?"
User: "Yes, please proceed"
Claude: "Creating customized CLAUDE.md files...
✅ Created CLAUDE.md (100 lines)
✅ Created backend/CLAUDE.md (150 lines)
✅ Created frontend/CLAUDE.md (175 lines)
Your project is ready for AI-assisted development!"Scripts
脚本说明
workflow.py
workflow.py
Manages the interactive initialization workflow for new projects.
Key Functions:
- - Detect if CLAUDE.md exists
check_claude_md_exists() - - Guide Claude to explore repository
generate_exploration_prompt() - - Analyze exploration results
analyze_discoveries() - - Create user confirmation prompt
generate_confirmation_prompt() - - Get complete workflow steps
get_workflow_steps()
管理新项目的交互式初始化工作流。
核心函数:
- - 检测CLAUDE.md是否存在
check_claude_md_exists() - - 生成引导Claude遍历仓库的提示词
generate_exploration_prompt() - - 分析遍历结果
analyze_discoveries() - - 生成用户确认提示词
generate_confirmation_prompt() - - 获取完整的工作流步骤
get_workflow_steps()
analyzer.py
analyzer.py
Analyzes existing CLAUDE.md files to identify structure, sections, and quality issues.
Key Functions:
- - Parse and analyze CLAUDE.md structure
analyze_file() - - Identify present and missing sections
detect_sections() - - Score file quality (0-100)
calculate_quality_score() - - Provide actionable improvement suggestions
generate_recommendations()
分析现有CLAUDE.md文件,识别其结构、章节与质量问题。
核心函数:
- - 解析并分析CLAUDE.md结构
analyze_file() - - 识别已存在和缺失的章节
detect_sections() - - 为文件质量打分(0-100)
calculate_quality_score() - - 提供可执行的改进建议
generate_recommendations()
validator.py
validator.py
Validates CLAUDE.md files against best practices and Anthropic guidelines.
Key Functions:
- - Check file length (warn if >300 lines)
validate_length() - - Verify required sections present
validate_structure() - - Check markdown formatting quality
validate_formatting() - - Ensure critical information included
validate_completeness()
对照最佳实践与Anthropic规范验证CLAUDE.md文件。
核心函数:
- - 检查文件长度(若超过300行则发出警告)
validate_length() - - 验证必填章节是否存在
validate_structure() - - 检查Markdown格式质量
validate_formatting() - - 确保关键信息已包含
validate_completeness()
generator.py
generator.py
Generates new CLAUDE.md content or missing sections based on templates.
Key Functions:
- - Create main CLAUDE.md orchestrator
generate_root_file() - - Create context-specific files (backend, frontend, etc.)
generate_context_file() - - Generate individual sections (tech stack, workflows, etc.)
generate_section() - - Add new sections to existing files
merge_with_existing()
基于模板生成新的CLAUDE.md内容或缺失章节。
核心函数:
- - 创建主CLAUDE.md导航文件
generate_root_file() - - 创建上下文专属文件(backend、frontend等)
generate_context_file() - - 生成单个章节(技术栈、工作流等)
generate_section() - - 向现有文件添加新章节
merge_with_existing()
template_selector.py
template_selector.py
Selects appropriate template based on project context.
Key Functions:
- - Choose template based on project type and team size
select_template() - - Adapt template to tech stack
customize_template() - - Calculate appropriate detail level
determine_complexity() - - Suggest subdirectory organization
recommend_modular_structure()
根据项目上下文选择合适的模板。
核心函数:
- - 根据项目类型与团队规模选择模板
select_template() - - 根据技术栈调整模板
customize_template() - - 计算合适的内容详细程度
determine_complexity() - - 建议子目录组织方式
recommend_modular_structure()
Best Practices
最佳实践
Critical Validation Rule ⚠️
关键验证规则 ⚠️
"Always validate your output against official native examples before declaring complete."
Before finalizing any CLAUDE.md generation:
- Compare output against slash command format
/update-claude-md - Check official Claude Code documentation for required sections
- Verify all native format sections are present (Overview, Project Structure, File Structure, Setup & Installation, Architecture, etc.)
- Cross-check against reference examples in folder
examples/
"在完成前,务必对照官方原生示例验证输出内容。"
在最终确定任何CLAUDE.md生成结果前:
- 对照斜杠命令的格式检查输出
/update-claude-md - 查阅官方Claude Code文档确认必填章节
- 验证所有原生格式章节是否存在(概述、项目结构、文件结构、设置与安装、架构等)
- 与文件夹中的参考示例进行交叉核对
examples/
For New Projects
新项目建议
- Start with minimal template (50-100 lines) and grow as needed
- Use modular architecture for projects with >3 major components
- Include tech stack reference immediately
- Add workflow instructions before team grows beyond 5 people
- 从最小模板(50-100行)开始,按需扩展
- 对于包含3个以上主要组件的项目,使用模块化架构
- 立即添加技术栈参考内容
- 在团队规模超过5人前添加工作流说明
For Enhancement
文件优化建议
- Analyze before modifying - understand current structure first
- Preserve custom content - only enhance, don't replace
- Validate after changes - ensure improvements don't break existing patterns
- Test with Claude Code - verify guidelines work as intended
- 先分析再修改 - 先理解当前结构
- 保留自定义内容 - 仅优化,不替换
- 修改后验证 - 确保改进不会破坏现有模式
- 与Claude Code测试 - 验证指南是否按预期工作
General Guidelines
通用指南
- Keep root file concise - Max 150 lines, use as navigation hub
- Use context-specific files - backend/CLAUDE.md, frontend/CLAUDE.md, etc.
- Avoid duplication - Each guideline should appear once
- Link to external docs - Don't copy official documentation
- Update regularly - Review guidelines quarterly or when stack changes
- 保持根文件简洁 - 最多150行,用作导航枢纽
- 使用上下文专属文件 - backend/CLAUDE.md、frontend/CLAUDE.md等
- 避免重复 - 每个指南仅出现一次
- 链接至外部文档 - 不要复制官方文档内容
- 定期更新 - 每季度或技术栈变更时回顾指南
Limitations
限制说明
Technical Constraints
技术约束
- Requires valid project context for accurate template selection
- Tech stack detection is based on keywords, may need manual refinement
- Modular file generation assumes standard directory structure
- 需要有效的项目上下文才能准确选择模板
- 技术栈检测基于关键字,可能需要手动调整
- 模块化文件生成假设项目使用标准目录结构
Scope Boundaries
范围边界
- Focuses on CLAUDE.md structure, not project-specific business logic
- Best practice recommendations are general, may need industry-specific customization
- Validation is guideline-based, not enforcement (no automated fixes without approval)
- 专注于CLAUDE.md的结构,不涉及项目特定的业务逻辑
- 最佳实践建议为通用内容,可能需要针对行业进行定制
- 验证基于规范,无强制执行机制(未经批准不会自动修复)
When NOT to Use
不适用场景
- For non-Claude AI tools (this is Claude Code specific)
- For projects that don't use Claude Code or similar AI assistants
- When you need highly specialized domain guidelines (legal, medical compliance)
- 非Claude类AI工具(本工具专为Claude Code设计)
- 不使用Claude Code或类似AI助手的项目
- 需要高度专业化领域指南的场景(如法律、医疗合规)
Template Categories
模板分类
By Size
按规模分类
- Minimal (50 lines) - Solo developers, prototypes, hackathons
- Core (100-150 lines) - Small teams, MVPs, standard projects
- Detailed (200-300 lines) - Large teams, production systems, enterprise
- 极简版(50行)- 独立开发者、原型项目、黑客松
- 核心版(100-150行)- 小型团队、MVP、标准项目
- 详细版(200-300行)- 大型团队、生产系统、企业级项目
By Project Type
按项目类型分类
- Web App - Frontend-focused (React, Vue, Angular)
- API - Backend services (REST, GraphQL, microservices)
- Full-Stack - Integrated frontend + backend
- CLI - Command-line tools and utilities
- Library - Reusable packages and frameworks
- Mobile - React Native, Flutter, native iOS/Android
- Web应用 - 前端为主(React、Vue、Angular)
- API服务 - 后端服务(REST、GraphQL、微服务)
- 全栈项目 - 前端+后端集成
- CLI工具 - 命令行工具与实用程序
- 类库 - 可复用包与框架
- 移动应用 - React Native、Flutter、原生iOS/Android
By Tech Stack
按技术栈分类
- TypeScript/Node - Modern JavaScript ecosystem
- Python - Django, FastAPI, Flask
- Go - Gin, Echo, native services
- Java/Kotlin - Spring Boot, enterprise Java
- Ruby - Rails, Sinatra
- TypeScript/Node - 现代JavaScript生态
- Python - Django、FastAPI、Flask
- Go - Gin、Echo、原生服务
- Java/Kotlin - Spring Boot、企业级Java
- Ruby - Rails、Sinatra
Quality Metrics
质量指标
File Quality Score (0-100)
文件质量得分(0-100)
Calculated based on:
- Length appropriateness (25 points) - Not too short or long
- Section completeness (25 points) - Required sections present
- Formatting quality (20 points) - Proper markdown structure
- Content specificity (15 points) - Tailored to project, not generic
- Modular organization (15 points) - Uses subdirectory files when appropriate
基于以下维度计算:
- 长度合理性(25分)- 不过短或过长
- 章节完整性(25分)- 包含必填章节
- 格式质量(20分)- 正确的Markdown结构
- 内容针对性(15分)- 针对项目定制,非通用内容
- 模块化组织(15分)- 按需使用子目录文件
Recommendations Priority
建议优先级
- Critical - Missing required sections, file too long (>400 lines)
- High - Missing important sections, formatting issues
- Medium - Could add optional sections, minor improvements
- Low - Nice-to-have enhancements, stylistic suggestions
- Critical(关键) - 缺失必填章节、文件过长(>400行)
- High(高) - 缺失重要章节、格式问题
- Medium(中) - 可添加可选章节、小幅改进
- Low(低) - 锦上添花的优化、风格建议
Advanced Features
高级功能
Modular Architecture Support
模块化架构支持
Automatically generates context-specific files:
project-root/
├── CLAUDE.md # Root orchestrator (100-150 lines)
├── backend/
│ └── CLAUDE.md # Backend-specific (150-200 lines)
├── frontend/
│ └── CLAUDE.md # Frontend-specific (150-200 lines)
├── database/
│ └── CLAUDE.md # Database operations (100-150 lines)
└── .github/
└── CLAUDE.md # CI/CD workflows (100-150 lines)自动生成上下文专属文件:
project-root/
├── CLAUDE.md # Root orchestrator (100-150 lines)
├── backend/
│ └── CLAUDE.md # Backend-specific (150-200 lines)
├── frontend/
│ └── CLAUDE.md # Frontend-specific (150-200 lines)
├── database/
│ └── CLAUDE.md # Database operations (100-150 lines)
└── .github/
└── CLAUDE.md # CI/CD workflows (100-150 lines)Tech Stack Detection
技术栈检测
Automatically detects technologies from:
- (Node.js/TypeScript)
package.json - or
requirements.txt(Python)pyproject.toml - (Go)
go.mod - (Rust)
Cargo.toml - or
pom.xml(Java)build.gradle
自动从以下文件检测技术:
- (Node.js/TypeScript)
package.json - 或
requirements.txt(Python)pyproject.toml - (Go)
go.mod - (Rust)
Cargo.toml - 或
pom.xml(Java)build.gradle
Team Size Adaptation
团队规模适配
Adjusts detail level:
- Solo: Minimal guidelines, focus on efficiency
- Small (<10): Core guidelines, workflow basics
- Medium (10-50): Detailed guidelines, team coordination
- Large (50+): Comprehensive guidelines, process enforcement
调整内容详细程度:
- 独立开发者:极简指南,聚焦效率
- 小型团队(<10人):核心指南,基础工作流
- 中型团队(10-50人):详细指南,团队协作内容
- 大型团队(50+人):全面指南,流程强制执行
References
参考资料
- Anthropic Claude Code Docs: https://docs.claude.com/en/docs/claude-code
- CLAUDE.md Best Practices: Based on community patterns and Anthropic guidance
- Example CLAUDE.md Files: See folder for 6 reference implementations covering different project types and team sizes
examples/
- Anthropic Claude Code文档:https://docs.claude.com/en/docs/claude-code
- CLAUDE.md最佳实践:基于社区模式与Anthropic指导
- 示例CLAUDE.md文件:查看文件夹,包含6个覆盖不同项目类型与团队规模的参考实现
examples/
Version
版本信息
Version: 1.0.0
Last Updated: November 2025
Compatible: Claude Code 2.0+, Claude Apps, Claude API
Remember: The goal is to make Claude more efficient and context-aware, not to create bureaucracy. Start simple, iterate based on real usage, and automate quality checks where possible.
版本:1.0.0
最后更新:2025年11月
兼容版本:Claude Code 2.0+、Claude Apps、Claude API
请记住:目标是让Claude更高效、更具上下文感知能力,而非制造官僚流程。从简单开始,根据实际使用迭代,并尽可能自动化质量检查。