business-data-access
仓库创建 2024年12月9日最近提交 6 小时前SkillHot 收录 5 小时前
▸ 精选理由
规范化数据边界,适合跨层数据库访问改动。
▸ 风险提示
涉及数据库操作与权限,修改需谨慎
这个 Skill 做什么
实现或修改业务服务、仓储与数据访问边界,处理数据库读写与缓存失效。
实现或修改业务层服务、仓储接口、缓存失效和事件发射,保证上层不直接 import 数据库实现。需要做数据库读写或调整数据访问边界时使用,遵守把数据库访问封装到 service/repository 的规范。特点是明确数据访问边界,便于测试、缓存管理和事件驱动逻辑。
▸ 展开 SKILL.md 英文原文
Implement or modify ChatbotX business services, repositories, cache invalidation, event emission, and data-access boundaries. Use when app, worker, or integration code needs database-backed reads or mutations without importing db directly.
524
Stars
116
Forks
21
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/ChatbotXIO/ChatbotX/main/.agents/skills/business-data-access/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/ChatbotXIO/ChatbotX/main/.agents/skills/business-data-access/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Business Data Access Use this skill whenever code outside `packages/business` or `packages/database/src/repositories` needs database-backed behavior. ## Boundary Rule Do not add direct database imports in: - `apps/builder` - `apps/worker` - `integrations` These layers call services from `@chatbotx.io/business` or repositories from `@chatbotx.io/database/repositories`. Legacy direct `db` imports are exceptions, not examples to copy. Allowed direct `db` usage: - `packages/business/src/**` - `packages/database/src/repositories/**` ## Choosing Service vs Repository Use a business service when the method has business semantics, authorization adjacent constraints, cache invalidation, ev
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有