Claude-Code / vi
CLAUDE.md1 starsChanged 8 months agoMITView on GitHub
File 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. Claude 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. 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,…
- Installs packages
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- uk/CLAUDE.mdCLAUDE.md
- lesson-quizSkill
- self-assessmentSkill
The file
Files
CLAUDE.md
File 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.
Tổng Quan Dự Án
Claude 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.
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.
Các Lệnh Thường Dùng
Kiểm Tra Chất Lượng Pre-commit
Tấ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):
# Cài đặt pre-commit hooks (chạy trên mỗi commit)
pre-commit install
# Chạy tất cả các kiểm tra thủ công
pre-commit run --all-filesBốn kiểm tra là:
- markdown-lint — Cấu trúc và định dạng Markdown qua
markdownlint - cross-references — Liên kết nội bộ, anchors, cú pháp code fence (Python script)
- mermaid-syntax — Xác thực tất cả sơ đồ Mermaid parse đúng (Python script)
- link-check — Các URL bên ngoài có thể truy cập được (Python script)
- build-epub — EPUB tạo ra không có lỗi (khi có thay đổi
.md)
Thiết Lập Môi Trường Phát Triển
# Cài đặt uv (Python package manager)
pip install uv
# Tạo virtual environment và cài đặt Python dependencies
uv venv
source .venv/bin/activate
uv pip install -r scripts/requirements-dev.txt
# Cài đặt Node.js tools (markdown linter và Mermaid validator)
npm install -g markdownlint-cli
npm install -g @mermaid-js/mermaid-cli
# Cài đặt pre-commit hooks
uv pip install pre-commit
pre-commit installTesting
Các script Python trong scripts/ có unit tests:
# Chạy tất cả tests
pytest scripts/tests/ -v
# Chạy với coverage
pytest scripts/tests/ -v --cov=scripts --cov-report=html
# Chạy test cụ thể
pytest scripts/tests/test_build_epub.py -vChất Lượng Code
# Lint và format Python code
ruff check scripts/
ruff format scripts/
# Security scan
bandit -c scripts/pyproject.toml -r scripts/ --exclude scripts/tests/
# Type checking
mypy scripts/ --ignore-missing-importsBuild EPUB
# Tạo ebook (render Mermaid diagrams qua Kroki.io API)
uv run scripts/build_epub.py
# Với các tùy chọn
uv run scripts/build_epub.py --verbose --output custom-name.epub --max-concurrent 5Cấu Trúc Thư Mục
├── 01-slash-commands/ # Các lối tắt do người dùng gọi
├── 02-memory/ # Ví dụ về bối cảnh liên tục
├── 03-skills/ # Các khả năng có thể tái sử dụng
├── 04-subagents/ # Các tác nhân AI chuyên dụng
├── 05-mcp/ # Ví dụ Model Context Protocol
├── 06-hooks/ # Tự động hóa dựa trên sự kiện
├── 07-plugins/ # Các tính năng được đóng gói
├── 08-checkpoints/ # Các snapshot của phiên
├── 09-advanced-features/ # Lập kế hoạch, suy nghĩ, background tasks
├── 10-cli/ # Tham chiếu CLI
├── scripts/
│ ├── build_epub.py # EPUB generator (render Mermaid qua Kroki API)
│ ├── check_cross_references.py # Xác thực liên kết nội bộ
│ ├── check_links.py # Kiểm tra các URL bên ngoài
│ ├── check_mermaid.py # Xác thực cú pháp Mermaid
│ └── tests/ # Unit tests cho scripts
├── .pre-commit-config.yaml # Định nghĩa các kiểm tra chất lượng
└── README.md # Hướng dẫn chính (cũng là index của module)Hướng Dẫn Nội Dung
Cấu Trúc Module
Mỗi thư mục đánh số tuân theo pattern:
- README.md — Tổng quan về tính năng với các ví dụ
- Các file ví dụ — Template copy-paste (
.mdcho commands,.jsoncho configs,.shcho hooks) - Các file được tổ chức theo độ phức tạp của tính năng và dependencies
Sơ Đồ Mermaid
- Tất cả sơ đồ phải parse thành công (được kiểm tra bởi pre-commit hook)
- EPUB build render sơ đồ qua Kroki.io API (cần internet)
- Sử dụng Mermaid cho flowcharts, sequence diagrams, và architecture visuals
Cross-References
- Sử dụng relative paths cho internal links (ví dụ:
(01-slash-commands/README.md)) - Code fences phải chỉ định ngôn ngữ (ví dụ:
```bash,```python) - Anchor links sử dụng format
#heading-name
Link Validation
- Các URL bên ngoài phải có thể truy cập được (được kiểm tra bởi pre-commit hook)
- Tránh link đến nội dung tạm thời
- Sử dụng permalinks nếu có thể
Các Điểm Kiến Trúc Quan Trọng
- 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.
- 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ố. - 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.
- 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ệ.
- Đâ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.
Commit Conventions
Tuân theo format conventional commit:
feat(slash-commands): Add API documentation generatordocs(memory): Improve personal preferences examplefix(README): Correct table of contents linkrefactor(hooks): Simplify hook configuration examples
Scope nên khớp với tên thư mục khi áp dụng.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

