---
title: "Discussion on \"CLAUDE.md in Claude Code: How to Write Project Instructions, Rules and Memory\" | Hashnode"
description: "Discussion on \"CLAUDE.md in Claude Code: How to Write Project Instructions, Rules and Memory\". TL;DR: CLAUDE.md is an instructions file Claude Code reads at the start of every session: build and test commands, architecture, conventions and things to avoid. A good one is short (under 200 lines),"
url: "https://hashnode.com/posts/claude-md-in-claude-code-how-to-write-project-instructions-rules-and-memory/6b0725078becfd6630d3c183"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [CLAUDE.md in Claude Code: How to Write Project Instructions, Rules and Memory](https://kriatiz.hashnode.dev/claude-md-in-claude-code-how-to-write-project-instructions-rules-and-memory?utm_source=hashnode&utm_medium=feed)

TL;DR: CLAUDE.md is an instructions file Claude Code reads at the start of every session: build and test commands, architecture, conventions and things to avoid. A good one is short (under 200 lines),

Nov 25 · 5 min read · kriatiz.hashnode.dev  
Read the article

-   [#claude-code](https://hashnode.com/tag/claude-code)
-   [#artificial-intelligence](https://hashnode.com/tag/artificial-intelligence)

## Written by

[Vladyslav Koshelyev](https://hashnode.com/@kriatiz)

@kriatiz · Odesa, Ukraine

  
[View profile](https://hashnode.com/@kriatiz)

Full-stack developer & AI engineer. Websites, AI chatbots, Claude Code and automation. Founder of KRIATIZ.

Full-stack developer and AI engineer with 12+ years in web development. I build websites, online stores and web apps, AI chatbots for websites and messengers, RAG assistants and n8n automations, and set up Claude Code for teams. Writing about Claude Code, AI agents and practical web dev. Site: kriatiz.com

## Responses 2

Markdown supported · ⌘↵ to post

[Adam Lewis](https://hashnode.com/@nark3d)

[6d ago](https://hashnode.com/posts/claude-md-in-claude-code-how-to-write-project-instructions-rules-and-memory/6b0725078becfd6630d3c183/comment/6b08a8aba29717a6b6586c2f)

Splitting instructions into path-scoped rules seems the most useful part. Do rules without paths still load at launch?

[Vladyslav Koshelyev](https://hashnode.com/@kriatiz)

[6d ago](https://hashnode.com/posts/claude-md-in-claude-code-how-to-write-project-instructions-rules-and-memory/6b0725078becfd6630d3c183/comment/6b08a8aba29717a6b6586c2f#reply-6b08ac0b5331867d1a7fc527)

Yes. A rule file in .claude/rules/ without paths frontmatter loads at launch, just like CLAUDE.md, so it costs context in every session. Only rules with paths wait until Claude works on matching files. A practical split: keep project-wide rules (commands, "don't touch" lists) without paths, and move anything specific to one area — API, migrations, frontend — into path-scoped rules.
