Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sweetteabittersugar-database-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/database-design
What's inside
- Skill name
database-design- Description
- 数据库设计规范 —— 范式设计、索引策略、分库分表、命名约定与迁移管理
- License
- MIT
- Instructions
- 32 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- SKILL.md.disabled
SKILL.md (first lines)
# 数据库设计规范 ## 概述 提供关系型数据库设计的最佳实践,覆盖表结构设计、索引策略、命名规范、迁移管理和性能考量。 ## 使用场景 - 新项目设计数据模型和表结构 - 现有表结构评审和优化 - 分库分表方案设计 - 数据迁移方案评审 ## 核心原则 1. **第三范式为准,反范式为例外**:默认遵循 3NF,仅在性能瓶颈且其他优化无效时考虑反范式。 2. **索引少而精**:每个查询只用一个索引。为查询创建联合索引,不为每列单独建索引。 3. **命名见名知意**:表名用复数名词或单数实体名,字段名不用拼音和缩写,主键统一为 `id`。 4. **所有迁移都有回滚方案**:每份迁移脚本必须配套一份回滚脚本,并验证回滚后数据一致性。 5. **不在数据库做业务逻辑**:存储过程、触发器、视图中的业务逻辑难以测试和版本管理,优先放在应用层。 ## 设计要点 - **字段类型选择**:使用最小的合适类型(如状态码用 `tinyint` 而非 `int`),避免 `NULL` 滥用(设 NOT NULL + 默认值) - **主键策略**:优先自增整型或有序 UUID(ULID、Snowflake),避免随机 UUID 导致页分裂 - **时间字段**:统一 UTC 存储,应用层转换时区;使用 `timestamp` 而非 `datetime` - **软删除**:统一 `deleted_at` 字段,所有查询默认过滤软删除记录 ## 检查清单 - [ ] 是否遵循第三范式(反范式有明确理由)? - [ ] 每个查询是否都有对应的索引覆盖? - [ ] 迁移脚本是否包含回滚方案并经回滚验证? - [ ] 字段命名是否清晰一致(无拼音、无缩写)? - [ ] 是否有文档记录核心表的字段含义和关系?
From Sweetteabittersugar/agency, MIT.
More from Sweetteabittersugar/agency
- 0.555score
architecture-patterns
Sweetteabittersugar
架构设计模式参考 —— 常见架构风格的决策框架、优劣对比与适用场景
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
browser-compatibility
Sweetteabittersugar
浏览器兼容性检查 —— 目标浏览器覆盖率、特性支持度验证与降级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
caching-strategy
Sweetteabittersugar
缓存策略参考 —— 多级缓存架构、失效策略、缓存穿透/击穿/雪崩防护
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
dependency-audit
Sweetteabittersugar
依赖审计方法论 —— CVE 扫描、许可证合规、版本锁定与升级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
docker-patterns
Sweetteabittersugar
Docker 最佳实践 —— 多阶段构建、镜像层优化、安全运行、编排模式
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
e2e-testing
Sweetteabittersugar
端到端测试实战 —— 关键用户流程覆盖、测试数据管理、环境隔离与 Playwright/Cypress 最佳实践
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
error-handling-patterns
Sweetteabittersugar
错误处理模式 —— 异常分类体系、重试与降级策略、错误码规范与用户友好提示
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
health-check-patterns
Sweetteabittersugar
健康检查模式 —— 存活探针、就绪探针、依赖健康检查与服务健康度仪表板
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
microservices
Sweetteabittersugar
微服务架构模式 —— 服务拆分原则、通信模式、数据一致性与治理框架
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
parallel-execution
Sweetteabittersugar
并行执行方法论 —— 独立任务识别、并行策略、结果合并与冲突避免
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
query-optimization
Sweetteabittersugar
查询优化指南 —— 慢查询分析、索引调优、执行计划解读与 N+1 问题治理
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
rag-patterns
Sweetteabittersugar
RAG 模式 —— 检索增强生成架构设计、分块策略、向量检索优化与评估方法
SkillBFreshness: B★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jun 10, 2026 (4 months ago)
- Last release
- Aug 24, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Sweetteabittersugar/agency
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Sweetteabittersugar
- 0.555score
browser-compatibility
Sweetteabittersugar
浏览器兼容性检查 —— 目标浏览器覆盖率、特性支持度验证与降级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
caching-strategy
Sweetteabittersugar
缓存策略参考 —— 多级缓存架构、失效策略、缓存穿透/击穿/雪崩防护
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
dependency-audit
Sweetteabittersugar
依赖审计方法论 —— CVE 扫描、许可证合规、版本锁定与升级策略
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
docker-patterns
Sweetteabittersugar
Docker 最佳实践 —— 多阶段构建、镜像层优化、安全运行、编排模式
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
e2e-testing
Sweetteabittersugar
端到端测试实战 —— 关键用户流程覆盖、测试数据管理、环境隔离与 Playwright/Cypress 最佳实践
SkillBFreshness: B★ 3Claude Code +9 - 0.555score
architecture-patterns
Sweetteabittersugar
架构设计模式参考 —— 常见架构风格的决策框架、优劣对比与适用场景
SkillBFreshness: B★ 3Claude Code +9
Cite this page
database-design skill. Agent Mart. https://agentmart.dev/skills/sweetteabittersugar-database-design (last updated 2026-10-24)