KRIT.JUNSREE PERSONAL WEBSITE
MEDIUM

เลิกอธิบายทุกอย่างกับ Claude Code ซ้ำ ๆ — CLAUDE.md ไฟล์นี้ทำแทนให้แล้ว

The PyCoach สอนวิธีสร้าง CLAUDE.md ให้เป็น project memory จริง — 5 หัวข้อ (Identity, Output, Quality, Boundaries, Navigation) + วิธีเก็บให้ minimal ผ่านการ split ไป rules/ context/ skills/ + 3 template พร้อมใช้ (decision brief, article writer, meeting notes → action plan) + 67-question interview prompt ที่ให้ Claude Code สัมภาษณ์คุณเองแล้ว generate ไฟล์ทั้ง project system

By krit.junsree@gmail.com ◆ Jul 31, 2026 ◆ 16 MIN READ Beginner

☰ ON THIS PAGE

เลิกอธิบายทุกอย่างกับ Claude Code ซ้ำ ๆ — CLAUDE.md ไฟล์นี้ทำแทนให้แล้ว

ผู้เขียน: The PyCoach · เผยแพร่ 28 ก.ค. 2026 · อ่านต้นฉบับบน Medium
บทนำ: คนที่ใช้ Claude Code ได้ประโยชน์สูงสุดไม่ใช่คน prompt เก่ง — เป็นคนที่สร้างระบบ คนส่วนใหญ่วนลูป: เปิด chat → เขียน prompt → แก้ output → วันถัดไปเริ่มใหม่จากศูนย์ กำลังไม่ได้สร้าง assistant แต่กำลัง improvise ต้นทุนสะสม: ผลไม่ consistent, tone เปลี่ยนไปมา, อธิบายซ้ำสิ่งที่คิดว่าตกลงแล้ว CLAUDE.md แก้ปัญหานี้ — เป็น memory ของโปรเจกต์

CLAUDE.md คืออะไร

Markdown file ธรรมดา ไม่ใช่โค้ด ไม่ต้องเป็น developer ก็ใช้ได้ ใน Claude Code ทำหน้าที่เป็น project memory — Claude อ่านต้น conversation ทุกครั้งเพื่อ: load rule ของคุณ, follow convention, keep context consistent ข้าม session

เป้าไม่ใช่ documentation เป้าคือ operate Claude ได้ framework ที่มั่นคง เลิก improvise ทุกครั้งที่เปิด chat ใหม่

สำคัญ: CLAUDE.md ไม่แทน default system prompt ของ Claude Code — เป็น content ที่เพิ่มเข้าไปในทุก session อยู่บน base prompt ไม่ใช่แทน มันจึงเป็น lever ที่มั่นคงที่สุดตัวหนึ่งที่คุณมี

ใส่อะไรใน CLAUDE.md — 5 หัวข้อ

เก็บให้ compact, focused, human ให้ scale ได้ ทุกคำนับ (โหลดทุก session)

1Identity — คุณคือใคร มาทำอะไร

  • Role: editor, PMO, manager, writer
  • Goal: outcome ที่อยากได้ consistent
  • Operating principles: วิธี prioritize + วิธีจัดการ uncertainty

เจาะจงมาก Claude improvise น้อย

2Output — delivery contract ที่เสถียร

แทนถาม “เขียน report ให้หน่อย” ทุกครั้ง — define โครงครั้งเดียวใน CLAUDE.md เช่น: summary X บรรทัด, risks + constraints, options เทียบ, next steps ตัด revision ลงเยอะ

3Quality — วิธีเช็คงาน

Claude ทำงานดีขึ้นมากเมื่อรู้ว่า “ถูก” คืออะไร ให้ criteria, expected output, ตัวอย่าง เช่น:

  • Include intro ที่ preview value
  • Use concrete examples
  • Do not invent data — ask for it instead
  • Avoid claim ที่ verify ไม่ได้

4Boundaries — สิ่งที่ Claude ห้ามทำ แม้ฟังดูสมเหตุสมผล

  • ห้ามสมมติ number/date/policy ที่ไม่อยู่ในไฟล์
  • ถ้าข้อมูลสำคัญขาด ถามก่อนเสนอ final plan
  • แยก fact จาก hypothesis
  • เลี่ยง recommendation ที่มี material impact โดยไม่ present risk + trade-off

5Navigation — ที่ที่ความจริงอยู่ในโปรเจกต์

AI ไม่เดา context — มันอ่าน ใช้ @route syntax ดึงไฟล์อื่นเข้ามา ตัวอย่าง:

text
Brand guide: @docs/brand-voice.md
Glossary: @docs/glossary.md
Article template: @docs/article-template.md
โครงสร้างโฟลเดอร์ตัวอย่าง

text
my-skills/
├─ CLAUDE.md
├─ rules/
│  ├─ rules.md
│  └─ boundaries.md
└─ skills/
   └─ weekly-decision-brief/
      └─ SKILL.md

เก็บ CLAUDE.md ให้ minimal + scalable

  • Identity: เก็บ “คุณคือใครที่นี่” · move ประวัติยาว, goal รายไตรมาส, audience รายละเอียด → context/
  • Output: เก็บ default format · move procedure ซ้ำ ๆ → skills/
  • Quality: เก็บ 3-7 rule universal · move checklist ยาว → rules/quality.md
  • Boundaries: เก็บ boundary universal 2-6 bullet · move policy เฉพาะ → rules/boundaries.md
  • Navigation: เก็บ high-level pointer · move glossary, source, template → context/
