# Claude Md

> Methodology for authoring and maintaining CLAUDE.md. Enforces brevity, relevance, and structure.

- Skill: `majiayu000/claude-md-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/claude-md-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/claude-md-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/claude-md-2

---


# CLAUDE.md Authoring

## Purpose

Methodology for editing CLAUDE.md that keeps it concise, high-signal, and structurally sound. The guide (patterns/anti-patterns in `skill.yaml`) is the primary value; the linter (`lint-claude-md.sh`) is a safety net for quantifiable rules.

## Quick Reference

- **Target:** <120 lines, 80% relevance per line
- **Structure:** Title, behavioral, "Built with:", dirs-only structure, auto-gen table, commands, conventions
- **Rule:** Reference material lives in `docs/` — CLAUDE.md links to it

```bash
task docs:lint-claude-md    # Validate CLAUDE.md structure
```

## Key Principle

Every line in CLAUDE.md must be useful in 80%+ of sessions. If it's reference material, move it to `docs/` and link. If Claude can discover it with tools, omit it.

## Automation

See `skill.yaml` for patterns, anti-patterns, and editing procedure.
See `collaboration.yaml` for boundaries with `docs-refresh`.
See `sharp-edges.yaml` for common pitfalls.

