Iptvnator Sqlite DB Worker
Developmentiptvnator-sqlite-db-workerIptvnator Sqlite DB Worker is an Agent Skill for development published in the 4gray/iptvnator repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Repository-specific guidance for Electron non-EPG SQLite worker boundaries, request-scoped DB progress events, and validation for slow DB operations.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/4gray/iptvnator/blob/HEAD/.codex/skills/iptvnator-sqlite-db-worker/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/iptvnator-sqlite-db-worker, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
IPTVnator SQLite DB Worker
Use this skill when changing Electron SQLite operations, worker-backed database flows, DB progress events, or Xtream/playlist import/search/delete persistence.
Ownership
- Runtime worker client:
apps/electron-backend/src/app/services/database-worker-client.ts - Worker protocol:
apps/electron-backend/src/app/workers/database-worker.types.ts - Worker dispatcher:
apps/electron-backend/src/app/workers/database.worker.ts - SQL operation modules:
apps/electron-backend/src/app/database/operations/ - Shared schema/path helpers:
libs/shared/database/src/ - Architecture doc:
docs/architecture/sqlite-db-worker.md
Rules
- Keep heavy non-EPG SQLite work off the Electron main thread.
- Keep SQL-heavy logic in operation modules; keep the worker entrypoint as dispatcher/orchestration.
- Emit request-scoped
DB_OPERATION_EVENTprogress for long-running operations. - Preserve cancellation as cooperative and chunk-based.
- Do not break existing preload API method names without a coordinated renderer migration.
Validation
- Run
pnpm nx test electron-backendfor worker/client/operation changes. - Run targeted Electron E2E for import, search, delete, backup/restore, or downloads flows when touched.
- Use
IPTVNATOR_TRACE_DB=1orIPTVNATOR_TRACE_SQL=1for manual debugging.