claude-md
Fungsinya
Skill ini memandu agent Anda untuk menulis atau memeriksa file CLAUDE.md, yaitu file yang menjelaskan cara kerja sebuah proyek kepada Claude. Skill ini ditujukan untuk developer yang ingin asisten AI mereka memulai setiap sesi dengan konteks yang tepat.
Kapan dipakai
- ✓Saat Anda memulai proyek baru dan ingin dibuatkan file CLAUDE.md.
- ✓Saat file CLAUDE.md yang ada terlalu panjang atau kurang jelas dan perlu diperbaiki.
- ✓Saat Anda ingin memeriksa mutu CLAUDE.md sebuah proyek sebelum dibagikan ke tim.
Link skill
https://github.com/luongnv89/claude-howto/blob/main/03-skills/claude-md/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Bisakah Anda memeriksa CLAUDE.md saya dan menyarankan bagian mana yang dihapus agar tetap singkat dan berguna?”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent Anda menganalisis proyek, memeriksa file CLAUDE.md yang sudah ada, lalu membuat, memperbarui, atau memeriksanya berdasarkan sejumlah prinsip. Hanya informasi yang berlaku untuk setiap sesi yang dipertahankan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). User may specify:
create- Create new CLAUDE.md from scratchupdate- Improve existing CLAUDE.mdaudit- Analyze and report on current CLAUDE.md quality- A specific path to create/update (e.g.,
src/api/CLAUDE.mdfor directory-specific instructions)
Core Principles
LLMs are stateless: CLAUDE.md is the main project file loaded into every conversation (alongside auto memory and unscoped rules). It serves as the primary onboarding document for AI agents into your codebase.
The Golden Rules
Less is More: Frontier LLMs can follow ~150-200 instructions. Claude Code's system prompt already uses ~50. Keep your CLAUDE.md focused and concise.
Universal Applicability: Only include information relevant to EVERY session. Task-specific instructions belong in separate files.
Don't Use Claude as a Linter: Style guidelines bloat context and degrade instruction-following. Use deterministic tools (prettier, eslint, etc.) instead.
Never Auto-Generate: CLAUDE.md is the highest leverage point of the AI harness. Craft it manually with careful consideration.
Execution Flow
1. Project Analysis
First, analyze the current project state:
Check for existing CLAUDE.md files:
- Root level:
./CLAUDE.mdor.claude/CLAUDE.md - Directory-specific:
**/CLAUDE.md - Global user config:
~/.claude/CLAUDE.md
- Root level:
Identify the project structure:
- Technology stack (languages, frameworks)
- Project type (monorepo, single app, library)
- Development tools (package manager, build system, test runner)
Review existing documentation:
- README.md
- CONTRIBUTING.md
- package.json, pyproject.toml, Cargo.toml, etc.
2. Content Strategy (WHAT, WHY, HOW)
Structure CLAUDE.md around three dimensions:
WHAT - Technology & Structure
- Technology stack overview
- Project organization (especially important for monorepos)
- Key directories and their purposes
WHY - Purpose & Context
- What the project does
- Why certain architectural decisions were made
- What each major component is responsible for
HOW - Workflow & Conventions
- Development workflow (bun vs node, pip vs uv, etc.)
- Testing procedures and commands
- Verification and build methods
- Critical "gotchas" or non-obvious requirements
3. Progressive Disclosure Strategy
For larger projects, recommend creating an agent_docs/ folder:
agent_docs/
|- building_the_project.md
|- running_tests.md
|- code_conventions.md
|- architecture_decisions.md
In CLAUDE.md, reference these files with instructions like:
For detailed build instructions, refer to `agent_docs/building_the_project.md`
Important: Use file:line references instead of code snippets to avoid outdated context.
4. Quality Constraints
When creating or updating CLAUDE.md:
- Target Length: Keep it under 200 lines; shorter is better
- No Style Rules: Remove any linting/formatting instructions
- No Task-Specific Instructions: Move to separate files
- No Code Snippets: Use file references instead
- No Redundant Information: Don't repeat what's in package.json or README
5. Essential Sections
A well-structured CLAUDE.md should include:
# Project Name
Brief one-line description.
## Tech Stack
- Primary language and version
- Key frameworks/libraries
- Database/storage (if any)
## Project Structure
[Only for monorepos or complex structures]
- `apps/` - Application entry points
- `packages/` - Shared libraries
## Development Commands
- Install: `command`
- Test: `command`
- Build: `command`
## Critical Conventions
[Only non-obvious, high-impact conventions]
- Convention 1 with brief explanation
- Convention 2 with brief explanation
## Known Issues / Gotchas
[Things that consistently trip up developers]
- Issue 1
- Issue 2
6. Anti-Patterns to Avoid
DO NOT include:
- Code style guidelines (use linters)
- Documentation on how to use Claude
- Long explanations of obvious patterns
- Copy-pasted code examples
- Generic best practices ("write clean code")
- Instructions for specific tasks
- Auto-generated content
- Extensive TODO lists
7. Validation Checklist
Before finalizing, verify:
- Kept under 200 lines; shorter is better
- Every line applies to ALL sessions
- No style/formatting rules
- No code snipp
Pertanyaan umum
Mengapa file harus singkat?
Skill ini menyebutkan bahwa model AI tercanggih hanya dapat mengikuti sekitar 150 hingga 200 instruksi, dan system prompt sudah memakai sebagian dari batas itu.
Apakah agent menulisnya secara otomatis?
Tidak. Skill ini melarang pembuatan otomatis dan meminta file ditulis dengan tangan secara cermat.
Bisakah agent bekerja pada file di subfolder?
Bisa. Anda dapat memberikan path, misalnya subdirektori, untuk instruksi yang hanya berlaku pada folder tersebut.
Detail
Deskripsi asli dari pembuat
Create or update CLAUDE.md files following best practices for optimal AI agent onboarding
repo: luongnv89/claude-howto
Popularitas
- Bintang GitHub
- 46k
- Peringkat
- #6321
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
lesson-quiz
46kMemberi Anda kuis tentang satu pelajaran tutorial Claude Code dengan 10 pertanyaan, menilai jawaban Anda, dan menunjukkan topik yang perlu diulang.
self-assessment
46kMemberi Anda kuis tentang 10 area fitur Claude Code, lalu skor per topik dan jalur belajar untuk apa yang harus dipelajari berikutnya.
blog-draft
46kMemandu agent Anda menyusun draf postingan blog dari ide dan sumber Anda, langkah demi langkah, dengan versi yang dicatat selama proses.
code-review-specialist
46kMemeriksa kode dari sisi keamanan, performa, dan kemudahan pemeliharaan, dengan daftar periksa dan temuan yang ditulis jelas.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.