Pro Claude Code Mastery — Chương trình chi tiết
Nguồn pedagogy: Claude Code Docs — Becoming a Claude Code Pro. Khóa dạy quản lý context và verification loop, không chỉ prompt.
PHẦN A — Bài giảng nền: Becoming a Claude Code Pro
1. Thay đổi tư duy: Từ Chatbot sang môi trường Agentic
- Môi trường agentic tự chủ: Claude Code đọc file, chạy terminal, sửa mã, lặp đến khi xong. Vai trò của bạn: định hướng, mô tả mục tiêu, giám sát chất lượng.
- Context Window — tài nguyên quan trọng nhất: Mọi tin nhắn, file đọc, output terminal đều tốn token. Gần giới hạn → chất lượng giảm, quên chỉ dẫn. Pro = quản lý context xuất sắc.
2. Năm trụ cột kỹ thuật
① Verification Loop (kiểm chứng tự động)
- Khép kín vòng: test, build, linter, screenshot UI → Pass/Fail.
- Trong prompt: yêu cầu chạy check sau mỗi sửa.
/goal: điều kiện mục tiêu tự đánh giá mỗi lượt.
- Stop Hooks: chặn dừng nếu script chưa pass.
- Adversarial Subagent: Writer/Reviewer độc lập.
② Explore → Plan → Implement → Commit
- Plan Mode:
Shift+Tab hoặc claude --permission-mode plan — chỉ đọc, không sửa.
- Explore → Plan (
Ctrl+G sửa plan) → Implement (kèm test) → Commit + PR.
- Fix nhỏ (typo, rename): có thể bỏ Plan.
③ Môi trường & Extensions
CLAUDE.md: /init — quy tắc cố định; chỉ giữ điều Claude không suy ra được; /doctor dọn thừa.
- Skills
.claude/skills/ — load khi cần.
- Subagents
.claude/agents/ — context riêng (Security Reviewer…).
- Hooks
.claude/settings.json — linter sau edit.
- MCP:
claude mcp add — Notion, Figma, DB.
- CLI:
gh, aws, sentry-cli cho Claude.
④ Context & Session
/clear, /compact, /btw — cắt context.
- Subagent research — giữ context chính sạch.
- Esc dừng sai hướng; Esc+Esc /
/rewind checkpoint.
/rename, claude --continue, claude --resume.
⑤ Scale & Automate
claude -p non-interactive, JSON output — CI/CD, pre-commit.
- Git worktrees, Agent Teams, Writer/Reviewer song song.
/batch, fan-out script — migration hàng loạt.
claude --permission-mode auto — auto an toàn.
3. Anti-patterns
| ❌ |
Mô tả |
| Kitchen Sink Session |
Nhiều task không liên quan → context rác |
Sửa lặp >2 lần không /clear |
Viết lại prompt rõ hơn |
CLAUDE.md quá dài |
Claude bỏ qua quy tắc quan trọng |
| Trust without verify |
Không test/linter tự động |
| Nghiên cứu vô hạn |
Đọc hàng trăm file — giới hạn scope / Subagent |
PHẦN B — Lộ trình 5 Module
┌─────────────────────────────────────────────────────────────────────────┐
│ PRO CLAUDE CODE LEARNING PATH │
├─────────────────────────────────────────────────────────────────────────┤
│ Module 1: Foundation & Agentic Mindset │
│ Module 2: Core Workflows & Verification Loops │
│ Module 3: Environment Configuration & Extensions │
│ Module 4: Advanced Context & Session Control │
│ Module 5: Automation, Scaling & Multi-Agent Systems │
└─────────────────────────────────────────────────────────────────────────┘
Module 1 — Foundation & Agentic Mindset
| Bài |
Nội dung |
Artifact |
| 1.1 |
Claude Code vs chatbot AI |
Checklist vai trò agentic |
| 1.2 |
Context window & token cost |
Bảng theo dõi session |
| 1.3 |
Permissions, /sandbox, Auto mode |
Policy file mẫu |
Module 2 — Core Workflows & Verification
| Bài |
Nội dung |
Artifact |
| 2.1 |
Plan Mode (Shift+Tab, Ctrl+G) |
Plan file đã duyệt |
| 2.2 |
Prompt + @file, ảnh, URL, pipe |
Template prompt |
| 2.3 |
Tests, linter, UI screenshot diff |
Script verify Pass/Fail |
| 2.4 |
Claude phỏng vấn → SPEC.md |
SPEC đã chốt |
Module 3 — Environment & Extensions
| Bài |
Nội dung |
Artifact |
| 3.1 |
CLAUDE.md + /init, /doctor |
CLAUDE.md lean |
| 3.2 |
Custom Skills |
1 skill repo |
| 3.3 |
Custom Subagents |
Security reviewer agent |
| 3.4 |
Hooks + MCP |
Hook linter + 1 MCP |
Module 4 — Context & Session Control
| Bài |
Nội dung |
Artifact |
| 4.1 |
/clear, /compact, /btw |
Runbook reset context |
| 4.2 |
Subagent research |
Session sạch + báo cáo |
| 4.3 |
Checkpoints & /rewind |
Demo rewind |
| 4.4 |
/rename, --continue, --resume |
Session dài ngày |
Module 5 — Automation & Scaling
| Bài |
Nội dung |
Artifact |
| 5.1 |
claude -p trong CI |
Job GitHub Actions mẫu |
| 5.2 |
Worktrees, Agent Teams |
2 branch song song |
| 5.3 |
Writer/Reviewer, /code-review |
PR review log |
| 5.4 |
/batch, fan-out migration |
Script batch 10+ file |
Capstone
- Yêu cầu: Repo thật + verification loop bắt buộc + 1 automation
claude -p (CI hoặc hook) + tài liệu CLAUDE.md + 1 Skill hoặc Subagent.
- Rubric (100): Verification (25), Plan discipline (20), Context hygiene (20), Extensions (20), Demo 15.
Liên kết khóa khác