llm-app-patterns – skill Lập trình cho agent AI
Phác thảo kiến trúc và cách tích hợp cho ứng dụng LLM, với ranh giới rõ ràng cho truy xuất (retrieval), công cụ (tool), quyền riêng tư và xác minh.
Cài skill llm-app-patterns bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/llm-app-patterns-4e38c.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /llm-app-patterns – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/llm-app-patterns-4e38c.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $llm-app-patterns – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/llm-app-patterns-4e38c.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /llm-app-patterns – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/llm-app-patterns-4e38c.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /llm-app-patterns – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
🤖 LLM Application Patterns
> Architecture and integration sketches for LLM applications, with explicit retrieval, tool, privacy and verification boundaries.
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use This Skill
Use this skill when:
- Designing LLM-powered applications
- Implementing RAG (Retrieval-Augmented Generation)
- Building AI agents with tools
- Setting up LLMOps monitoring
- Choosing between agent architectures
---
Inputs, worked example and verification
Record provider/SDK versions, authorized data and tools, request/response schemas, latency/cost budgets and the expected task outcome. All code above is an integration sketch: llm, database, parser and provider-response adapters are project-owned and must be implemented explicitly. Never execute model-provided Python, expressions or fuzzy tool names; dispatch only exact registered tools after schema and authorization checks. Enforce per-call deadlines as well as loop limits.
Example: a planner first queues steps A and B, then after A replaces the remaining work with C. The executor must run A then C, never stale B. A parser step must apply the parser to the actual prior output. Two tenants with the same prompt must produce different cache keys, and cache reads/writes require an explicit reuse policy. These are concrete regression assertions; successful mocks still do not prove live provider behavior.
The limiter sketch is single-threaded and process-local. A distributed deployment needs a shared atomic limit and deadlines. Retry only retry-safe operations, honoring provider retry guidance; a timeout after a side effect is not evidence that nothing happened. See [Tenacity retry predicates](https://tenacity.readthedocs.io/en/latest/).
Limitations
- A retrieved source list does not prove each answer claim is supported; verify claim-to-source evidence and abstention behavior.
- Prompt text and JSON-shaped output are not authorization boundaries. Enforce permissions in the application.
- Provider failover can change output quality, tool schemas, cost and data residency; only use pre-approved compatible fallbacks.
- Caching must respect tenant access, data/prompt revisions and deletion policy; temperature zero does not make output deterministic.
- Model/SDK examples are not a complete service, benchmark or production-readiness certificate.
Skill liên quan
- zero-hallucination-coder – Chạy vòng lặp kỷ luật Discuss → Map → Decompose → Execute → Verify (Thảo luận → Lập bản…
- llm-evaluation – Nắm vững các chiến lược đánh giá toàn diện cho ứng dụng LLM, từ chỉ số tự động đến đánh…
- logic-diff – So sánh hai phiên bản mã về tính tương đương ngữ nghĩa bằng cách truy vết bán hình thức…
- logic-explain – Giải thích đoạn mã cụ thể thực sự làm gì với một đầu vào nhất định bằng cách tạo vết…
- logic-lens – Skill Claude Code dùng AI để rà soát mã sâu bằng logic hình thức và khung suy luận, phát…
- logic-review – Tìm lỗi logic trong một tệp hoặc hàm bằng cách truy vết thực thi bán hình thức (Tiền đề…
- logistics-exception-management – Phân loại và xử lý chậm trễ vận chuyển, hư hỏng, thiếu hụt, thất lạc và tranh chấp với…
- lovable-cleanup – Kiểm tra và loại bỏ phần scaffolding của Lovable khỏi dự án Vite + React — xóa…