Cycle การ maintain

  1. เริ่มด้วย /init generate CLAUDE.md เบื้องต้นตามโปรเจกต์ แก้ให้ตรงจริง
  2. เจอ mistake เดิมซ้ำ — อย่าแก้เฉพาะ prompt เดียว ทำเป็น rule หรือ import reference file
  3. ไฟล์โต — move rule เข้า rules/ folder แยก topic
  4. อะไรที่ไม่ apply ทุกครั้ง — ใช้ skills — โหลดเฉพาะเมื่อจำเป็น ไม่กิน context ทุก session

อย่าใส่ข้อมูล sensitive ลง CLAUDE.md

Template — Decision Brief

yaml
# Identity
You are my thinking partner for executive decisions.
Prioritize clarity, trade-offs, and risk.
Do not fill space with empty opinions.

# How to work
- If critical info missing, ask questions first.
- Separate facts (given) from hypotheses (inferences).
- Do not invent numbers, dates, or policies.

# Output standard: Decision brief
ALWAYS deliver:
1) Context (5-7 lines)
2) Key signals (max 7)
3) Risks and constraints (max 7)
4) Options (min 2, max 4) with pros/cons
5) Open questions (always)
6) Next steps (concrete actions)

# Navigation
- Reasoning rules: rules/rules.md
- Boundaries: rules/boundaries.md
- Decision outputs: skills/weekly-decision-brief/SKILL.md
Template — เขียนบทความด้วย voice ของคุณ

yaml
# Identity
You are my editor and content strategist.
Your job is not only to write, but shape an article
that is useful and actionable.

# Editorial rules
- Avoid generic lines. Use verifiable examples.
- If not supported by source or file, say so explicitly.
- Keep logic clear: problem → framework → example → application.

# Required structure
- Introduction: sell the article (promise + what reader achieves)
- Max 4 main sections
- Must include: 1 diagram, 1 mind map, 2 applied examples

# Navigation
- Audience: context/audience.md
- Goal/angle: context/article-goal.md
- Output contract: rules/output.md
- Quality checks: rules/quality.md
- Boundaries: rules/boundaries.md
- Article Outline Skill: skills/article-outline/SKILL.md
Template — Meeting notes → Action plan

yaml
# Identity
You are my operations assistant.
Priority: turn ambiguous info into clear actions.

# Information discipline
- Separate confirmed decisions from open items + risks
- If owner/date missing, ask. Do not invent.

# Required output: Action plan
1) Meeting summary (max 10 lines)
2) Confirmed decisions
3) Actions (mental table: what / who / when / DoD)
4) Dependencies + blockers
5) Questions to close gaps

# Boundaries
- Do not assume missing data
- Avoid speculation

# Navigation
If this grows, split into rules/ and skills/
Prompt สัมภาษณ์ (67 คำถาม) — generate CLAUDE.md ของคุณเอง

วางใน Claude Code ตอบทีละคำถาม จบ interview พิมพ์ “Now generate my folder structure and all files” — Claude return ทุกไฟล์พร้อม copy paste

text
You are Claude Code acting as an interviewer.

Goal: run structured interview to generate my project system:
- CLAUDE.md, rules/output.md, rules/quality.md, rules/boundaries.md
- context/project.md, context/audience.md, context/glossary.md, context/sources.md
- 1-3 skills/*/SKILL.md based on repeatable workflows

Interview rules:
- Ask ONE question at a time.
- Wait for my answer before continuing.
- If answer vague, ask short follow-up (max 1).
- Accept "N/A" and "Not decided yet" without pushing.
- Do not write files until interview complete.

Sections cover:
A) Identity and purpose (Q1-8)
B) Quality bar (Q9-13)
C) Output defaults (Q14-19)
D) Uncertainty (Q20-23)
E) Boundaries (Q24-28)
F) Project context (Q29-31)
G) Audience (Q32-36)
H) Vocabulary and sources (Q37-40)
I) Navigation (Q41-43)
J) Skills — repeat 1-3 times (Q44-51)
K) Examples/templates (Q52-55)
L) Diagrams/mind maps (Q56-59)
M) What stays in CLAUDE.md vs moves out (Q60-61)
N) Defaults (Q62-64)
O) Source-of-truth hierarchy (Q65-66)
P) Skill triggers (Q67)

Start with Question 1.

Prompt เต็ม 67 คำถามอยู่ในต้นฉบับ ลิงก์ที่ footer

สรุป

CLAUDE.md ทำ 3 อย่าง: (1) เก็บ identity/output/quality/boundaries/navigation ในไฟล์เดียว ที่โหลดทุก session (2) แยกส่วนที่เปลี่ยนบ่อยไปไฟล์อื่นผ่าน @route (3) skill โหลดเฉพาะเมื่อจำเป็น ไม่กิน context ทุกครั้ง เริ่มเรียบง่าย ใช้ prompt สัมภาษณ์เพื่อ scaffold เร็ว แล้วค่อย migrate เข้า rules/, context/, skills/ เมื่อโปรเจกต์โต

แปลและเรียบเรียงจากบทความของ The PyCoach · แหล่งที่มา: Medium — Artificial Corner