sql

Manage versioned SQL scripts with read-only database access during migrations.

Updated May 2, 2026
One-click install
npx skills add https://github.com/Tacuchi/agent-workflow-cli --skill sql-tacuchi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql
Source: https://github.com/Tacuchi/agent-workflow-cli/tree/main/skills/w/roles/sql
Command: npx skills add https://github.com/Tacuchi/agent-workflow-cli --skill sql-tacuchi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SQL / database capability — built-in default for the sql role. Authoring DB changes as versioned scripts (never executing them): writes statements to the session SCRIPTS.sql with category and statement markers, applies project SQL style (canonical header, BEGIN/COMMIT, idempotency, explicit schema, CTEs over DO/LOOP), classifies into the 4 categories, and knows how rollbacks are derived on export. DB access is read-only via MCP — DML/DDL is NEVER executed (invariant 4). Use when a loop writes migrations / queries, when research reads schema, or when export-scripts consolidates the bundle.

Core Features & Use Cases

  • Read-only database access via MCP for schema exploration.
  • Writes changes to SCRIPTS.sql with category and statement markers, maintaining per-session auditability.
  • Exports consolidated bundles of scripts with rollback information and explicit schema references.

Quick Start

Generate a versioned SQL script for a migration by appending categorized statements to the session SCRIPTS.sql, ensuring idempotency and explicit schema usage.

Frequently Asked Questions about sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate versioned SQL scripts for safe database migrations?

Versioned SQL scripts for safe migrations are generated by appending categorized statements to a session SCRIPTS.sql file, ensuring idempotency, explicit schema usage, and canonical headers without executing DML or DDL.

Can I execute DML or DDL statements directly during database migration workflows?

Direct DML or DDL execution is never permitted during database migration workflows; database access is strictly read-only via MCP for schema exploration, while changes are written to SCRIPTS.sql for safe export.

What is the best way to structure SQL migration scripts for idempotency and rollback?

Structuring SQL migration scripts for idempotency involves using explicit schemas, BEGIN/COMMIT blocks, CTEs, and categorized statement markers in SCRIPTS.sql, with rollback scripts derived automatically upon bundle export.

How does read-only database access work for schema exploration in SQL migration workflows?

Read-only database access for schema exploration operates via MCP, allowing safe inspection of database structures to inform migration scripts without risking unintended data modifications during the workflow.

Does this SQL migration approach support exporting consolidated script bundles for distribution?

Yes, the SQL migration approach supports exporting consolidated script bundles for distribution, packaging versioned statements from SCRIPTS.sql with rollback information and explicit schema references.

When do I need to maintain per-session SCRIPTS.sql files for database migrations?

Per-session SCRIPTS.sql files are maintained whenever a workflow writes database migrations or queries, ensuring auditability by categorizing statements and enforcing canonical headers and idempotent SQL syntax.