45+ Claude Code Tips Từ GitHub: Voice Input, Self-Audit và Các Kỹ Thuật Nâng Cao
Điểm nổi bật
Nhấn để đến mục tương ứng
- 1 Đây là claim đáng ngạc nhiên với developer — những người quen nghĩ rằng coding = typing. A common objection is 'what if you're in a room with other people?' I just whisper using earphones." Cách Setup Voice Input Hai tool được recommend:.
- 2 Prompt này được nhiều developer trong cộng đồng xác nhận là "seems to work really well": Double check everything, every single claim in what you produced and at the end make a table of what you were able to verify.
- 3 Bắt đầu conversation mới cho mỗi topic khác nhau Không kéo dài một session vô tận — quality giảm dần khi context lớn Tạo "handoff document" tóm tắt trước khi bắt đầu conversation mới Cách Tạo Handoff Document Trước khi kết thúc session dài, yêu cầu Claude:.
- 4 Commit messages (descriptive, consistent format) Branch naming conventions PR descriptions Changelog generation từ commits Tuy nhiên có một safety rule quan trọng: Claude có thể tự động pull changes nhưng push phải qua human approval. ykdojo recommend để Claude xử lý gần như toàn bộ git workflow:.
- 5 Aliases Hữu Ích .zshrc hoặc .bashrc alias c="claude" Claude Code shortcut alias ch="claude --browser" Claude với Chrome integration alias cr="claude --resume" Resume recent conversation Custom Status Line ykdojo recommend setup terminal status line hiển thị:.
Repository 1100+ Stars Và Những Gì Developer Thực Sự Dùng
Khi một GitHub repository về Claude Code tips đạt 1100+ stars, đó không phải ngẫu nhiên. Repository ykdojo/claude-code-tips với 45+ tips đã trở thành go-to reference cho developer muốn sử dụng Claude Code hiệu quả hơn.
Điểm đặc biệt của repo này: mỗi tip đến từ kinh nghiệm thực tế, không phải theory. ykdojo test, iterate, và chỉ giữ những gì thực sự hoạt động trong production workflow.
Tip Được Nhắc Đến Nhiều Nhất: Voice Input
ykdojo tuyên bố rõ ràng: voice input nhanh hơn gõ phím cho hầu hết người dùng. Đây là claim đáng ngạc nhiên với developer — những người quen nghĩ rằng coding = typing.
"I think for a majority of people, it's going to be faster too. A common objection is 'what if you're in a room with other people?' I just whisper using earphones."
Cách Setup Voice Input
Hai tool được recommend:
- MacWhisper: Chạy local, privacy-friendly, transcription quality cao
- Parakeet: Open source, nhanh, hoạt động offline
Lợi ích ít ai nghĩ đến: Claude thông minh trong việc interpret transcription errors. Nếu bạn nói "functon" thay vì "function," Claude hiểu. Nếu bạn nói "the auth slash login route," Claude biết bạn muốn nói về /auth/login.
Kết quả thực tế: nhiều developer báo cáo communicate được nhiều context hơn trong cùng thời gian so với gõ phím — đặc biệt khi cần describe complex business logic hay intent phức tạp.
Tip Được r/ClaudeAI Vote Nhiều Nhất: Double Check Everything
Prompt này được nhiều developer trong cộng đồng xác nhận là "seems to work really well":
Double check everything, every single claim in what you produced
and at the end make a table of what you were able to verify.
Cách hoạt động: Claude tạo verification table sau mỗi response, liệt kê:
- Claim nào có source code để back up
- Claim nào là inference có cơ sở logic
- Claim nào là assumption cần verify thêm
Kết quả: tăng đáng kể accuracy trong các tasks như:
- Security review (claim "this code is safe" → must verify)
- Performance analysis (claim "this is O(n²)" → must verify)
- Dependency research (claim "library X supports feature Y" → must verify)
- Architecture decisions (claim "this pattern solves Z" → must verify)
Context Management: "AI Context Is Like Milk"
Một trong những metaphors hay nhất trong repo:
"AI context is like milk; it's best served fresh and condensed!"
Ý nghĩa thực tiễn:
- Bắt đầu conversation mới cho mỗi topic khác nhau
- Không kéo dài một session vô tận — quality giảm dần khi context lớn
- Tạo "handoff document" tóm tắt trước khi bắt đầu conversation mới
Cách Tạo Handoff Document
Trước khi kết thúc session dài, yêu cầu Claude:
"Tạo một handoff document tóm tắt:
1. Những thay đổi đã implement trong session này
2. Context quan trọng về codebase
3. Decisions và reasoning đã thảo luận
4. TODO items còn lại
5. Known issues và cách reproduce
Save vào HANDOFF-[date].md"
Conversation mới bắt đầu bằng: "Read HANDOFF-[date].md và tiếp tục từ đó."
Git Integration: Delegate Toàn Bộ Git Workflow
ykdojo recommend để Claude xử lý gần như toàn bộ git workflow:
- Commit messages (descriptive, consistent format)
- Branch naming conventions
- PR descriptions
- Changelog generation từ commits
Tuy nhiên có một safety rule quan trọng: allow pull, restrict push. Claude có thể tự động pull changes nhưng push phải qua human approval. Điều này prevent accidental force pushes hay commits lên wrong branch.
Kết hợp với Claude Code trong terminal, workflow này đặc biệt hiệu quả khi làm việc với feature branches phức tạp.
Terminal Setup: Aliases và Custom Status Line
Aliases Hữu Ích
# .zshrc hoặc .bashrc
alias c="claude" # Claude Code shortcut
alias ch="claude --browser" # Claude với Chrome integration
alias cr="claude --resume" # Resume recent conversation
Custom Status Line
ykdojo recommend setup terminal status line hiển thị:
- Model đang dùng (Haiku/Sonnet/Opus)
- Working directory
- Git branch hiện tại
- Context usage % (để biết khi nào nên reset)
- Recent conversation topics
Điều này giúp maintain awareness về "state" của AI session — tránh tình huống không biết mình đang ở tháng thứ mấy của conversation.
Problem Decomposition: Break Trước Khi Code
Pattern được nhiều developer xác nhận trong repo:
# Thay vì:
"Build a user authentication system"
# Hãy decompose:
"Trước khi implement, hãy:
1. List tất cả components cần build
2. Identify dependencies giữa chúng
3. Suggest implementation order
4. Highlight potential pitfalls
5. Ước lượng complexity của mỗi part
Sau khi có plan, đợi approval trước khi bắt đầu code."
Kết quả: ít surprises, dễ review progress, và dễ stop/restart nếu cần.
Kỹ Thuật Nâng Cao: Tmux Cho Autonomous Tasks
Với developer dùng Claude Code cho các tasks dài (như git bisect để tìm regression, hay extensive test runs), ykdojo recommend dùng tmux:
# Tạo tmux session riêng cho Claude Code
tmux new-session -s claude-session
# Trong session đó, chạy Claude với task dài
claude "Run git bisect để tìm commit gây ra test failures.
Start từ HEAD, known good là v2.1.0.
Report khi tìm thấy bad commit."
# Detach và làm việc khác
Ctrl+B then D
# Reattach sau để check progress
tmux attach -t claude-session
Claude làm việc tự động trong background, bạn tiếp tục làm việc khác.
Web Content: Khi Claude Code Không Fetch Được
Một tip thực tế khi gặp websites Claude Code không thể fetch (paywall, JS-heavy, auth required):
- Cmd+A, Ctrl+C: Select all content trong trình duyệt, copy, paste vào Claude
- Gemini CLI làm fallback: Một số sites bị block với Claude nhưng accessible với Gemini CLI
- Browser DevTools: Copy Network response JSON trực tiếp cho API-driven content
Browser Automation: Playwright vs Claude in Chrome
Insight quan trọng cho developer: với non-visual browser automation (scraping, form filling, data extraction), Playwright hoạt động tốt hơn Claude in Chrome.
Lý do: Playwright có deterministic behavior, better error handling, và dễ debug hơn. Claude in Chrome tốt hơn cho intelligent tasks cần reasoning (như "find the best hotel given these criteria") — không phải mechanical tasks ("click button X, extract value Y").
Rule of thumb: nếu bạn có thể viết Playwright script cho task đó → dùng Playwright. Nếu task cần judgment → dùng Claude in Chrome.
Kết Luận: Tips Nhỏ, Tác Động Lớn
45+ tips trong repo ykdojo không có tip nào revolutionary — tất cả đều là incremental improvements. Nhưng khi áp dụng cùng nhau, chúng tạo ra sự khác biệt rõ rệt trong daily workflow.
Bắt đầu với những gì dễ nhất:
- Thêm "double check" vào cuối prompts quan trọng
- Thử voice input cho một ngày
- Setup .claudeignore nếu chưa có
- Tạo terminal aliases
Sau 1 tuần, thêm handoff documents và proper session management. Sau 1 tháng, bạn sẽ không nhớ mình từng làm việc khác đi.
Đọc thêm: CLAUDE.md Masterclass — Tối ưu workspace cho Claude Code để setup môi trường hoàn chỉnh.
Nguồn tham khảo
Bài viết dựa trên: 40+ Claude Code Tips: From Basics to Advanced — ykdojo, GitHub (1100+ stars).
Bai viet co huu ich khong?
Bản quyền thuộc về tác giả. Vui lòng dẫn nguồn khi chia sẻ.





