一键导入
claude-md-writer
Use when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | claude-md-writer |
| description | Use when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization |
Creates and refactors CLAUDE.md files following official Anthropic best practices (2025).
| Rule | Why |
|---|---|
| CLAUDE.md < 200 lines | Loads on EVERY request, costs tokens |
| Rules files < 500 lines each | Official recommendation per file |
| Critical rules FIRST | Top = highest priority |
Modular rules → .claude/rules/ | Conditional loading, organized |
Use paths: frontmatter | Load rules only for matching files |
| No linting rules | Use ESLint/Prettier/Biome instead |
| Pointers over copies | Files change, references stay valid |
Claude Code loads memory in this order (higher = higher priority):
| Priority | Type | Location |
|---|---|---|
| Highest | Enterprise | /Library/Application Support/ClaudeCode/CLAUDE.md |
| ↓ | Project | ./CLAUDE.md or ./.claude/CLAUDE.md |
| ↓ | Rules | ./.claude/rules/*.md (conditional) |
| ↓ | User | ~/.claude/CLAUDE.md |
| Lowest | Local | ./CLAUDE.local.md (gitignored) |
Use /memory command to see currently loaded files.
Official recommendation for large projects:
| Tier | Location | Loads | Target |
|---|---|---|---|
| 1. Foundation | CLAUDE.md | Always | < 200 lines |
| 2. Component | .claude/rules/{component}/ | When working in component | < 500 lines |
| 3. Feature | Co-located with code | When working on feature | As needed |
Example structure:
.claude/
├── CLAUDE.md # Tier 1: always loaded
└── rules/
├── database.md # Tier 2: SQL, migrations
├── api.md # Tier 2: API patterns
└── frontend/ # Tier 2: subdirectory
├── components.md # paths: src/**/*.tsx
├── layout.md # paths: src/pages/**/*.tsx
└── tokens.md # paths: **/*.tsx
# Project Name
One-line description.
## Commands
- `npm run dev` - Development
- `npm run build` - Production
- `npm run test` - Tests
## Architecture
| Path | Purpose |
|------|---------|
| `lib/` | Core logic |
| `app/api/` | API routes |
## Key Patterns
**Pattern Name**: One-line explanation.
## Database (if applicable)
| Table | Key Fields |
|-------|------------|
## Modular Docs
See `.claude/rules/` for:
- `database.md` - queries, schema
- `deploy.md` - deployment
## Tech Stack
One line: Next.js 15, PostgreSQL, TypeScript
Use YAML frontmatter for file-type-specific rules:
---
paths: "src/api/**/*.ts"
---
# API Rules
- All endpoints must validate input
- Use standard error format
| Pattern | Matches |
|---|---|
**/*.ts | All .ts files anywhere |
src/**/* | All files under src/ |
*.md | Markdown in project root |
src/components/*.tsx | Components in specific dir |
# Multiple extensions
paths: "src/**/*.{ts,tsx}"
# Multiple directories
paths: "{src,lib}/**/*.ts, tests/**/*.test.ts"
Note: Wrap patterns in quotes for YAML safety.
Rules with paths: only load when working with matching files → saves tokens.
/init for base CLAUDE.md.claude/rules/ for domain-specific docs.claude/rules/:
database.md - queries, schema, connectiondeploy.md - deployment processmessaging.md - integrations (Telegram, etc.)@file references — don't duplicate| Content | Location |
|---|---|
| Project description | CLAUDE.md |
| Critical constraints | CLAUDE.md (top!) |
| Quick start (3 commands) | CLAUDE.md |
| Architecture overview | CLAUDE.md |
| Key patterns (1-liners) | CLAUDE.md |
| SQL queries/schema | .claude/rules/database.md |
| Deployment steps | .claude/rules/deploy.md |
| API documentation | .claude/rules/api.md |
| Git workflow | .claude/rules/git.md |
| Personal preferences | CLAUDE.local.md (gitignored) |
| Code style rules | .eslintrc / biome.json (NOT docs) |
Reference files instead of duplicating:
@README.md
@docs/architecture.md
@~/.claude/snippets/common.md
@docs/file.md@~/path/file.mdPersonal project settings (auto-gitignored):
# My Local Settings
- Prefer verbose output
- Run tests after every change
- My worktree location: .trees/
| Mistake | Fix |
|---|---|
| 500+ lines | Split into .claude/rules/ |
| SQL examples inline | → rules/database.md |
| "Run prettier" rules | Use tool config files |
| Full API docs | → rules/api.md |
| Deployment instructions | → rules/deploy.md |
| Code in CLAUDE.md | Use @file:line references |
| Negative rules only | Add alternatives: "Don't X; use Y instead" |
Before finishing:
.claude/rules/ for domain-specific docs?paths: frontmatter for conditional loading?@ references instead of duplication?| Command | Purpose |
|---|---|
/init | Generate initial CLAUDE.md |
/memory | View loaded memory files |
Official:
Community:
Updated: Jan 2026
Use when transitioning from retro to weekly plan, prioritizing backlog, choosing outcomes for the week, or when user says "план на неделю", "планирование", "W13 plan", "outcomes", "приоритизация". Runs after weekly-retro skill.
Use when preparing for, running, or closing a live meeting with an AI assistant dashboard. Triggers on "meeting copilot", "live copilot", "prepare for a call", "update copilot", "close the session", or requests to turn transcript chunks into meeting questions, topic maps, decisions, and follow-ups.
Use when conducting weekly retrospective, reviewing past week, or when user says "retro", "weekly retro", "week review". Triggers at end of week or start of new week.
Use when user wants a standalone HTML diagram in flat engineering blueprint style — architecture diagrams, system flows, technical spec sheets, component maps. Generates one HTML file using Tailwind v4 (browser CDN) for layout and D3 v7 (CDN) for SVG diagrams. User-invoked only — do NOT auto-trigger. Triggers on "/ris-draft", "сделай blueprint", "технический чертёж", "архитектурная схема", "инженерная схема", "blueprint diagram", "engineering blueprint", "technical spec sheet", "architecture diagram", "system flow diagram".
Use when ranking a list of requirements, features, or backlog items using RICE / ICE / MoSCoW / Kano. Built-in decision tree picks the right framework based on data availability and decision context. Output is a transparent matrix, 2×2 Impact/Effort quadrant, and a Sprint allocation proposal. User-invoked only — do NOT auto-trigger. Triggers on "/ris-prioritize", "приоритизация", "ранжируй бэклог", "RICE-анализ", "prioritize requirements", "RICE", "ICE", "MoSCoW", "Kano", "rank backlog".
Use when need to sync session work into GitHub issues OR query status of an existing track across repos. Two modes — write (end-of-session sync: find issues, update, create with parent epic + W-label) and read (status lookup across repos). Triggers on "/ris-manager", "sync session", "обнови issues", "синкни сессию", "зафиксируй прогресс", "статус задачи", "что по <track>", "есть ли issue по", "track status", "what about <track>".