·repository-pattern
{}

repository-pattern

alexanderop/workouttracker

使用类型安全接口、转换器和标准化 CRUD 操作创建和管理 Dexie/IndexedDB 存储库。在以下情况下使用:(1) 添加实体存储、(2) 实现保存/加载/删除操作、(3) 设计数据库架构和索引、(4) 在数据库 (Db*) 和域类型之间转换、(5) 处理数据库错误或迁移、(6) 使用现有存储库(SettingsRepository、WorkoutsRepository、TemplatesRepository、CustomExercisesRepository、BenchmarksRepository、ActiveWorkoutRepository)。触发器包括“数据库”、“存储库”、“保存数据”、“从数据库获取”、“从存储中删除”、“数据库架构”、“数据库表”、“索引”、“迁移”、“持久”、“转换锻炼”、“转换器”、“buildPartialUpdate”、“模拟存储库”、“数据库错误”、“批量操作”、“导入/导出”或特定存储库名称。

10安装·1热度·@alexanderop

安装

$npx skills add https://github.com/alexanderop/workouttracker --skill repository-pattern

SKILL.md

This skill helps implement the repository pattern used in this workout tracker application. The pattern provides a clean abstraction over Dexie (IndexedDB) with type-safe interfaces, consistent error handling, and standardized CRUD operations.

Need basic storage for an entity? See examples.md → Example 1 (Notes).

Need many-to-many relationships or complex queries? See examples.md → Example 2 (Tags).

使用类型安全接口、转换器和标准化 CRUD 操作创建和管理 Dexie/IndexedDB 存储库。在以下情况下使用:(1) 添加实体存储、(2) 实现保存/加载/删除操作、(3) 设计数据库架构和索引、(4) 在数据库 (Db*) 和域类型之间转换、(5) 处理数据库错误或迁移、(6) 使用现有存储库(SettingsRepository、WorkoutsRepository、TemplatesRepository、CustomExercisesRepository、BenchmarksRepository、ActiveWorkoutRepository)。触发器包括“数据库”、“存储库”、“保存数据”、“从数据库获取”、“从存储中删除”、“数据库架构”、“数据库表”、“索引”、“迁移”、“持久”、“转换锻炼”、“转换器”、“buildPartialUpdate”、“模拟存储库”、“数据库错误”、“批量操作”、“导入/导出”或特定存储库名称。 来源:alexanderop/workouttracker。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/alexanderop/workouttracker --skill repository-pattern
分类
{}数据分析
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 repository-pattern?

使用类型安全接口、转换器和标准化 CRUD 操作创建和管理 Dexie/IndexedDB 存储库。在以下情况下使用:(1) 添加实体存储、(2) 实现保存/加载/删除操作、(3) 设计数据库架构和索引、(4) 在数据库 (Db*) 和域类型之间转换、(5) 处理数据库错误或迁移、(6) 使用现有存储库(SettingsRepository、WorkoutsRepository、TemplatesRepository、CustomExercisesRepository、BenchmarksRepository、ActiveWorkoutRepository)。触发器包括“数据库”、“存储库”、“保存数据”、“从数据库获取”、“从存储中删除”、“数据库架构”、“数据库表”、“索引”、“迁移”、“持久”、“转换锻炼”、“转换器”、“buildPartialUpdate”、“模拟存储库”、“数据库错误”、“批量操作”、“导入/导出”或特定存储库名称。 来源:alexanderop/workouttracker。

如何安装 repository-pattern?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/alexanderop/workouttracker --skill repository-pattern 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/alexanderop/workouttracker