跳到主要内容

claude-md 精选

Tạo hoặc cập nhật các file CLAUDE.md theo các thực hành tốt nhất để onboarding tác nhân AI tối ưu

在 GitHub 打开

安装方式

cp -r vi/03-skills/claude-md ~/.claude/skills/claude-md-3

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/luongnv89/claude-howto.git

依赖与权限

  • 无需 API Key
  • 无需联网
  • 依赖外部命令:node bun pip uv cargo
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 luongnv89/claude-howto@065ab37 · 许可 MIT · 内容未修改

Đầu Vào Người Dùng

$ARGUMENTS

Bạn BẮT BUỘC phải xem xét đầu vào của người dùng trước khi tiếp tục (nếu không trống). Người dùng có thể chỉ định:

  • create - Tạo CLAUDE.md mới từ đầu
  • update - Cải thiện CLAUDE.md hiện có
  • audit - Phân tích và báo cáo về chất lượng CLAUDE.md hiện tại
  • Một đường dẫn cụ thể để tạo/cập nhật (ví dụ: src/api/CLAUDE.md cho hướng dẫn cụ thể thư mục)

Nguyên Tắc Cốt Lõi

LLMs là không trạng thái: CLAUDE.md là file duy nhất được bao gồm tự động trong mọi cuộc hội thoại. Nó phục vụ như tài liệu onboarding chính cho các tác nhân AI vào codebase của bạn.

Các Quy Tắc Vàng

  1. Less is More: Các LLM biên giới có thể theo ~150-200 hướng dẫn. System prompt của Claude Code đã sử dụng ~50. Giữ CLAUDE.md của bạn tập trung và ngắn gọn.
  1. Ứng Dụng Phổ Biến: Chỉ bao gồm thông tin liên quan đến MỌI phiên. Hướng dẫn cụ thể theo tác vụ thuộc về các file riêng.
  1. Đừng Sử Dụng Claude như Linter: Hướng dẫn phong cách làm phình bối cảnh và làm giảm khả năng tuân theo hướng dẫn. Sử dụng các công cụ xác định (prettier, eslint, v.v.) thay thế.
  1. Không Bao Giờ Tự Động Tạo: CLAUDE.md là điểm đòn bẩy cao nhất của hệ thống AI. Tạo nó thủ công với sự xem xét cẩn thận.

Quy Trình Thực Thi

1. Phân Tích Dự Án

Đầu tiên, phân tích trạng thái dự án hiện tại:

  1. Kiểm tra các file CLAUDE.md hiện có:
  • Cấp root: ./CLAUDE.md hoặc .claude/CLAUDE.md
  • Cụ thể thư mục: **/CLAUDE.md
  • Cấu hình người dùng toàn cầu: ~/.claude/CLAUDE.md
  1. Xác định cấu trúc dự án:
  • Technology stack (ngôn ngữ, frameworks)
  • Loại dự án (monorepo, ứng dụng đơn, library)
  • Công cụ phát triển (quản lý package, hệ thống build, trình chạy test)
  1. Xem lại tài liệu hiện có:
  • README.md
  • CONTRIBUTING.md
  • package.json, pyproject.toml, Cargo.toml, v.v.

2. Chiến Lược Nội Dung (WHAT, WHY, HOW)

Cấu trúc CLAUDE.md xung quanh ba chiều:

WHAT - Công Nghệ & Cấu Trúc

  • Tổng quan technology stack
  • Tổ chức dự án (đặc biệt quan trọng cho monorepos)
  • Các thư mục chính và mục đích của chúng

WHY - Mục Đích & Bối Cảnh

  • Dự án làm gì
  • Tại sao các quyết định kiến trúc nhất định được đưa ra
  • Mỗi thành phần chính chịu trách nhiệm cho gì

HOW - Workflow & Quy Ước

  • Workflow phát triển (bun vs node, pip vs uv, v.v.)
  • Thủ tục và lệnh testing
  • Phương pháp xác minh và build
  • Các "gotchas" quan trọng hoặc yêu cầu không rõ ràng

3. Chiến Lược Progressive Disclosure

Đối với các dự án lớn, khuyến nghị tạo thư mục agent_docs/:

agent_docs/
  |- building_the_project.md
  |- running_tests.md
  |- code_conventions.md
  |- architecture_decisions.md

Trong CLAUDE.md, tham khảo các file này với các hướng dẫn như:

Để có hướng dẫn build chi tiết, tham khảo `agent_docs/building_the_project.md`

Quan Trọng: Sử dụng các tham chiếu file:line thay vì các đoạn code để tránh bối cảnh lỗi thời.

4. Ràng Buộc Chất Lượng

