เลิกอธิบายทุกอย่างกับ Claude Code ซ้ำ ๆ — CLAUDE.md ไฟล์นี้ทำแทนให้แล้ว
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 ดึงไฟล์อื่นเข้ามา ตัวอย่าง:
Brand guide: @docs/brand-voice.md
Glossary: @docs/glossary.md
Article template: @docs/article-template.md
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/
- เริ่มด้วย
/initgenerate CLAUDE.md เบื้องต้นตามโปรเจกต์ แก้ให้ตรงจริง - เจอ mistake เดิมซ้ำ — อย่าแก้เฉพาะ prompt เดียว ทำเป็น rule หรือ import reference file
- ไฟล์โต — move rule เข้า
rules/folder แยก topic - อะไรที่ไม่ apply ทุกครั้ง — ใช้ skills — โหลดเฉพาะเมื่อจำเป็น ไม่กิน context ทุก session
อย่าใส่ข้อมูล sensitive ลง CLAUDE.md
# 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
# 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
# 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/
วางใน Claude Code ตอบทีละคำถาม จบ interview พิมพ์ “Now generate my folder structure and all files” — Claude return ทุกไฟล์พร้อม copy paste
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/ เมื่อโปรเจกต์โต