skills/sqlite-to-oracle-planner/SKILL.md
Use when starting a SQLite-to-Oracle migration on a Node.js/TypeScript codebase. Scans for all SQLite touch points (imports, file extensions, connection strings, schema syntax, fallback branches) and produces a structured [SQLITE_REPLACE] migration manifest for implementation agents. KEYWORDS: SQLite, Oracle, migration, better-sqlite3, oracledb, drizzle-orm, typeorm, AUTOINCREMENT, connection string, manifest.
npx skillsauth add acedergren/agentic-tools sqlite-to-oracle-plannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This is a planning-only skill. Search, read minimally, and produce the manifest. Do NOT implement changes. Use Glob and Grep — never read entire files to scan them.
Work in five passes. Log every hit with file path and line number.
Pattern: better-sqlite3 | sqlite3 | drizzle-orm/sqlite-core | typeorm.*sqlite | @agent-state
Files: **/*.ts, **/*.js, **/*.mjs, **/*.cjs
| Import Found | Oracle Equivalent |
|--------------------------------|-------------------------------------------------------|
| better-sqlite3 | oracledb or project Oracle connection pool |
| sqlite3 | oracledb |
| drizzle-orm/sqlite-core | Raw OCI SQL or drizzle-orm with Oracle adapter |
| typeorm + sqlite driver | typeorm with Oracle driver |
| @agent-state (SQLite-backed) | Oracle-backed state store |
Glob: **/*.db, **/*.sqlite, **/*.sqlite3
These are data files — flag each one. They require data migration, not just code changes.
Pattern: sqlite: | :memory: | \.db['")] | new Database( | createConnection(
Files: **/*.ts, **/*.js, **/*.env, **/*.env.*
| SQLite Pattern | Oracle Equivalent |
|---------------------------------------------------------|-------------------------------------------------------|
| sqlite:./path/to/db.sqlite | OCI connection string / TNS alias |
| :memory: | Oracle SGA (in-memory buffering is automatic) |
| new Database('file.db') | oracledb.getConnection(config) |
| createConnection({ type: 'sqlite', database: '...' }) | createConnection({ type: 'oracle', ... }) |
Pattern: AUTOINCREMENT | INTEGER PRIMARY KEY | TEXT DEFAULT | BLOB | REAL | NUMERIC
Files: **/*.sql, **/*.ts, **/*.js
| SQLite Type | Oracle Equivalent |
|-------------------------------------|----------------------------------------------------------|
| INTEGER PRIMARY KEY AUTOINCREMENT | NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY |
| TEXT (< 4000 chars) | VARCHAR2(4000) |
| TEXT (unbounded / large) | CLOB |
| BLOB | BLOB |
| REAL | BINARY_FLOAT or NUMBER |
| NUMERIC | NUMBER |
| BOOLEAN (stored 0/1) | NUMBER(1) with CHECK (col IN (0,1)) |
| DATETIME (stored as text) | TIMESTAMP WITH TIME ZONE |
| AUTOINCREMENT sequence in DDL | CREATE SEQUENCE + trigger, or GENERATED AS IDENTITY |
Pattern: sqlite | SQLite | in.memory | fallback.*db | db.*fallback (case-insensitive)
Files: **/*.ts, **/*.js
Conditional branches that fall back to SQLite when Oracle is unavailable must be removed entirely — not just replaced.
// Examples to flag:
if (process.env.DATABASE_URL?.includes('sqlite')) { ... } // [SQLITE_REPLACE]
const db = hasOracle ? oracleDB : sqliteDB; // [SQLITE_REPLACE]
const adapter = isProd ? 'oracle' : 'sqlite'; // [SQLITE_REPLACE]
Output this after all five passes. This is the deliverable for implementation agents.
## SQLite Migration Manifest
| File | Line | Pattern Found | Marker | Oracle Equivalent |
|----------------------------|------|-----------------------------------------|------------------|----------------------------------------------------------|
| apps/api/src/db/client.ts | 3 | `import Database from 'better-sqlite3'` | [SQLITE_REPLACE] | `import oracledb from 'oracledb'` |
| apps/api/src/db/schema.ts | 12 | `id INTEGER PRIMARY KEY AUTOINCREMENT` | [SQLITE_REPLACE] | `id NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY` |
| apps/api/data/state.sqlite | — | SQLite data file | [SQLITE_REPLACE] | Migrate data to Oracle table via INSERT SELECT |
| apps/api/src/config.ts | 45 | `sqlite:./data/portal.db` | [SQLITE_REPLACE] | OCI connection string |
| apps/api/src/app.ts | 88 | `const db = isProd ? oracle : sqlite` | [SQLITE_REPLACE] | Remove fallback; Oracle only |
**Total touch points: N**
**Estimated implementation tasks: N**
**Data files requiring migration: N**
Each [SQLITE_REPLACE] marker = one atomic implementation unit for Agent 2+.
| Mistake | Fix |
|---------|-----|
| Reading entire files to search | Use Grep with -n. Never cat a file to scan it. |
| Skipping Pass 5 (fallback logic) | Fallback branches are the trickiest to remove — always run it. |
| Assuming TEXT → VARCHAR2 universally | Check actual usage. Content > 4000 chars needs CLOB. |
| Ignoring .db data files | Flag them — they require data migration planning, not just code changes. |
| Missing drizzle-orm/sqlite-core schema files | Drizzle's Oracle support differs; all schema files need flagging. |
| Flagging Oracle-side code as SQLite | Filter false positives — sqlite may appear in migration docs or comments. |
development
--- name: api-audit description: "Use when auditing API routes for schema drift, missing auth, or validation gaps. Scans routes against shared TypeScript types to find mismatches, missing middleware, and undocumented endpoints. Read-only — produces a severity-grouped report. Keywords: audit routes, schema drift, auth gaps, missing validation, type mismatch, orphaned schemas. Triggers on "audit API routes" or "find schema drift"." --- # API Route & Type Audit Skill ## When to Use Load this skil
development
Use when drafting, translating, polishing, or reviewing Swedish text so it sounds natural, fluent, contemporary, and appropriate for its audience. Triggers include "write better Swedish", "make this sound natural in Swedish", "translate into Swedish", "polish this Swedish", "tech company Swedish", "contemporary Swedish words", "Swedish developer docs", and "avoid Anglicisms".
development
Use when working with shadcn-svelte components, TanStack Table in Svelte 5, or Tailwind v4.1. Covers non-obvious reactivity bugs, library selection trade-offs, and migration pitfalls not in the official docs. Keywords: shadcn-svelte, TanStack Table, Tailwind v4.1, Svelte 5 runes, bits-ui, superforms, data table, svelte-check.
data-ai
Use when mapping IDCS claims to org membership after OAuth login succeeds. Covers mapProfileToUser, session.create.before, session.create.after hooks, MERGE INTO upserts, tenant-org mapping, and first-admin bootstrap. Keywords: IDCS groups, org_members, provisioning, session hooks, tenant map, MERGE INTO.