How to Write a CLAUDE.md: The File with 187k GitHub Stars

PawelHuryn · x · 2026-07-04

A deep dive into CLAUDE.md best practices. The author points out that since CLAUDE.md is loaded every turn, each line acts as a 'rent' paid per request. Therefore, it should focus on project-specific, hard-learned rules (like user-initiated version upgrades or three testing categories) rather than repeating default model behaviors. He emphasizes that matching existing code styles is already a default behavior for Claude Code, hardcoded into the Opus 4.8 system prompt.

Original post →

More from coding & agent

coding & agent channel →