Skip to main content

1MCP Agent: gom mọi MCP server về một cửa, và bớt ngốn context

· 10 min read
Nguyễn Huỳnh Minh Tiến
Middle Fullstack Developer @ Utop.vn
Summary

Dùng vài MCP server cho Claude Code, Cursor, Codex… thì sớm muộn bạn cũng phải khai báo lặp lại cùng một danh sách ở từng client, và mỗi server lại đổ toàn bộ schema tool vào context ngay khi phiên bắt đầu. 1MCP Agent (@1mcp/agent) là một proxy đứng giữa: bạn đăng ký các MCP server một lần, chạy 1mcp serve, rồi client nào cũng chỉ cần trỏ về một địa chỉ. Ngoài ra nó có chế độ CLI cho phép agent khám phá và gọi tool theo từng bước (instructions → inspect → run) để không phải nạp hết schema từ đầu.

Bài bắt đầu từ một vấn đề tôi gặp thật (máy nặng vì mỗi session Claude Code tự khởi động bản sao MCP server của riêng nó), rồi chuyển sang giới thiệu 1MCP dựa trên README của repo và tài liệu tại docs.1mcp.app. Phần giới thiệu công cụ chưa phải đánh giá sau thời gian dài dùng. Chỗ nào tài liệu không nói rõ thì tôi ghi là chưa rõ, không đoán.

Test-Driven Development (TDD) in the AI-Driven Development Life Cycle (AI-DLC): A Review of the Evidence and a Proposed Practice

· 28 min read
Nguyễn Huỳnh Minh Tiến
Middle Fullstack Developer @ Utop.vn
Summary

Abstract. Test-Driven Development (TDD) is a technique that repeats three steps: write a failing test (Red), write the minimum code that makes it pass (Green), then restructure the code while keeping all tests passing (Refactor). Empirical studies from before the AI era are mixed: a case study of four industrial teams recorded a 40–90% reduction in defect density at the price of 15–35% more initial development time, while a meta-analysis of 27 studies found only a small quality improvement. In the AI-Driven Development Life Cycle (AI-DLC), where source code is increasingly generated by large language models (LLMs), tests acquire an additional function: they act as executable specifications that clarify intent and verify AI output. Studies of test-driven code generation from 2023 to 2026 report that giving tests to an LLM improves results on benchmarks, and the newest approach lets the model generate and then jointly refine both tests and code. However, the evidence comes mainly from small-scale benchmark problems, the quality of the test suite itself caps any claim of correctness, and no evaluation yet exists at the level of the whole AI-DLC.

Keywords: TDD, AI-DLC, unit testing, large language models, executable specification, refactoring.

Diagram Design: teaching AI agents to draw clean, good-looking, on-brand technical diagrams

· 26 min read
Nguyễn Huỳnh Minh Tiến
Middle Fullstack Developer @ Utop.vn
Summary

Diagram Design is an open-source skill (MIT license) by Cathryn Lavery for AI agents such as Claude Code, Codex and GitHub Copilot. Once it is installed, you just ask your agent to "draw an architecture diagram for this system" and get back an HTML file with a clean, clearly laid-out diagram: no more boxes piled on boxes or arrows crossing every which way. It covers 44 diagram types and can redraw old diagrams from draw.io, Mermaid and Excalidraw. Colors, fonts and dark mode can be changed to match your brand. If you write labels in Vietnamese, you should swap the title font, because the default one is missing many accented letters.

This post is an introduction, not a review after long-term use. The information comes from the README on GitHub and the skill's instruction file SKILL.md, version 2.6.68. The Vietnamese font check and the color contrast numbers are my own.

Cài skill rồi code tiếp: cơ chế đằng sau và phần tri thức bị bỏ lại

· 15 min read
Nguyễn Huỳnh Minh Tiến
Middle Fullstack Developer @ Utop.vn
Summary

Một skill không phải plugin, không phải thư viện, không phải đoạn code được thực thi. Nó là văn bản được nạp vào cửa sổ ngữ cảnh theo ba tầng: tên và mô tả luôn nằm sẵn (~100 token), thân bài chỉ nạp khi model thấy khớp, còn file đính kèm thì không tốn gì cho tới lúc thật sự mở ra. Model đọc skill rồi tự quyết định làm theo, chứ không "chạy" nó. Ba tầng đó giải thích gần hết những câu hỏi thực dụng — vì sao description quyết định việc kích hoạt chứ không phải nội dung, vì sao viết skill dài là phản tác dụng. Và vì skill là bản nén phán đoán của một người trong một bối cảnh cụ thể, cài nó vào mà không đọc nghĩa là nhận cả những giả định bạn chưa từng kiểm chứng.

Quy trình phổ biến hiện nay: vào một danh mục skill, chọn preset, chạy một lệnh cài, rồi code tiếp. Hỏi vì sao agent đột nhiên viết test theo kiểu đó, vì sao nó nhất quyết dùng pattern kia, thì câu trả lời thường là "tại skill nó thế".

Đó là chỗ tri thức rơi rụng. Không phải vì skill xấu — nhiều skill viết rất tốt — mà vì bản chất của skill là nén phán đoán lại thành hướng dẫn, và người nhận thường chỉ lấy phần hướng dẫn.

Bài này mổ hai lớp: cơ chế skill hoạt động thế nào, và chuyện gì bị bỏ lại khi ta chỉ cài mà không đọc.

Four Indexes Made INSERT 6× Slower: The Bill Nobody Mentions

· 12 min read
Nguyễn Huỳnh Minh Tiến
Middle Fullstack Developer @ Utop.vn
Summary

Indexes speed up reads by charging you on every write, and the charge is larger than most people picture. Measured on PostgreSQL 16 with the same 200,000 rows: a table with no indexes finished inserting in 287.8 ms and occupied 10.2 MB; a table with four indexes took 1,722.3 ms and occupied 27 MB. That is 6× slower and 2.6× bigger — just to carry four structures that no query may ever touch. The right question is not "should this column have an index?" but "does the read time saved cover the write time paid?"

Every post about database optimization ends with advice to add an index. Very few mention the bill that comes with it, and fewer still put a number on it.

This post goes deeper into two lessons from the 30-day SQL series: Database design and Index. Every figure below was measured on PostgreSQL 16.11.