flowstate-epic-flowstate-community-epicdm-flowstate-rxdb
Package-local agent skill for @epicdm/flowstate-rxdb.
Tags
Publisher
Versions
1 version published — latest: 1.0.8
- 1.0.8publishedInvalid Date
Skill
flowstate-rxdb Package Skill
Package: @epicdm/flowstate-rxdb
Repository: epic-flowstate-community
Path: packages/flowstate-rxdb
Version: 1.0.8
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
Create Database
Use this skill when a package needs a local RxDB database through @epicdm/flowstate-rxdb.
Basic Pattern
const db = await createDatabase({
name: 'flowstate-client',
collections,
preset: 'production',
storage: { type: 'memory' },
plugins: {
leaderElection: true,
queryBuilder: true,
update: true,
migration: true,
},
})
What createDatabase Does
- Validates database name, collection map, preset, and storage type.
- Initializes premium features when requested.
- Computes and initializes plugin configuration.
- Resolves storage through
getStorage. - Applies encryption wrapping only when encryption is enabled and a password exists.
- Calls RxDB
createRxDatabase. - Adds collections when present.
closeDuplicates
closeDuplicates is passed through to RxDB as closeDuplicates, not mapped to ignoreDuplicate. Use it when a general database caller needs RxDB to close a prior duplicate instance.
Do not blindly use it in the IndexedDB adapter path; that adapter intentionally avoids it.
Watch Outs
RxDBConfigErroris rethrown as-is; other failures are wrapped inRxDBInitializationError.- Empty collection maps are allowed but most app workflows need collection definitions.
- Replication clients often require
leaderElection.
Package Skill Inventory
Package Skill Inventory: @epicdm/flowstate-rxdb
Package path: packages/flowstate-rxdb.
Skill Map
| Skill | Type | Trigger | Teaches | Dojo |
|---|---|---|---|---|
flowstate-rxdb | orchestrator | Use when a task touches @epicdm/flowstate-rxdb or local RxDB initialization | Package purpose, routing, public entry points | local-only |
flowstate-rxdb-create-database | workflow | Use when creating or changing local RxDB database initialization | createDatabase, config validation, collections, presets, plugins, closeDuplicates | ready-after-review |
flowstate-rxdb-storage-premium-encryption | workflow/reference | Use when changing storage backend, premium mode, OPFS, AJV wrapping, or encryption | getStorage, premium fallback, custom storage, encryption password behavior | ready-after-review |
flowstate-rxdb-indexeddb-adapter | workflow | Use when wiring browser/web/desktop database adapter initialization | IndexedDBDatabaseAdapter, HMR/StrictMode cache, tier-filtered collections, legacy cleanup | ready-after-review |
flowstate-rxdb-maintenance-troubleshooting | maintenance/troubleshooting | Use when debugging DB9, RxDB upgrades, downstream failures, docs drift, or generated Dojo | Verification matrix, reverse refs, compatibility boundary rules | local-only |
Anti-Sprawl Decision
Do not create separate skills for constants, error classes, premium declaration shims, or reset helpers. They belong inside database creation, storage/encryption, adapter, and troubleshooting workflows.
Review Gate
Package Skill Review: @epicdm/flowstate-rxdb
Package path: packages/flowstate-rxdb.
Review Result
Status: drafted, source-backed, verified, pending publication.
The skillset is workflow-shaped around database creation, storage/premium/encryption, IndexedDB adapter behavior, and maintenance/troubleshooting.
Checks
- Source review: completed from package exports, database creation, storage, IndexedDB adapter, downstream references, and docs drift.
- Skill inventory: completed.
- Skill files: completed.
- ASCII/frontmatter scan: passed.
- Package tests: passed, 8 suites and 32 tests, with expected RxDB dev-mode warning.
- Package typecheck: passed.
- Package build: passed.
- Generated Dojo replacement: pending.
- Cloud Dojo publication: pending.
Verification Commands
Run before publication:
yarn workspace @epicdm/flowstate-rxdb test
yarn workspace @epicdm/flowstate-rxdb typecheck
yarn workspace @epicdm/flowstate-rxdb build
yarn nx build @epicdm/flowstate-rxdb
Publication Gate
Do not publish existing .flowstate/dojo artifacts until they are rebuilt from reviewed package skills.
Usage
Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-rxdb/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.
Install
Run this in your project to install via CLI:
fscloud dojo skill install flowstate-epic-flowstate-community-epicdm-flowstate-rxdb --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.