Khi tạo hoặc cập nhật CLAUDE.md:

  1. Độ Dài Mục Tiêu: Dưới 300 dòng (lý tưởng dưới 100)
  2. Không Quy Tắc Phong Cách: Loại bỏ bất kỳ hướng dẫn linting/formatting nào
  3. Không Hướng Dẫn Cụ Theo Tác Vụ: Di chuyển sang các file riêng
  4. Không Đoạn Code: Sử dụng tham chiếu file thay thế
  5. Không Thông Tin Dư Thừa: Đừng lặp lại những gì trong package.json hoặc README

5. Các Phần Thiết Yếu

Một CLAUDE.md được cấu trúc tốt nên bao gồm:

# Tên Dự Án

Mô tả ngắn một dòng.

## Tech Stack
- Ngôn ngữ chính và phiên bản
- Frameworks/thư viện chính
- Database/lưu trữ (nếu có)

## Cấu Trúc Dự Án
[Chỉ cho monorepos hoặc cấu trúc phức tạp]
- `apps/` - Điểm vào ứng dụng
- `packages/` - Thư viện được chia sẻ

## Lệnh Phát Triển
- Install: `command`
- Test: `command`
- Build: `command`

## Quy Ước Quan Trọng
[Chỉ các quy ước không rõ ràng, tác động cao]
- Quy ước 1 với giải thích ngắn
- Quy ước 2 với giải thích ngắn

## Vấn Đế Đã Biết / Gotchas
[Những gì luôn làm các nhà phát triển vấp phải]
- Vấn đề 1
- Vấn đề 2

6. Các Anti-Patterns Cần Tránh

KHÔNG bao gồm:

  • Hướng dẫn phong cách code (sử dụng linters)
  • Tài liệu về cách sử dụng Claude
  • Giải thích dài về các mẫu rõ ràng
  • Các ví dụ code copy-paste
  • Thực hành tốt chung ("viết code sạch")
  • Hướng dẫn cho các tác vụ cụ thể
  • Nội dung được tạo tự động
  • Danh sách TODO mở rộng

7. Checklist Xác Minh

Trước khi hoàn thành, xác minh:

  • [ ] Dưới 300 dòng (lý tưởng dưới 100)
  • [ ] Mọi dòng áp dụng cho TẤT CẢ các phiên
  • [ ] Không quy tắc phong cách/formatting
  • [ ] Không đoạn code (sử dụng tham chiếu file)
  • [ ] Các lệnh được xác minh hoạt động
  • [ ] Progressive disclosure được sử dụng cho các dự án phức tạp
  • [ ] Các gotchas quan trọng được tài liệu hóa
  • [ ] Không dư thừa với README.md

Định Dạng Đầu Ra

Cho create hoặc mặc định:

  1. Phân tích dự án
  2. Soạn thảo CLAUDE.md theo cấu trúc ở trên
  3. Trình bày bản nháp để xem xét
  4. Ghi vào vị trí phù hợp sau khi được chấp thuận

Cho update:

  1. Đọc CLAUDE.md hiện có
  2. Kiểm tra theo các thực hành tốt nhất
  3. Xác định:
  • Nội dung để loại bỏ (quy tắc phong cách, đoạn code, cụ thể tác vụ)
  • Nội dung để cô đọng
  • Thông tin thiết bị còn thiếu
  1. Trình bày các thay đổi để xem xét
  2. Áp dụng các thay đổi sau khi được chấp thuận

Cho audit:

  1. Đọc CLAUDE.md hiện có
  2. Tạo một báo cáo với:
  • Số dòng hiện tại vs mục tiêu
  • Phần trăm nội dung áp dụng phổ biến
  • Danh sách các anti-patterns được tìm thấy
  • Khuyến nghị cải thiện
  1. KHÔNG chỉnh sửa file, chỉ báo cáo

Xử Lý AGENTS.md

Nếu người dùng yêu cầu tạo/cập nhật AGENTS.md:

Từ v2.1.277, Claude Code đọc AGENTS.md trực tiếp như hướng dẫn dự án — nhưng chỉ khi thư mục làm việc và mọi thư mục phía trên nó đều không có CLAUDE.md, .claude/CLAUDE.md, hay CLAUDE.local.md. ~/.claude/CLAUDE.md, CLAUDE.md được quản lý, và .claude/rules/ không tính vào kiểm tra đó và vẫn được tải song song. Hành vi này được điều khiển bởi Project instructions trong /config: claude-md-or-agents-md (mặc định), claude-md-and-agents-md, claude-md, hoặc managed-only. Ở nơi không hỗ trợ đọc trực tiếp — phiên bản trước v2.1.277 (trước v2.1.281 trên Bedrock/Vertex/Foundry, LLM gateway, hoặc khi telemetry bị tắt), hoặc phiên đầu tiên sau khi nâng cấp — hãy dùng cách dự phòng: import từ CLAUDE.md bằng @AGENTS.md, hoặc symlink CLAUDE.md tới nó.

