5 CLAUDE.md tricks that stop Claude from forgetting
Skills cut my tokens. MCP cut my context. Subagents cut my time. Hooks cut my rework. Memory cuts something else: repetition. Five CLAUDE.md patterns I add to every project — so I never have to re-explain pnpm vs npm, vitest vs jest, snake_case vs camelCase, again. Fifth in the series. All five patterns are free on GitHub (link below). Plain Markdown files Claude already reads on session start. ⏱ Chapters 00:00 The repetition problem 00:29 What you'll learn 00:40 Pattern 1 — project CLAUDE.md (the cheat sheet Claude wishes it had) 01:28 Pattern 2 — user CLAUDE.md (your taste, every project) 02:12 Pattern 3 — hierarchical CLAUDE.md (right rules per package) 03:00 Pattern 4 — @-imports (12k → 3.4k context tokens) 03:48 Pattern 5 — the # shortcut (lessons that survive sessions) 04:54 Ranked by repetition killed 05:18 What's next 🧠 All 5 patterns as copy-paste templates: https://github.com/UrNas/devtips/tree/main/memory-config ✅ What each pattern does • project CLAUDE.md — A 10-line file at your repo root. Stack, commands, don't-touch rules. Claude reads it on session start. First-try correct, instead of four corrections per session. • user CLAUDE.md — One file at ~/.claude/CLAUDE.md. Your personal style — indentation, commit format, comment density. Applied to every project automatically. Capture once, apply forever. • hierarchical CLAUDE.md — Root rules + per-package overrides (apps/api/CLAUDE.md). Claude Code reads top-down and merges. Your monorepo's mixed conventions finally work. • @-imports — Split a bloated CLAUDE.md into focused snippets (style.md, testing.md, security.md). Compose with @./conventions/style.md. Same rules, fraction of the context budget. • the # shortcut — Type any line in Claude Code starting with # and it gets appended to CLAUDE.md automatically. Mid-session corrections survive the session boundary. Teach once. Remember forever. 🧵 The full series • Part 1 — 5 Claude Code Skills that cut my token bill in half • Part 2 — The 5 MCP servers I use in every Claude Code session • Part 3 — The 5 Claude Code subagents I run in parallel • Part 4 — 5 Claude Code hooks that auto-fix my code • Part 5 — this video 👉 Subscribe for more Claude Code workflow tips: https://youtube.com/@tubeforge #claudecode #anthropic #aitools #developerproductivity #aicoding
Download
0 formatsNo download links available.