claude-md-management by giuseppe-trisciuoglio/developer-kit
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill claude-md-management提供全面的 CLAUDE.md 文件管理功能,包括审计、质量评估和针对性改进。此技能通过维护高质量的文档文件,确保 Claude Code 拥有最佳的项目上下文。
CLAUDE.md 文件是为 Claude Code 会话提供项目特定上下文的主要机制。此技能管理 CLAUDE.md 文件的完整生命周期:发现、质量评估、报告和改进。它遵循一个 5 阶段工作流程,确保文档是最新的、可操作的且简洁的。
该技能根据 6 个维度的标准化质量标准评估 CLAUDE.md 文件:命令/工作流、架构清晰度、非显而易见模式、简洁性、时效性和可操作性。每个文件都会获得一个分数(0-100)和字母等级(A-F),并附有具体的改进建议。
在以下情况使用此技能:
# 键以将学习内容整合到 CLAUDE.md 中触发短语: "audit CLAUDE.md", "check documentation quality", "improve project context", "review CLAUDE.md", "validate documentation"
在仓库中查找所有 CLAUDE.md 文件:
find . -name "CLAUDE.md" -o -name ".claude.md" -o -name ".claude.local.md" 2>/dev/null | head -50
文件类型与位置:
| 类型 |
|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 位置 |
|---|
| 用途 |
|---|
| 项目根目录 | ./CLAUDE.md | 主要项目上下文(提交到 git,与团队共享) |
| 本地覆盖 | ./.claude.local.md | 个人/本地设置(被 git 忽略,不共享) |
| 全局默认值 | ~/.claude/CLAUDE.md | 跨所有项目的用户级默认值 |
| 包特定 | ./packages/*/CLAUDE.md | 单体仓库中的模块级上下文 |
| 子目录 | 任何嵌套位置 | 功能/领域特定上下文 |
对于每个 CLAUDE.md 文件,请阅读 references/quality-criteria.md 并根据以下标准进行评估:
| 标准 | 权重 | 检查内容 |
|---|---|---|
| 命令/工作流 | 20 分 | 构建/测试/部署命令是否存在且有效? |
| 架构清晰度 | 20 分 | Claude 能否理解代码库结构? |
| 非显而易见模式 | 15 分 | 是否记录了陷阱和特殊之处? |
| 简洁性 | 15 分 | 内容是否密集且无填充物? |
| 时效性 | 15 分 | 是否反映了当前代码库状态? |
| 可操作性 | 15 分 | 指令是否可执行且支持复制粘贴? |
质量评分: A (90-100), B (70-89), C (50-69), D (30-49), F (0-29)
关键:在做出任何更新之前,始终先输出质量报告。
格式:
## CLAUDE.md 质量报告
### 摘要
- 找到的文件数:X
- 平均分数:X/100
- 需要更新的文件数:X
### 逐文件评估
#### 1. ./CLAUDE.md (项目根目录)
**分数:XX/100 (等级:X)**
| 标准 | 分数 | 备注 |
|-----------|-------|-------|
| 命令/工作流 | X/20 | ... |
| 架构清晰度 | X/20 | ... |
| 非显而易见模式 | X/15 | ... |
| 简洁性 | X/15 | ... |
| 时效性 | X/15 | ... |
| 可操作性 | X/15 | ... |
**问题:**
- [列出具体问题]
**建议添加的内容:**
- [列出应添加的内容]
输出报告后,在更新前询问用户确认。
阅读 references/update-guidelines.md 了解详细的更新原则。
关键原则:
差异格式:
### 更新:./CLAUDE.md
**原因:** [简要解释为何这有帮助]
```diff
+ ## 快速开始
+
+ ```bash
+ npm install
+ npm run dev
+ ```
### 阶段 5:应用更新
获得用户批准后,使用编辑工具应用更改。保留现有的内容结构。
## 示例
### 示例 1:质量评估
**用户请求:** "检查我的 CLAUDE.md 是否良好"
**响应:**
~~~markdown
## CLAUDE.md 质量报告
### 摘要
- 找到的文件数:1
- 平均分数:65/100
- 需要更新的文件数:1
### 逐文件评估
#### 1. ./CLAUDE.md
**分数:65/100 (等级:C)**
| 标准 | 分数 | 备注 |
|-----------|-------|-------|
| 命令/工作流 | 10/20 | 仅记录了 npm install |
| 架构清晰度 | 15/20 | 基本树状结构,缺少模块关系 |
| 非显而易见模式 | 5/15 | 未记录任何陷阱 |
| 简洁性 | 15/15 | 简洁且密集 |
| 时效性 | 10/15 | 部分路径已过时 |
| 可操作性 | 10/15 | 部分指令模糊 |
**问题:**
- 缺少测试命令
- 缺少构建命令
- 未记录身份验证流程的复杂性
- 引用了旧的 src/structure
**建议添加的内容:**
- 添加包含 test/build 的命令部分
- 记录身份验证模块的陷阱
- 更新架构路径
用户请求: "为这个 React 项目创建一个 CLAUDE.md"
响应:
我将为您的 React 项目创建一个 CLAUDE.md。首先让我分析一下代码库结构。
[扫描 package.json, src/ 和关键配置文件]
## CLAUDE.md 质量报告
### 摘要
- 找到的文件数:0
- 将在项目根目录创建新的 CLAUDE.md
### 提议的 CLAUDE.md 内容:
# 项目名称
## 命令
| 命令 | 描述 |
|---------|-------------|
| `npm install` | 安装依赖项 |
| `npm run dev` | 启动开发服务器(Vite 端口 5173) |
| `npm run build` | 生产构建 |
| `npm run test` | 运行 Vitest 测试 |
| `npm run lint` | ESLint 检查 |
## 架构
src/ ├── components/ # 可复用的 UI 组件 ├── pages/ # 路由页面 ├── hooks/ # 自定义 React 钩子 ├── lib/ # 工具函数和 API 客户端 └── main.tsx # 入口点
## 陷阱
- Vite 要求静态资源文件位于 `public/` 目录下
- `useEffect` 中的状态更新需要正确的依赖数组
要创建这个文件吗?
### 示例 3:更新提议
**用户请求:** "用你学到的内容更新我的 CLAUDE.md"
**响应:**
```markdown
### 更新:./CLAUDE.md
**原因:** 发现测试需要数据库设置,但之前未记录。
```diff
## 测试
+ **先决条件:** 首先使用 `docker-compose up -d test-db` 启动测试数据库
+ `npm run test` - 运行所有测试
+ `npm run test:unit` - 仅运行单元测试(无需数据库)
还发现了 API_BASE_URL 的问题:
## 环境变量
- `API_BASE_URL` - API 端点(默认:localhost:3000)
+ `API_BASE_URL` - API 端点(生产环境必需,开发环境默认为 http://localhost:3000)
应用这些更改吗?
## 最佳实践
1. **行动前始终阅读参考资料**:质量标准、模板和更新指南包含重要细节
2. **先报告后编辑**:在未先呈现质量报告的情况下,切勿修改 CLAUDE.md
3. **保留现有结构**:更新时,保持现有的组织和风格
4. **保持项目特定性**:仅添加特定于此代码库的信息,而非通用建议
5. **验证命令有效**:在建议命令之前,在心理上或实际上验证它们能否正确执行
6. **使用渐进式披露**:保持 SKILL.md 精简,在单独的文件中引用详细的评估标准
7. **评分一致**:对所有文件应用相同的评分标准以进行公平比较
## 约束与警告
1. **未经批准绝不修改**:在编辑 CLAUDE.md 文件之前,始终获取用户确认
2. **未经询问不删除内容**:如果建议删除,请明确标记并获取批准
3. **尊重 `.claude.local.md`**:这些是个人设置;切勿在共享文档中建议修改它们
4. **避免通用建议**:不要添加“编写优质代码”类型的内容 - 专注于项目特定模式
5. **保持差异简洁**:仅显示实际更改,而非整个文件内容
6. **验证文件路径**:在记录所有引用的文件之前,确保它们存在
7. **客观评分**:一致地使用评估标准;不要为不完整的文档虚增分数
每周安装数
301
代码仓库
GitHub 星标数
173
首次出现
2026年2月14日
安全审计
已安装于
opencode263
codex263
gemini-cli261
claude-code257
github-copilot254
cursor248
Provides comprehensive CLAUDE.md file management capabilities including auditing, quality assessment, and targeted improvements. This skill ensures Claude Code has optimal project context by maintaining high-quality documentation files.
CLAUDE.md files are the primary mechanism for providing project-specific context to Claude Code sessions. This skill manages the complete lifecycle of CLAUDE.md files: discovery, quality assessment, reporting, and improvement. It follows a 5-phase workflow that ensures documentation is current, actionable, and concise.
The skill evaluates CLAUDE.md files against standardized quality criteria across 6 dimensions: Commands/Workflows, Architecture Clarity, Non-Obvious Patterns, Conciseness, Currency, and Actionability. Each file receives a score (0-100) and letter grade (A-F) with specific improvement recommendations.
Use this skill when:
# during a session to incorporate learnings into CLAUDE.mdTrigger phrases: "audit CLAUDE.md", "check documentation quality", "improve project context", "review CLAUDE.md", "validate documentation"
Find all CLAUDE.md files in the repository:
find . -name "CLAUDE.md" -o -name ".claude.md" -o -name ".claude.local.md" 2>/dev/null | head -50
File Types & Locations:
| Type | Location | Purpose |
|---|---|---|
| Project root | ./CLAUDE.md | Primary project context (checked into git, shared with team) |
| Local overrides | ./.claude.local.md | Personal/local settings (gitignored, not shared) |
| Global defaults | ~/.claude/CLAUDE.md | User-wide defaults across all projects |
| Package-specific | ./packages/*/CLAUDE.md | Module-level context in monorepos |
| Subdirectory | Any nested location | Feature/domain-specific context |
For each CLAUDE.md file, read references/quality-criteria.md and evaluate against these criteria:
| Criterion | Weight | What to Check |
|---|---|---|
| Commands/workflows | 20 pts | Are build/test/deploy commands present and working? |
| Architecture clarity | 20 pts | Can Claude understand the codebase structure? |
| Non-obvious patterns | 15 pts | Are gotchas and quirks documented? |
| Conciseness | 15 pts | Is content dense without filler? |
| Currency | 15 pts | Does it reflect current codebase state? |
| Actionability | 15 pts | Are instructions executable and copy-paste ready? |
Quality Scores: A (90-100), B (70-89), C (50-69), D (30-49), F (0-29)
CRITICAL: Always output the quality report BEFORE making any updates.
Format:
## CLAUDE.md Quality Report
### Summary
- Files found: X
- Average score: X/100
- Files needing update: X
### File-by-File Assessment
#### 1. ./CLAUDE.md (Project Root)
**Score: XX/100 (Grade: X)**
| Criterion | Score | Notes |
|-----------|-------|-------|
| Commands/workflows | X/20 | ... |
| Architecture clarity | X/20 | ... |
| Non-obvious patterns | X/15 | ... |
| Conciseness | X/15 | ... |
| Currency | X/15 | ... |
| Actionability | X/15 | ... |
**Issues:**
- [List specific problems]
**Recommended additions:**
- [List what should be added]
After report output, ask user for confirmation before updating.
Readreferences/update-guidelines.md for detailed update principles.
Key principles:
Diff format:
### Update: ./CLAUDE.md
**Why:** [Brief explanation of why this helps]
```diff
+ ## Quick Start
+
+ ```bash
+ npm install
+ npm run dev
+ ```
### Phase 5: Apply Updates
After user approval, use Edit tool to apply changes. Preserve existing content structure.
## Examples
### Example 1: Quality Assessment
**User request:** "Check if my CLAUDE.md is good"
**Response:**
~~~markdown
## CLAUDE.md Quality Report
### Summary
- Files found: 1
- Average score: 65/100
- Files needing update: 1
### File-by-File Assessment
#### 1. ./CLAUDE.md
**Score: 65/100 (Grade: C)**
| Criterion | Score | Notes |
|-----------|-------|-------|
| Commands/workflows | 10/20 | Only npm install documented |
| Architecture clarity | 15/20 | Basic tree, missing module relationships |
| Non-obvious patterns | 5/15 | No gotchas documented |
| Conciseness | 15/15 | Concise and dense |
| Currency | 10/15 | Some outdated paths |
| Actionability | 10/15 | Some vague instructions |
**Issues:**
- Missing test command
- Missing build command
- No documentation of auth flow complexity
- References to old src/structure
**Recommended additions:**
- Add Commands section with test/build
- Document auth module gotcha
- Update architecture paths
User request: "Create a CLAUDE.md for this React project"
Response:
I'll create a CLAUDE.md for your React project. Let me first analyze the codebase structure.
[Scans package.json, src/, and key config files]
## CLAUDE.md Quality Report
### Summary
- Files found: 0
- Creating new CLAUDE.md at project root
### Proposed CLAUDE.md Content:
# Project Name
## Commands
| Command | Description |
|---------|-------------|
| `npm install` | Install dependencies |
| `npm run dev` | Start dev server (Vite on port 5173) |
| `npm run build` | Production build |
| `npm run test` | Run Vitest tests |
| `npm run lint` | ESLint check |
## Architecture
src/ ├── components/ # Reusable UI components ├── pages/ # Route pages ├── hooks/ # Custom React hooks ├── lib/ # Utilities and API clients └── main.tsx # Entry point
## Gotchas
- Vite requires files in `public/` for static assets
- State updates in `useEffect` need proper dependency arrays
Shall I create this file?
### Example 3: Update Proposal
**User request:** "Update my CLAUDE.md with what you learned"
**Response:**
```markdown
### Update: ./CLAUDE.md
**Why:** Discovered that tests require database setup which wasn't documented.
```diff
## Testing
+ **Prerequisites:** Start test database first with `docker-compose up -d test-db`
+ `npm run test` - Run all tests
+ `npm run test:unit` - Unit tests only (no DB required)
Also found issue with API_BASE_URL:
## Environment
- `API_BASE_URL` - API endpoint (default: localhost:3000)
+ `API_BASE_URL` - API endpoint (required for production, defaults to http://localhost:3000 in dev)
Apply these changes?
## Best Practices
1. **Always read references before acting**: Quality criteria, templates, and update guidelines contain essential details
2. **Report before editing**: Never modify CLAUDE.md without first presenting a quality report
3. **Preserve existing structure**: When updating, maintain the existing organization and style
4. **Be project-specific**: Only add information specific to this codebase, not generic advice
5. **Verify commands work**: Before suggesting commands, mentally or actually verify they execute correctly
6. **Use progressive disclosure**: Keep SKILL.md lean, reference detailed rubrics in separate files
7. **Score consistently**: Apply the same scoring standards across all files for fair comparison
## Constraints and Warnings
1. **Never modify without approval**: Always get user confirmation before editing CLAUDE.md files
2. **Don't remove content without asking**: If suggesting deletions, explicitly mark them and get approval
3. **Respect `.claude.local.md`**: These are personal settings; never suggest modifying them in shared docs
4. **Avoid generic advice**: Do not add "write good code" type content - focus on project-specific patterns
5. **Keep diffs concise**: Show only the actual changes, not entire file contents
6. **Verify file paths**: Ensure all referenced files exist before documenting them
7. **Score objectively**: Use the rubric consistently; don't inflate scores for incomplete documentation
Weekly Installs
301
Repository
GitHub Stars
173
First Seen
Feb 14, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode263
codex263
gemini-cli261
claude-code257
github-copilot254
cursor248
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
41,800 周安装
shadcn/ui + Tailwind CSS 实战:构建美观可访问的 React UI 组件与设计系统
4,400 周安装
前端设计技能:创建独特生产级界面,告别通用AI美学,实现创意前端开发
4,100 周安装
ClawDirect-Dev:基于ATXP构建面向AI智能体的网页身份验证与支付集成方案
4,300 周安装
FastAPI Python开发指南:高效后端API构建与最佳实践
4,300 周安装
PRD转Issues工具:AI辅助将产品需求文档分解为GitHub可执行任务
4,500 周安装
Firebase Data Connect 教程:PostgreSQL 关系型数据库与 GraphQL API 开发指南
5,300 周安装