devfirexyz/skills · Archived

dexiejs

Build and maintain Dexie.js data layers for IndexedDB-backed offline-first web applications.

First seen Mar 3, 2026

Installation

$ npx skills add devfirexyz/skills --skill dexiejs

Summary

  • Build and maintain Dexie.js data layers for IndexedDB-backed offline-first web applications.
  • Use when tasks involve Dexie setup, schema/index design, CRUD/query implementation, transactions, live queries, migrations, or debugging in Vanilla JS, React, Next.js, TanStack Start, Svelte, or SvelteKit.

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from devfirexyz/skills.

npx skills add devfirexyz/skills

Browse all from devfirexyz/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Default branch master
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,284 B
  • docs SUMMARY.md 313 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 96 installs

SKILL.md

Dexie.js

Implement Dexie as a production data layer, not as scattered table calls inside UI components.

Workflow

  1. Classify runtime and rendering mode
  • Confirm whether the target code runs only in browser or can run on server too.
  • Prevent Dexie usage on server runtimes in Next.js, TanStack Start, and SvelteKit.
  • Load references/framework-integration.md before writing framework-specific code.
  1. Design schema from query shapes
  • List read queries first (filters, sorts, ranges), then derive indexes.
  • Use compound and multi-entry indexes when queries require them.
  • Keep key strategy explicit (++id, custom IDs, or compound primary key).
  • Load references/core-patterns.md sections 2 and 3.
  1. Implement one shared DB module
  • Define Dexie instance once per app/package.
  • Export typed table handles and data-layer helper functions.
  • Keep transaction boundaries in the data layer.
  1. Add reactive reads
  • Use liveQuery() for framework-agnostic reactivity.
  • In React, prefer useLiveQuery from dexie-react-hooks.
  • In Svelte, consume liveQuery observables directly in components.
  1. Add writes with invariants
  • Use db.transaction() for multi-table consistency and read-modify-write logic.
  • Avoid unrelated async APIs inside transactions unless deliberately wrapped with Dexie.waitFor().
  1. Plan upgrades before release
  • Add new versions with db.version(n).stores(...).upgrade(...).
  • Make migration code idempotent and safe for partially-updated datasets.
  1. Validate behavior
  • Test cold start, reload persistence, and multi-tab updates.
  • Test migration from previous schema with realistic data.
  • Verify SSR/client boundaries are enforced in hybrid frameworks.

Framework Routing

  • Vanilla JS: shared DB module + liveQuery().subscribe(...).
  • React: dexie-react-hooks + colocated data hooks.
  • Next.js: client boundaries ('use client') or dynamic import with ssr: false.
  • TanStack Start: treat loaders as isomorphic; gate Dexie with createClientOnlyFn.
  • Svelte/SvelteKit: use liveQuery; in SvelteKit gate with $app/environment (browser).

Load references/framework-integration.md for templates.

Output Contract

When using this skill, return:

  • Runtime boundary strategy and why.
  • Final schema and index rationale per query path.
  • Data-layer API surface (read/write helpers and transaction rules).
  • Reactive read strategy for the selected framework.
  • Migration plan and rollback considerations.
  • Remaining risks and targeted tests.

References

  • references/core-patterns.md

Core Dexie patterns: schema syntax, CRUD/query, transactions, migrations, reactivity, and performance.

  • references/framework-integration.md

Framework implementations for Vanilla JS, React, Next.js, TanStack Start, Svelte, and SvelteKit.

  • references/troubleshooting.md

Symptom-to-fix guide for SSR boundary leaks, stale live queries, transaction issues, and migration failures.