AGENTS.md là file bối cảnh dự án dùng chung giữa nhiều công cụ — cùng loại tài liệu với CLAUDE.md, không phải định dạng định nghĩa tác nhân. Nó tồn tại để nhiều coding agent có thể dùng chung một bộ quy ước dự án:

  • Các lệnh build, test, và lint
  • Quy ước code style và kiến trúc
  • Bố cục repository và vị trí của các thành phần

Subagents được định nghĩa riêng, trong .claude/agents/*.md — không phải trong AGENTS.md.

Áp dụng các nguyên tắc tương tự:

  • Giữ tập trung và ngắn gọn
  • Sử dụng progressive disclosure
  • Tham khảo tài liệu bên ngoài thay vì nhúng nội dung

Ghi Chú

  • Luôn xác minh các lệnh hoạt động trước khi bao gồm chúng
  • Khi nghi ngờ, hãy loại bỏ - less is more
  • Lời nhắc hệ thống cho Claude biết rằng CLAUDE.md "có thể hoặc có thể không liên quan" - càng nhiều tiếng ồn, càng bị bỏ qua
  • Monorepos hưởng lợi nhất từ cấu trúc WHAT/WHY/HOW rõ ràng
  • Các file CLAUDE.md cụ thể thư mục nên được tập trung hơn nữa

质量与来源

所属仓库
luongnv89/claude-howto
仓库星标
4.2 万
最近更新
昨天
采集时间
今天
commit
065ab3734f64
内容指纹
sha256:499729e75bd7d9d
文件路径
vi/03-skills/claude-md/SKILL.md

同仓库其它 Skill

查看全部 25 个
lesson-quiz
Test a learner on a single Claude Code tutorial lesson (01-10) with 10 questions, scoring answers and flagging weak spots. Use before, during, or after a lesson. Don't use for whole-tutorial assessment or explaining a topic instead of testing it.
精选 luongnv89/claude-howto 4.2 万 原文
Claude CodeMCP 客户端
self-assessment
Comprehensive Claude Code self-assessment and learning path advisor. Runs a multi-category quiz covering 10 feature areas, produces a detailed skill profile with per-topic scores, identifies specific gaps, and generates a personalized learning path with prioritized next steps. Use when asked to "assess my level", "take the quiz", "find my level", "where should I start", "what should I learn next", "check my skills", "skill check", or "level up".
精选 luongnv89/claude-howto 4.2 万 原文
Claude CodeMCP 客户端
blog-draft
Draft a blog post from ideas and resources. Use when users want to write a blog post, create content from research, or draft articles. Guides through research, brainstorming, outlining, and iterative drafting with version control.
精选 luongnv89/claude-howto 4.2 万 原文
Claude CodeMCP 客户端
brand-voice
Ensure all communication matches brand voice and tone guidelines. Use when creating marketing copy, customer communications, public-facing content, or when users mention brand voice, tone, or writing style.
精选 luongnv89/claude-howto 4.2 万 原文
Claude CodeMCP 客户端
claude-md
Create or update CLAUDE.md files following best practices for optimal AI agent onboarding
精选 luongnv89/claude-howto 4.2 万 原文
Claude CodeMCP 客户端
code-review-specialist
Comprehensive code review with security, performance, and quality analysis. Use when users ask to review code, analyze code quality, evaluate pull requests, or mention code review, security analysis, or performance optimization.
精选 luongnv89/claude-howto 4.2 万 原文
Claude CodeMCP 客户端

相似 Skill

更多「写作」
interview-prep
Prepares the user for a specific interview from their real experience. Builds a story bank in Situation/Task/Action/Result/Reflection form mapped to the competencies the role and company test (such as Amazon's Leadership Principles), writes a cited company and role brief from public sources, predicts questions per round, drafts opener, why-us, weakness and salary answers, prepares questions to ask and a logistics checklist, and runs a post-interview debrief. Use when the user says "help me prepare for my interview", "I have an interview tomorrow" or "in 2 hours", "build my story bank", "STAR stories", "interviewing as a career changer", "what will they ask me", "how do I answer tell me about yourself", "questions to ask the interviewer", "research the company" or "debrief my interview". Uses Reactive Resume MCP tools when connected. For scored role-play practice, mock-interview; for thank-you notes and tracking, job-application-manager; for a salary number, offers or negotiation, offer-negotiation.
精选 reactive-resume/reactive-resume 4.4 万 原文
Claude CodeCodex CLIGemini CLI
job-application-manager
Runs the job-search pipeline. Adds jobs from a link or pasted posting, keeps stages and dates accurate, sets follow-ups, runs a weekly review (stale applications, next actions, funnel stats), records the exact resume version sent, and drafts networking, LinkedIn, referral, recruiter-reply, follow-up, thank-you, status-check, expedite and withdrawal messages without sending them. Use when the user says "add this job to my tracker", "I applied", "log my interview", "I got rejected", "I was ghosted", "log my offer", "track my applications", "do my weekly review", "what should I follow up on", "write a thank-you note", "message this recruiter", "ask for a referral", "withdraw my application", or wants a job-search spreadsheet. Works with a Markdown/CSV tracker or Reactive Resume MCP tools. Not for resume work (resume-tailor, resume-bullet-writer, resume-content-guide), interview prep or practice (interview-prep, mock-interview), or judging, negotiating, accepting or declining an offer (offer-negotiation).
精选 reactive-resume/reactive-resume 4.4 万 原文
Claude CodeCodex CLIGemini CLI
mock-interview
Runs a mock interview for a specific job description. Plays the interviewer in a chosen round (recruiter screen, hiring manager, behavioral, coding, system design, case, product sense, panel), persona and difficulty; asks one question at a time, probes vague answers, and gives quote-backed rubric scores after each answer (coach mode) or at the end (realistic). Model answers use only the user's real experience. Use when the user says "mock interview me", "interview me for this job", "practice interview", "pretend you're the interviewer", "grill me for this role", "run a behavioral round", "quick recruiter screen", "hiring-manager mock", "system design mock" or "case interview practice". With Reactive Resume MCP it reads the application and stories and logs the session. For a story bank, company brief, questions to ask or a real-interview debrief, interview-prep; for scheduling or thank-you notes, job-application-manager; for fixing the resume, resume-tailor; for negotiation practice, offer-negotiation.
精选 reactive-resume/reactive-resume 4.4 万 原文
Claude CodeCodex CLIGemini CLI
offer-negotiation
Evaluates and negotiates job offers. Decodes base, bonus, equity, sign-on, level and terms with unknowns kept unknown and each offer in its own currency, benchmarks against checkable pay data, finds true leverage, drafts one counter as email and call script, role-plays the recruiter, and handles the salary-expectations number, deadlines and extensions, "best and final", competing offers, counteroffers and written acceptance or decline. Country-aware (India CTC, 13th-month pay, public-sector scales). Use when the user says "I got an offer of...", "is this offer good", "should I negotiate", "how do I counter", "compare my offers", "what is my equity worth", "they asked my salary expectations", "they want an answer by Friday", "can I ask for more time", "should I accept" or "practice the negotiation call". Uses Reactive Resume MCP tools when connected. For logging the offer, its deadline and withdrawal notes, job-application-manager; for other interview answers, interview-prep.
精选 reactive-resume/reactive-resume 4.4 万 原文
Claude CodeCodex CLIGemini CLI
resume-builder
Builds a complete resume from scratch as Reactive Resume JSON that conforms to the schema and imports at https://rxresu.me. Asks for each missing detail instead of inventing it, then produces valid JSON (UUIDs, HTML descriptions, template and layout). Use when the user wants to create, build or generate a new resume, turn their work history into Reactive Resume JSON, or asks about the Reactive Resume schema, sections, templates or layout. For what belongs on a resume or a resume audit use resume-content-guide; for rewriting bullets, resume-bullet-writer; for fitting one job posting, resume-tailor; for tracking applications, job-application-manager; for interviews, interview-prep or mock-interview.
精选 reactive-resume/reactive-resume 4.4 万 原文
Claude CodeCodex CLIGemini CLI
resume-bullet-writer
Turns resume duties into truthful impact bullets. Questions the user role by role to dig out achievements, asks for real numbers or honest ranges (never invents them), and writes concise bullets in XYZ, CAR, scope or qualitative form. Use when the user says "rewrite my bullets", "make this bullet stronger", "quantify my resume", "turn my duties into achievements", "improve my experience section", "my resume sounds boring", "I don't have any numbers", pastes resume lines for feedback, or works in a low-number job (nursing, teaching, care, trades, admin, creative). With the Reactive Resume MCP server connected, it edits experience, project, volunteer and education descriptions with apply_resume_patch after the user approves. Use resume-content-guide instead for which sections or details belong and for summaries or headlines, resume-tailor to fit one job posting, interview-prep or mock-interview for interview stories and practice, and resume-builder to build a resume from scratch.
精选 reactive-resume/reactive-resume 4.4 万 原文
Claude CodeCodex CLIGemini CLI