Alison Aquinas logoAlison's LLM Plugins

sqlite

Included in pluginshared-skillsView on GitHub ↗

Files

SKILL.mdagentsreferencesscripts

Install

Install the containing plugin
/plugin install shared-skills@llm-skills
Invoke this skill after installation
/shared-skills:sqlite
Download sqlite-skill.zip
This skill is bundled inside shared-skills. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-shared-skills.

SKILL.md


name: sqlite description: Complete SQLite file operations spanning core read-only queries, backups, health checks, and advanced workflows including database diffing, replica sync, migrations, and application integration. Use for any SQLite-related task from simple querying to complex multi-database operations.

SQLite

Safe, repeatable SQLite file operations from preflight checks through advanced workflows.

Prerequisite Check

Run this before proposing CLI database work:

command -v sqlite3 >/dev/null 2>&1 || sqlite3 --version

If sqlite3 is missing, surface that first and point to scripts/install.sh or scripts/install.ps1. If the user only needs lightweight inspection and no shell is available, say that a language runtime or GUI may be required instead of pretending the CLI examples will run.

Quick Start

  1. Confirm the runtime: sqlite3 --version
  2. Run preflight when tool availability matters: scripts/sqlite_preflight.sh --require sqlite3
  3. Open read-only first: sqlite3 -readonly app.db '.tables'
  4. Use the safe wrapper for structured output: scripts/sqlite_safe_query.sh --db app.db --sql 'select count(*) from sqlite_master'
  5. Verify with PRAGMA integrity_check; before and after risky work

Intent Router

RequestReferenceLoad When
Install tool, first-time setupreferences/install-and-setup.mdUser needs to install sqlite3, sqldiff, sqlite3_rsync, or do initial configuration
Read-only queries, health checks, backupsreferences/core-workflows.mdUser needs basic database operations and safe defaults
Schema/data diffing, database sync, migrationsreferences/diff-and-sync.mdUser needs to compare schemas, synchronize replicas, or validate migrations
Python/Node integration, smoke testsreferences/integration-python-node.mdUser needs to verify database behavior in application code
Migration validation and planningreferences/migrations.mdUser needs to validate migration scripts on cloned databases
SQL patterns, query strategiesreferences/sql-patterns.mdUser needs complex query help or optimization guidance
Safety, locking, concurrencyreferences/safety-and-locking.mdUser needs to understand locking, transactions, and safe concurrent access
SQLite documentation referencereferences/sqlite-doc-map.mdUser needs quick links to official SQLite documentation

Workflow

  1. Run preflight checks before any workflow.
  2. Query databases in read-only mode.
  3. Run health checks before and after major changes.
  4. Create backups before risky operations.
  5. Use advanced features (diff, sync, migrations, integration) with explicit guardrails.

PATH Bootstrapping

Prefer PATH-based tool resolution.

If sqldiff, sqlite3_analyzer, or sqlite3_rsync are missing, add a local toolkit directory to PATH:

export PATH="/path/to/sqlite-tools:$PATH"

Persist this in your shell profile when needed.

Script Interfaces

1) Preflight

scripts/sqlite_preflight.sh --require <tool> [--require <tool>...] [--min-sqlite-version X.Y.Z]

Use this to confirm CLI dependencies and minimum sqlite3 version.

2) Safe Query

scripts/sqlite_safe_query.sh --db <file> (--sql <text> | --sql-file <file>) [--format table|csv|json|markdown] [--out <file>]

Use this for read-only querying only. The script opens databases with -readonly.

3) Health Check

scripts/sqlite_healthcheck.sh --db <file> [--analyzer] [--out-dir <dir>]

Use this to run quick integrity checks and optional sqlite3_analyzer reports.

4) Backup

scripts/sqlite_backup.sh --db <file> --out <backup-file> [--vacuum-into]

Use this before risky changes. Default mode uses .backup; --vacuum-into writes a compact backup.

Verification Cues

  • Runtime ready: sqlite3 --version succeeds and scripts/sqlite_preflight.sh --require sqlite3 exits cleanly.
  • Read-only connection works: sqlite3 -readonly app.db '.tables' returns object names without creating side effects.
  • Recovery path is explicit: if the CLI is missing, stop and install it instead of translating shell snippets into guessed GUI steps.

Safety Defaults

  • Refuse ambiguous or unsafe invocations.
  • Avoid in-place mutation in query and health workflows.
  • Require explicit output paths for artifacts.
  • Fail fast with actionable remediation text.
  • Recovery note: when sqlite3 is unavailable, keep the fallback boundary explicit. Safe wrappers and PRAGMA checks depend on the CLI and should not be presented as runnable until the tool exists.

All Available References

  • references/core-workflows.md — Basic queries, backups, health checks
  • references/diff-and-sync.md — Database diffing and replica synchronization
  • references/integration-python-node.md — Application-level integration testing
  • references/migrations.md — Migration validation and verification
  • references/safety-and-locking.md — Transactions, locks, and concurrent access
  • references/sql-patterns.md — Query patterns and optimization
  • references/sqlite-doc-map.md — Official SQLite documentation reference
  • references/install-and-setup.md — Installation and toolkit setup

Compatibility Notes

  • A local SQLite toolkit directory may be needed to access sqldiff, sqlite3_analyzer, and sqlite3_rsync.
  • Add the toolkit location to PATH as required for your environment.

Use preflight checks to confirm runtime availability before execution.

← Back to marketplace