ddd-context
Skill này làm gì
Skill này tạo một cấu trúc thư mục chuẩn cho một bounded context, tức là một lĩnh vực nghiệp vụ tách biệt trong codebase. Nó dành cho lập trình viên chia một ứng dụng lớn thành các phần rõ ràng.
Khi nào nên dùng
- ✓Khi bạn bắt đầu một lĩnh vực nghiệp vụ mới trong codebase.
- ✓Khi bạn tách một ứng dụng lớn thành các phần riêng với ranh giới rõ ràng.
- ✓Khi bạn muốn cùng một bố cục miền, ứng dụng và hạ tầng cho một module mới.
Liên kết skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-context/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy thiết lập một lĩnh vực billing mới trong codebase của tôi với các thư mục chuẩn.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill kiểm tra tên có theo kebab-case và chưa bị dùng không, rồi tạo các thư mục và file index cho các tầng miền, ứng dụng và hạ tầng. Nó cũng ghi lĩnh vực mới vào kho mô hình miền.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Create a bounded context directory structure for the given context name.
Parse $ARGUMENTS as the context name (kebab-case). If empty, list existing contexts.
Steps
Validate name: Ensure the context name is kebab-case and does not already exist under
src/.Create directory structure:
src/<context-name>/ domain/ entities/ value-objects/ events/ services/ repositories/ application/ infrastructure/Generate index files:
src/<context-name>/domain/entities/index.ts-- barrel export for entitiessrc/<context-name>/domain/value-objects/index.ts-- barrel export for value objectssrc/<context-name>/domain/events/index.ts-- barrel export for domain eventssrc/<context-name>/domain/services/index.ts-- barrel export for domain servicessrc/<context-name>/domain/repositories/index.ts-- barrel export for repository interfacessrc/<context-name>/domain/index.ts-- re-export all domain submodulessrc/<context-name>/application/index.ts-- barrel export for application servicessrc/<context-name>/infrastructure/index.ts-- barrel export for infrastructure implementationssrc/<context-name>/index.ts-- public API of the bounded context (re-exports domain and application only, NOT infrastructure)
Store in domain model graph:
mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store({ key: "domain/context-<context-name>", value: "Bounded context <context-name> (parent: domain)", tier: "semantic" }) mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge({ sourceId: "entity:domain", targetId: "entity:context-<context-name>", relation: "contains" }) mcp__plugin_ruflo-core_ruflo__memory_store({ key: "ddd-context-<context-name>", value: "Created bounded context", namespace: "tasks" })Report: Confirm the context was created and list the generated files.
Câu hỏi thường gặp
Tôi nên dùng định dạng tên nào?
Dùng kebab-case, ví dụ billing-invoices, và đảm bảo chưa có thư mục nào cùng tên.
Index công khai để lộ những gì?
Nó chỉ xuất lại các tầng miền và ứng dụng, không xuất tầng hạ tầng.
Chuyện gì xảy ra nếu tôi chạy mà không có tên?
Nó liệt kê các context hiện có thay vì tạo cái mới.
Chi tiết
Mô tả gốc của tác giả
Create and manage a DDD bounded context with standard directory structure. Use when starting a new subdomain, splitting a monolith into bounded contexts, or scaffolding the domain/application/infrastructure layout for a fresh module.
repo: ruvnet/ruflo
Độ phổ biến
- Sao GitHub
- 81k
- Vị trí xếp hạng
- #1615
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-adaptive-coordinator
81kGiúp agent của bạn chia và cân bằng lại một nhóm agent AI khi khối lượng công việc thay đổi, chọn bố cục phù hợp với tác vụ.
agent-agent
81kDạy agent của bạn biến một mục tiêu lớn thành kế hoạch hành động có thứ tự, và lập lại kế hoạch khi điều kiện thay đổi.
agent-agentic-payments
81kGiúp agent của bạn quản lý ủy quyền chi tiêu cho mua sắm bằng AI, với hạn mức chi, khung thời gian, quy tắc người bán và phê duyệt có chữ ký.
agent-analyze-code-quality
81kGiúp agent của bạn rà soát chất lượng mã, tìm code smell, nợ kỹ thuật và gợi ý tái cấu trúc mà không thay đổi các file.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.