Nâng caoHướng dẫnClaude CodeCộng đồng

Setup Claude Code Chuyên Nghiệp 2026: MCP Servers, Hooks, Skills Và Obsidian Second Brain

Nghe bài viết
00:00

Điểm nổi bật

Nhấn để đến mục tương ứng

  1. 1 Phù hợp nếu dùng vài tiếng/ngày, không phải daily driver Claude Max ($100/tháng): Unlimited usage = không lo bị dừng giữa chừng khi agent đang chạy Với workflow autonomous (agent chạy nhiều giờ), Max không phải luxury — đó là điều kiện để làm việc được.
  2. 2 "Claude Code is basically a 'while True' loop that receives tasks, selects appropriate tools, executes them, and determines next steps independently." Đây là autonomous agent chạy liên tục, không phải chatbot trả lời từng câu hỏi. Để hiểu cách setup Claude Code đúng cách, trước tiên cần hiểu nó thực sự là gì.
  3. 3 Không phải nơi viết "hãy luôn lịch sự" hay "hãy viết code clean" — đó là nơi mô tả: File CLAUDE.md ở root project là bước setup quan trọng nhất. File nào ở đâu, naming conventions, restricted areas Routing rules:.
  4. 4 Trigger deployment sau khi hoàn thành feature Restart services khi gặp lỗi Check deployment status tự động Kết quả: MCP (Model Context Protocol) cho phép Claude Code kết nối với external services. Coolify MCP — Self-Deployment Coolify là platform self-hosted cho deployment.
  5. 5 Mỗi skill là một markdown file với YAML frontmatter — không cần compile, không cần SDK. Generate and execute SQL queries on Dune Analytics for TON blockchain data. Skills trong Claude Code được lưu ở /.claude/skills/ . Use when asked about blockchain metrics, token flows, or on-chain statistics.
brown and white floor tiles

Claude Code Không Phải Chatbot — Đây Là Vòng Lặp Tự Trị

Để hiểu cách setup Claude Code đúng cách, trước tiên cần hiểu nó thực sự là gì. Daniil Okhlopkov mô tả chính xác nhất:

"Claude Code is basically a 'while True' loop that receives tasks, selects appropriate tools, executes them, and determines next steps independently."

Đây là autonomous agent chạy liên tục, không phải chatbot trả lời từng câu hỏi. Khi hiểu điều này, bạn sẽ biết tại sao setup đúng quan trọng hơn nhiều so với việc "thêm dần tính năng theo nhu cầu."

Okhlopkov đã publish setup guide chi tiết ngày 23/02/2026 sau nhiều tháng thử nghiệm. Bài viết này tổng hợp những gì thực sự quan trọng từ setup của ông.

Pricing: Khi Nào Cần Max?

Trước khi đi vào kỹ thuật, câu hỏi thực tế nhất:

  • Claude Pro ($20/tháng): Phù hợp nếu dùng vài tiếng/ngày, không phải daily driver
  • Claude Max ($100/tháng): Cần thiết nếu Claude Code là công cụ chính. Unlimited usage = không lo bị dừng giữa chừng khi agent đang chạy

Với workflow autonomous (agent chạy nhiều giờ), Max không phải luxury — đó là điều kiện để làm việc được.

CLAUDE.md: Hệ Điều Hành Cho Agent

File CLAUDE.md ở root project là bước setup quan trọng nhất. Không phải nơi viết "hãy luôn lịch sự" hay "hãy viết code clean" — đó là nơi mô tả:

  • Cấu trúc project: File nào ở đâu, naming conventions, restricted areas
  • Routing rules: Loại task nào dùng approach nào
  • Project-specific context: Tech stack, dependencies đặc biệt, quirks của codebase
  • Behavioral boundaries: Những gì agent không được chạm vào

Ví dụ thực tế từ Okhlopkov:

# CLAUDE.md

## Project Structure
- /src: Core application code
- /tests: Unit and integration tests (DO NOT modify without explicit instruction)
- /scripts: Utility scripts, safe to modify
- /config: Configuration files — NEVER commit changes here

## Routing Rules
- Database migrations → always create new file, never edit existing
- API endpoints → check /docs/api-spec.md first
- Frontend components → use existing design tokens from /src/design-system

## Tech Stack
- Node.js 20, TypeScript strict mode
- PostgreSQL via Prisma
- All async functions must handle errors explicitly

MCP Server Integration: 3 Tích Hợp Thực Sự Hữu Ích

MCP (Model Context Protocol) cho phép Claude Code kết nối với external services. Okhlopkov cấu hình qua file .mcp.json. Ba tích hợp ông thực sự dùng:

1. Coolify MCP — Self-Deployment

Coolify là platform self-hosted cho deployment. Với MCP connector, Claude Code có thể:

  • Trigger deployment sau khi hoàn thành feature
  • Restart services khi gặp lỗi
  • Check deployment status tự động

Kết quả: agent có thể code, test, và deploy trong cùng một session mà không cần human intervention.

2. Telegram MCP — Thông Báo Và Input

Telegram connector mở ra workflow thú vị:

  • Gửi voice note trong Telegram → tự động transcribe → Claude process
  • Agent gửi thông báo khi hoàn thành task dài
  • Send questions to human khi cần clarification

Đây là cách biến Telegram thành giao diện tương tác với agent đang chạy nền.

3. Codex MCP — Cross-Model Review

Setup được nhiều developer copy nhất:

"I also use Codex MCP for dual-model review. Claude writes a plan, sends it to OpenAI's Codex for an independent review, then incorporates the feedback. Two AI agents cross-checking each other."

