本文へ移動 / Skip to content
pochiai.
TemplatesClaude Code

CLAUDE.md starter — a template that teaches Claude Code the rules for your work

A minimal template for CLAUDE.md, the rules file Claude Code reads automatically. We also confirmed it isn't read if placed in the wrong spot.

Verified Claude Opus 5.5(Claude Code 2.1)Checked 2026.09.282 min read

Translated from the Japanese original. Outputs shown in code blocks are kept exactly as produced.

Key points

  • Claude Code reads a CLAUDE.md at the top of the folder automatically at start
  • Placed in a subfolder, it was not read (a failure we actually tried)
  • The template has only 4 sections: goal, folders, what to ask, report format
[ Goal ]
Check whether just placing a CLAUDE.md makes Claude Code follow work rules (where it may make changes, what to ask first, how to report).
[ Conclusion ]
Placed at the top of the folder, it explained the rules as written without being told to. Placed in a subfolder, it was not read.

[ Download ]

When Claude Code starts working, it automatically reads the CLAUDE.md at the top of the folder. Without repeating the same reminders every time, you can make it follow "where it may make changes", "what to ask before going ahead" and "how to report". Here we share a minimal template and check that it actually gets read.

Steps

  1. Download the zip with the button above and unzip it
  2. Put the CLAUDE.md inside at the top of the folder you want to work in (not under docs/ or similar)
  3. Rewrite the two sections "Goal" and "Folder structure" to fit your work
  4. Start Claude Code in that folder and ask, "Summarize the rules for working in this folder in 3 lines"
  5. If the summary matches the contents of CLAUDE.md, it has been read

The template has only four parts: "Goal / Folder structure / What it may do and what to ask first / Output rules". The longer you write, the more the important lines get buried, so once it goes past 100 lines, we recommend moving procedures to separate files and writing only their file names in CLAUDE.md.

Actual output

This is the reply when we put the template, unchanged, at the top of the folder and sent the question from step 4 once (13 seconds).

text
- `input/` は読むだけで、中身は書き換えません。結果は `output/` に `YYYY-MM-DD_内容.csv` という名前で置き、作業メモは `notes/` に残します。
- `output/` と `notes/` へのファイル作成、集計、下書きは聞かずにやります。`input/` の変更、ファイルの削除、外部への送信は先に確認します。
- 報告は結論を先に、箇条書きで短く書きます。分からないことは推測で埋めず「不明」と書き、最後に「やったこと / 残っていること」を 3 行以内でまとめます。

「目的」の欄は「(例)請求書 PDF から…」のままで、まだ中身が書かれていません。

(English: input/ is read-only and its contents are not changed; results go in output/ named YYYY-MM-DD_<content>.csv, and work notes go in notes/. Creating files in output/ and notes/, tallying and drafting are done without asking; changes to input/, deleting files and sending anything outside are confirmed first. Reports put the conclusion first in short bullets, write "unknown" instead of guessing, and end with "what was done / what remains" in 3 lines or fewer. Then: the "Goal" section still says "(e.g.) from invoice PDFs…" and has not been filled in yet.)

Although we never told it to open the file, it reflected all four sections. As in the last line, it even pointed out a section we forgot to rewrite, which was an unexpected bonus.

What went wrong

We moved the same file to docs/CLAUDE.md and asked the same question. The reply began like this:

text
今読み込まれているのは `~/.claude/CLAUDE.md`(グローバル)だけです。このフォルダ固有の CLAUDE.md は見えていないので、その前提での要約です。

(English: "Only ~/.claude/CLAUDE.md (global) is loaded right now. I can't see a CLAUDE.md specific to this folder, so this summary is based on that.")

What followed was only a summary of the personal settings (rules shared across all projects); the input/ and output/ rules in the template never came up. If it is not at the top of the folder, it is not read at startup.

One more caution: our test environment had a personal settings file (~/.claude/CLAUDE.md). Both the personal settings and the folder's CLAUDE.md are read, so if they conflict, the behavior becomes hard to predict. It is safest to put "preferences" in the personal settings and "the rules for that work" in the folder's CLAUDE.md.

Tips for adapting it

  • For folders you don't want touched, write it with verbs, like "read only" or "do not modify". Just saying "important folder" doesn't get the point across well
  • The shorter the "ask first" list, the better it is followed. If everything is "ask first", it stops every time and the work doesn't move
  • Deciding the report format (for example, 3 lines or fewer) saves you from reading long explanations

[ Verification ]

Status
Verified
Model
Claude Opus 5.5(Claude Code 2.1)2026.09.28
Time
10 min

[ Update history ]

Last checked 2026.09.28

  1. 2026.09.28First version. Tested with Claude Opus 5.5
[ Index ]