serejaris avatar

claude-md-writer

Use when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and

提供方 serejaris|开源

Claude MD Writer Skill

Skill illustration

A Claude Code skill for creating and refactoring CLAUDE.md files following Anthropic best practices.

Problem

CLAUDE.md files grow too large, waste tokens on every request, and lack organization for conditional loading.

Solution

Enforces documentation standards:

  • Size limits — CLAUDE.md < 200 lines, rules < 500 lines each
  • 3-Tier System — Foundation → Component → Feature documentation
  • Conditional loadingpaths: frontmatter for file-specific rules
  • Memory hierarchy — proper priority understanding

Installation

cp -r skills/claude-md-writer ~/.claude/skills/

Quick Reference

LimitTarget
CLAUDE.md< 200 lines
Each rules file< 500 lines
Critical rulesTop of file

3-Tier System

TierLocationLoads
FoundationCLAUDE.mdAlways
Component.claude/rules/When working in component
FeatureCo-located with codeWhen working on feature

Key Features

  • Golden rules table with size limits
  • 3-Tier documentation system
  • Glob patterns for conditional rules
  • Memory hierarchy explanation
  • Quality checklist
  • Common mistakes guide

See Also

claude-md-writer - 适用于 Claude Code 与 Cursor 的 AI 智能体 Skill | Agent Skills