Flow: Claude Code viết implementation plan → gửi sang Codex review độc lập → Claude nhận feedback → implement với awareness về potential issues. "High catch rate" — bắt được bugs mà single-model review bỏ qua.

Skills Architecture: Markdown Files Là Superpowers

Skills trong Claude Code được lưu ở ~/.claude/skills/. Mỗi skill là một markdown file với YAML frontmatter — không cần compile, không cần SDK.

Okhlopkov có 3 skills thực tế:

ton-analyst Skill

---
name: ton-analyst
description: Generate and execute SQL queries on Dune Analytics for TON blockchain data. Use when asked about blockchain metrics, token flows, or on-chain statistics.
---

# TON Blockchain Analyst

When analyzing TON blockchain data:
1. Connect to Dune Analytics API
2. Use ton.* table namespace for all queries
3. Always include time range filters for performance
4. Output results as structured JSON with explanation

## Common Query Patterns
- Token flows: SELECT from ton.transfers WHERE...
- Wallet activity: JOIN ton.wallets with ton.transactions...

ton-profiler Skill

Skill để trace wallet connections, tìm related addresses, phân tích funding patterns. Quan trọng cho due diligence và fraud detection trong blockchain projects.

crosspost Skill

Skill phức tạp nhất: nhận một bài viết → tạo phiên bản phù hợp cho nhiều platform (Twitter/X, LinkedIn, Telegram channel, Medium) với ngôn ngữ phù hợp từng platform — và hỗ trợ multilingual.

Pre-Commit Hooks: Bảo Vệ Dữ Liệu Nhạy Cảm

Khi agent hoạt động autonomous, risk lớn nhất là vô tình commit sensitive data. Hook này được Okhlopkov share và cộng đồng adopt rộng rãi:

#!/bin/bash
# .git/hooks/pre-commit

# Block sensitive file commits
if git diff --cached --name-only | grep -qE '.(env|key|pem)$|creds.md'; then
  echo "BLOCKED: Attempting to commit sensitive files"
  echo "Files flagged:"
  git diff --cached --name-only | grep -E '.(env|key|pem)$|creds.md'
  exit 1
fi

# Block large binary files
if git diff --cached --name-only | xargs -I {} sh -c 'test -f "{}" && test $(stat -f%z "{}") -gt 5242880' 2>/dev/null; then
  echo "BLOCKED: File larger than 5MB detected"
  exit 1
fi

echo "Pre-commit checks passed"
exit 0

Hook chạy trước mỗi commit, block ngay nếu phát hiện file nhạy cảm. Với unattended operation, đây là safety net thiết yếu.

Autonomous Workflows: Subagents Và Team Structure

Với tác vụ lớn (như nghiên cứu blockchain mất cả đêm), Okhlopkov dùng cấu trúc team subagents:

  • Research agent: Thu thập data từ nhiều nguồn song song
  • Analysis agent: Xử lý và tổng hợp data thô
  • Writing agent: Viết từng section của report
  • Review agent: Check consistency và fact-check

Kết quả case study blockchain: 30 trang report, 15 biểu đồ, 40+ SQL queries — hoàn thành trong một buổi tối thay vì một tuần làm việc.

Obsidian Vault: Second Brain Cho AI Agent

Setup cuối cùng và có lẽ độc đáo nhất của Okhlopkov:

"Everything above connects through one idea: the agent lives inside my Obsidian vault."

Obsidian vault chứa toàn bộ: notes, project files, tasks, voice transcripts, reference materials — tất cả trong markdown. MCP connector kết nối Claude tới vault này.

Workflow hoàn chỉnh:

  1. Ghi voice note trong Telegram khi đang đi đường
  2. Telegram MCP → transcribe audio → lưu vào Obsidian inbox
  3. Claude tự pick up notes từ inbox → process → tạo tasks hoặc research
  4. Kết quả được lưu lại vào Obsidian theo structure định sẵn

Agent không chỉ làm việc cho bạn — nó sống trong knowledge system của bạn, có context về mọi thứ bạn đang nghĩ và làm.

Kết Luận: Setup Đúng Từ Đầu

Sự khác biệt giữa người dùng bình thường và power user không phải ở việc dùng nhiều tính năng hơn — mà ở việc setup đúng kiến trúc từ đầu:

  1. CLAUDE.md chi tiết và project-specific (không phải generic)
  2. MCP servers cho những integrations bạn thực sự cần
  3. Skills được viết tốt với trigger descriptions rõ ràng
  4. Pre-commit hooks như safety net
  5. Một "source of truth" cho agent (Obsidian hoặc tương đương)

Muốn bắt đầu? Xem thêm về Claude CodeClaude API. Sau khi có nền tảng, quay lại setup guide này để nâng cấp dần từng layer.


Nguồn Tham Khảo

Bài viết dựa trên: "My Claude Code Setup in 2026: MCP Servers, Hooks, Skills, and What I Actually Use" bởi Daniil Okhlopkov, đăng ngày 23/02/2026. Link gốc: okhlopkov.com

Tính năng liên quan:mcphooksskillsmulti-agentclaude-md

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ẻ.

Bình luận (0)
Ảnh đại diện
Đăng nhập để bình luận...
Đăng nhập để bình luận
  • Đang tải bình luận...

Đăng ký nhận bản tin

Nhận bài viết hay nhất về sản phẩm và vận hành, gửi thẳng vào hộp thư của bạn.

Bảo mật thông tin. Hủy đăng ký bất cứ lúc nào. Chính sách bảo mật.