CLAUDE.md
vi/CLAUDE.mdCLAUDE.md
Quality
97/100
Scores the file, not the repository.Length
985 words
30 headings · 7 code blocksRepository
41k
— · pushed 5 days agoLast changed
3 days ago
First indexed 3 days ago.1# CLAUDE.md23File này cung cấp hướng dẫn cho Claude Code (claude.ai/code) khi làm việc với code trong repository này.45## Tổng Quan Dự Án67Claude How To là một repository tutorial về các tính năng của Claude Code. Đây là **documentation-as-code** — sản phẩm chính là các file markdown được tổ chức thành các module học tập đánh số (01-10), không phải một ứng dụng thực thi.89**Kiến trúc**: Mỗi module (01-10) bao phủ một tính năng cụ thể của Claude Code với các template copy-paste, sơ đồ Mermaid, và ví dụ. Hệ thống build xác thực chất lượng documentation và tạo ebook EPUB.1011## Các Lệnh Thường Dùng1213### Kiểm Tra Chất Lượng Pre-commit1415Tất cả documentation phải vượt qua bốn kiểm tra chất lượng trước khi commit (các kiểm tra này chạy tự động qua pre-commit hooks):1617```bash18# Cài đặt pre-commit hooks (chạy trên mỗi commit)19pre-commit install2021# Chạy tất cả các kiểm tra thủ công22pre-commit run --all-files23```2425Bốn kiểm tra là:261. **markdown-lint** — Cấu trúc và định dạng Markdown qua `markdownlint`272. **cross-references** — Liên kết nội bộ, anchors, cú pháp code fence (Python script)283. **mermaid-syntax** — Xác thực tất cả sơ đồ Mermaid parse đúng (Python script)294. **link-check** — Các URL bên ngoài có thể truy cập được (Python script)305. **build-epub** — EPUB tạo ra không có lỗi (khi có thay đổi `.md`)3132### Thiết Lập Môi Trường Phát Triển3334```bash35# Cài đặt uv (Python package manager)36pip install uv3738# Tạo virtual environment và cài đặt Python dependencies39uv venv40source .venv/bin/activate41uv pip install -r scripts/requirements-dev.txt4243# Cài đặt Node.js tools (markdown linter và Mermaid validator)44npm install -g markdownlint-cli45npm install -g @mermaid-js/mermaid-cli4647# Cài đặt pre-commit hooks48uv pip install pre-commit49pre-commit install50```5152### Testing5354Các script Python trong `scripts/` có unit tests:5556```bash57# Chạy tất cả tests58pytest scripts/tests/ -v5960# Chạy với coverage61pytest scripts/tests/ -v --cov=scripts --cov-report=html6263# Chạy test cụ thể64pytest scripts/tests/test_build_epub.py -v65```6667### Chất Lượng Code6869```bash70# Lint và format Python code71ruff check scripts/72ruff format scripts/7374# Security scan75bandit -c scripts/pyproject.toml -r scripts/ --exclude scripts/tests/7677# Type checking78mypy scripts/ --ignore-missing-imports79```8081### Build EPUB8283```bash84# Tạo ebook (render Mermaid diagrams qua Kroki.io API)85uv run scripts/build_epub.py8687# Với các tùy chọn88uv run scripts/build_epub.py --verbose --output custom-name.epub --max-concurrent 589```9091## Cấu Trúc Thư Mục9293```94├── 01-slash-commands/ # Các lối tắt do người dùng gọi95├── 02-memory/ # Ví dụ về bối cảnh liên tục96├── 03-skills/ # Các khả năng có thể tái sử dụng97├── 04-subagents/ # Các tác nhân AI chuyên dụng98├── 05-mcp/ # Ví dụ Model Context Protocol99├── 06-hooks/ # Tự động hóa dựa trên sự kiện100├── 07-plugins/ # Các tính năng được đóng gói101├── 08-checkpoints/ # Các snapshot của phiên102├── 09-advanced-features/ # Lập kế hoạch, suy nghĩ, background tasks103├── 10-cli/ # Tham chiếu CLI104├── scripts/105│ ├── build_epub.py # EPUB generator (render Mermaid qua Kroki API)106│ ├── check_cross_references.py # Xác thực liên kết nội bộ107│ ├── check_links.py # Kiểm tra các URL bên ngoài108│ ├── check_mermaid.py # Xác thực cú pháp Mermaid109│ └── tests/ # Unit tests cho scripts110├── .pre-commit-config.yaml # Định nghĩa các kiểm tra chất lượng111└── README.md # Hướng dẫn chính (cũng là index của module)112```113114## Hướng Dẫn Nội Dung115116### Cấu Trúc Module117118Mỗi thư mục đánh số tuân theo pattern:119- **README.md** — Tổng quan về tính năng với các ví dụ120- **Các file ví dụ** — Template copy-paste (`.md` cho commands, `.json` cho configs, `.sh` cho hooks)121- Các file được tổ chức theo độ phức tạp của tính năng và dependencies122123### Sơ Đồ Mermaid124- Tất cả sơ đồ phải parse thành công (được kiểm tra bởi pre-commit hook)125- EPUB build render sơ đồ qua Kroki.io API (cần internet)126- Sử dụng Mermaid cho flowcharts, sequence diagrams, và architecture visuals127128### Cross-References129- Sử dụng relative paths cho internal links (ví dụ: `(01-slash-commands/README.md)`)130- Code fences phải chỉ định ngôn ngữ (ví dụ: ` ```bash `, ` ```python `)131- Anchor links sử dụng format `#heading-name`132133### Link Validation134- Các URL bên ngoài phải có thể truy cập được (được kiểm tra bởi pre-commit hook)135- Tránh link đến nội dung tạm thời136- Sử dụng permalinks nếu có thể137138## Các Điểm Kiến Trúc Quan Trọng1391401. **Các thư mục đánh số thể hiện thứ tự học tập** — Prefix 01-10 thể hiện thứ tự được khuyến nghị để học các tính năng của Claude Code. Đánh số này có chủ đích; không tổ chức lại theo bảng chữ cái.1411422. **Scripts là các tiện ích, không phải sản phẩm** — Các script Python trong `scripts/` hỗ trợ chất lượng documentation và tạo EPUB. Nội dung thực tế nằm trong các thư mục module đánh số.1431443. **Pre-commit là người gác cổng** — Tất cả bốn kiểm tra chất lượng phải pass trước khi PR được chấp nhận. CI pipeline chạy các kiểm tra tương tự như lần thứ hai.1451464. **Mermaid rendering cần network** — EPUB build gọi Kroki.io API để render diagrams. Các lỗi build ở đây thường là vấn đề network hoặc cú pháp Mermaid không hợp lệ.1471485. **Đây là tutorial, không phải thư viện** — Khi thêm nội dung, tập trung vào giải thích rõ ràng, ví dụ copy-paste, và sơ đồ trực quan. Giá trị nằm ở việc dạy các khái niệm, không cung cấp code có thể tái sử dụng.149150## Commit Conventions151152Tuân theo format conventional commit:153- `feat(slash-commands): Add API documentation generator`154- `docs(memory): Improve personal preferences example`155- `fix(README): Correct table of contents link`156- `refactor(hooks): Simplify hook configuration examples`157158Scope nên khớp với tên thư mục khi áp dụng.159
Also in luongnv89/claude-howto
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| luongnv89/claude-howtoCLAUDE.md · 41k | CLAUDE.md | buildtestlint-formatgit+3 | 88/100 | 3 days ago | |
| luongnv89/claude-howtoja/CLAUDE.md · 41k | CLAUDE.md | setuptestlint-formatgit+2 | 90/100 | 3 days ago | |
| luongnv89/claude-howtouk/CLAUDE.md · 41k | CLAUDE.md | setuptestlint-formattypes+6 | 90/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| stacklok/toolhiveCLAUDE.md · 2.0k | CLAUDE.md | buildteststylearch+4 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 950 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| livewire/livewireCLAUDE.md · 24k | CLAUDE.md | setupbuildteststyle+4 | 100/100 | 3 days ago |
