| name | indexeddb |
| description | Use when user needs to store, retrieve, or persist data with no UI involved — pure data layer work |
IndexedDB Skill
Design and implement a native browser IndexedDB schema with typed async helpers. No Dexie, no localForage.
Control Flow
- Dispatch
schema-designer-prompt.md to design and implement the schema
- Dispatch
reviewer-prompt.md to review it
- If ISSUES: re-dispatch
schema-designer-prompt.md with the reviewer's ISSUES list appended, then re-dispatch reviewer-prompt.md (max 3 retries)
- If still failing: tell the user in plain English what could not be resolved
- If APPROVED: tell the user the data store is ready and describe what was created
Migration Rules
- Every schema change increments the DB version number
onupgradeneeded handles ALL version transitions sequentially
- Never make breaking changes to existing object stores without a migration
Error Handling Rules
All generated helpers MUST:
- Handle
openDB failures (wrap in try/catch, return typed error)
- Handle transaction aborts (
onerror, onabort)
- Handle quota exceeded errors
- Never silently swallow errors
Testing
- Use
fake-indexeddb to mock the IndexedDB API in tests
- Co-locate test file alongside the helpers file