idb-state-persistence
✓使用 idb 库实现本地优先状态持久化的 IndexedDB 模式。在实现需要跨导航和会话持久状态的功能时使用。涵盖数据建模、默认值、CRUD 操作、状态管理器和重置模式。与 Web 组件集成以实现反应式 UI 更新。
SKILL.md
Local Database First: IndexedDB (IDB) is the primary source of truth for all application state. Every user interaction that changes state MUST persist to IDB immediately to survive navigation, page refreshes, and session restarts.
This architecture treats IDB as a local database, not a cache. State lives in IDB first, components read from it, and all mutations write through to IDB synchronously (no debouncing or batching by default).
Architecture: Web Components → State Manager (#cache, #listeners) → StateStore/Specialized Store → IndexedDB
使用 idb 库实现本地优先状态持久化的 IndexedDB 模式。在实现需要跨导航和会话持久状态的功能时使用。涵盖数据建模、默认值、CRUD 操作、状态管理器和重置模式。与 Web 组件集成以实现反应式 UI 更新。 来源:matthewharwood/fantasy-phonics。
可引用信息
为搜索与 AI 引用准备的稳定字段与命令。
- 安装命令
npx skills add https://github.com/matthewharwood/fantasy-phonics --skill idb-state-persistence- 分类
- *创意媒体
- 认证
- ✓
- 收录时间
- 2026-02-01
- 更新时间
- 2026-02-18
快速解答
什么是 idb-state-persistence?
使用 idb 库实现本地优先状态持久化的 IndexedDB 模式。在实现需要跨导航和会话持久状态的功能时使用。涵盖数据建模、默认值、CRUD 操作、状态管理器和重置模式。与 Web 组件集成以实现反应式 UI 更新。 来源:matthewharwood/fantasy-phonics。
如何安装 idb-state-persistence?
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/matthewharwood/fantasy-phonics --skill idb-state-persistence 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用
这个 Skill 的源码在哪?
https://github.com/matthewharwood/fantasy-phonics
详情
- 分类
- *创意媒体
- 来源
- skills.sh
- 收录时间
- 2026-02-01