Khám phá Learn Stream About Jokes
Stream
Liên kết

Kho skill build AI agent chuẩn production

· github

TL;DR

Tác giả share bộ skill mã nguồn mở giúp build AI agent hiệu quả bằng cách quản lý context window tối ưu. Bao gồm từ cơ bản đến nâng cao: multi-agent patterns, memory systems, tool design, evaluation framework. Dùng được với Claude Code, Cursor, Codex.

Bài này dành cho ai?

1. Người muốn AI làm việc thay mình

Vấn đề: Agent hay “quên” thông tin quan trọng, output không nhất quán, hoặc chậm khi context dài Khi nào cần: Khi chạy agent cho task phức tạp, nhiều bước, hoặc cần giữ state lâu dài Được gì: Kỹ thuật context compression, memory systems, progressive disclosure để agent hoạt động ổn định

2. Người muốn build sản phẩm AI

Vấn đề: Không biết architecture nào phù hợp, không có framework đánh giá chất lượng Khi nào cần: Khi thiết kế hệ thống agent từ đầu hoặc cải thiện hệ thống hiện tại Được gì: Pre-built patterns (orchestrator, peer-to-peer, hierarchical), evaluation framework, tool design best practices

3. Dev muốn nâng cấp workflow

Vấn đề: Viết prompts dài nhưng agent vẫn không hiểu đúng, tốn token quá mức Khi nào cần: Khi muốn tối ưu chi phí API, cải thiện output quality Được gì: Context optimization strategies, compression techniques, cách giảm “lost-in-the-middle”


Các điểm chính

  1. Context window không phải vấn đề token, mà là attention Model bị “quên” thông tin ở giữa context (lost-in-the-middle), attention suy yếu khi context dài. Giải pháp là dùng ít token nhưng chất lượng cao, không phải nhồi nhét thêm data. → Làm gì: Trước khi thêm context, hỏi “Token này có high-signal không?”

  2. Progressive Disclosure - chỉ load cái cần Mỗi skill chỉ load tên và description khi khởi động. Full content chỉ load khi skill được activate cho task cụ thể. Giúp tiết kiệm context và tránh overload. → Làm gì: Thiết kế system với tiered loading - SKILL.md → MODULE.md → data files

  3. 3 loại architecture cho multi-agent Orchestrator (một agent điều phối nhiều agent), Peer-to-peer (agent bình đẳng trao đổi), Hierarchical (cấp bậc supervisor-subordinate). Mỗi loại phù hợp use case khác nhau. → Làm gì: Chọn architecture dựa trên độ phức tạp task và mức độ cần control

  4. Memory systems gồm 3 tầng Short-term (trong session), Long-term (across sessions), Graph-based (entities và relationships). Agent cần cả 3 để hoạt động như con người. → Làm gì: Implement append-only memory với JSONL + schema-first lines

  5. Evaluation quan trọng không kém development LLM-as-Judge techniques: direct scoring, pairwise comparison, rubric generation, bias mitigation. Không có evaluation thì không biết agent tốt hay dở. → Làm gì: Build evaluation framework từ đầu project, không để sau

  6. BDI mental states - cho agent có “tư duy” Chuyển RDF context thành beliefs, desires, intentions - mô hình BDI (Belief-Desire-Intent). Giúp agent có deliberative reasoning và explainable hơn. → Làm gì: Khi cần agent đưa ra quyết định có lý do, không chỉ pattern-match

  7. Platform agnostic - không phụ thuộc vendor Patterns trong repo dùng được với Claude Code, Cursor, Codex, hoặc bất kỳ platform nào cho phép custom instructions. Không lock vào một ecosystem. → Làm gì: Học principles, không phải syntax. Áp dụng được ở bất cứ đâu

  8. Digital Brain Skill - ví dụ hoàn chỉnh Personal operating system cho founders/creators với 6 modules, 4 automation scripts. Complete Claude Code skill demonstrate toàn bộ concepts đã học. → Làm gì: Clone example về, chạy thử, modify theo nhu cầu


Quick Start

  1. Tuần này - Register marketplace và test 1 skill Chạy trong Claude Code:
/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering

Sau đó browse và install thử context-engineering-fundamentals

  1. Tuần tới - Áp dụng progressive disclosure Tạo file SKILL.md cho project của mình, load full content chỉ khi cần. Đo lường token usage trước/sau để xem hiệu quả

#context-engineering #ai-agents #llm-optimization #multi-agent-systems #claude-code #cursor #agent-architecture
0:00

Chia sẻ ảnh

Bắt đầu gõ để tìm kiếm...