Provides schema management and query execution tools specifically for Amazon Aurora DSQL.

Install

mkdir -p .claude/skills/dsql && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5222" && unzip -o skill.zip -d .claude/skills/dsql && rm skill.zip

Installs to .claude/skills/dsql

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL migration, DDL operations, query plan explainability, and SQL compatibility validation. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow.
539 charsno explicit “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Manage DSQL schemas
  • Execute SQL queries
  • Handle database migrations
  • Diagnose query plans

How it works

The skill provides tools for direct database interaction, schema management, and migration support for Aurora DSQL.

Inputs & outputs

You give it
SQL query or migration task
You get back
Database operation result

When to use dsql

  • Create DSQL tables
  • Run DSQL explain analyze
  • Migrate existing databases to DSQL

About this skill

Amazon Aurora DSQL Skill

Aurora DSQL is a serverless, PostgreSQL-compatible distributed SQL database. This skill provides direct database interaction via MCP tools, schema management, migration support, and multi-tenant patterns.

Key capabilities:

  • Direct query execution via MCP tools
  • Schema management with DSQL constraints
  • Migration support and safe schema evolution
  • Multi-tenant isolation patterns
  • IAM-based authentication

Reference Files

Load these files as needed for detailed guidance:

development-guide.md

When: ALWAYS load before implementing schema changes or database operations Contains: Best Practices, DDL rules, connection patterns, transaction limits, data type serialization patterns, application-layer referential integrity instructions, security best practices

MCP:

mcp-setup.md

When: Always load for guidance using or updating the DSQL MCP server Contains: Instructions for setting up the DSQL MCP server with 2 configuration options as sampled in mcp/.mcp.json

  1. Documentation-Tools Only
  2. Database Operations (requires a cluster endpoint)

mcp-tools.md

When: Load when you need detailed MCP tool syntax and examples. PREFER MCP tools for ad-hoc queries — execute directly rather than writing scripts. Contains: Tool parameters, detailed examples, usage patterns, input validation

language.md

When: MUST load when making language-specific implementation choices. ALWAYS prefer DSQL Connector when available. Contains: Driver selection, framework patterns, connection code for Python/JS/Go/Java/Rust

dsql-examples.md

When: Load when looking for specific implementation examples Contains: Code examples, repository patterns, multi-tenant implementations

troubleshooting.md

When: Load when debugging errors or unexpected behavior. SHOULD always consult for OCC errors, connection failures, or unexpected query results. Contains: Common pitfalls, error messages, solutions

onboarding.md

When: User explicitly requests to "Get started with DSQL" or similar phrase Contains: Interactive step-by-step guide for new users

access-control.md

When: MUST load when creating database roles, granting permissions, setting up schemas for applications, or handling sensitive data. ALWAYS use scoped roles for applications — create database roles with dsql:DbConnect. Contains: Scoped role setup, IAM-to-database role mapping, schema separation for sensitive data, role design patterns

occ-retry-patterns.md

When: MUST load when writing OCC retry code or mitigating commit-time conflicts Contains: DSQL Connectors, manual retry pattern, conflict mitigation, idempotent transaction design

DDL Migrations (modular):

ddl-migrations/overview.md

When: MUST load when performing DROP COLUMN, RENAME COLUMN, ALTER COLUMN TYPE, or DROP CONSTRAINT Contains: Table recreation pattern overview, transaction rules, common verify & swap pattern

ddl-migrations/column-operations.md

When: Load for DROP COLUMN, ALTER COLUMN TYPE, SET/DROP NOT NULL, SET/DROP DEFAULT migrations Contains: Step-by-step migration patterns for column-level changes

ddl-migrations/constraint-operations.md

When: Load for ADD/DROP CONSTRAINT, VALIDATE CONSTRAINT, MODIFY PRIMARY KEY, column split/merge migrations Contains: Step-by-step migration patterns for constraint and structural changes

ddl-migrations/batched-migration.md

When: Load when migrating tables exceeding 3,000 rows Contains: OFFSET-based and cursor-based batching patterns, progress tracking, error handling

MySQL Migrations (modular):

mysql-migrations/type-mapping.md

When: MUST load when migrating MySQL schemas to DSQL Contains: MySQL data type mappings, feature alternatives, DDL operation mapping

mysql-migrations/ddl-operations.md

When: Load when translating MySQL DDL operations to DSQL equivalents Contains: ALTER COLUMN, DROP COLUMN, AUTO_INCREMENT, ENUM, SET, FOREIGN KEY migration patterns

mysql-migrations/full-example.md

When: Load when migrating a complete MySQL table to DSQL Contains: End-to-end MySQL CREATE TABLE migration example with decision summary

PostgreSQL Migrations (modular):

pg-migrations/type-mapping.md

When: MUST load for PostgreSQL → DSQL type questions Contains: C collation rules, NUMERIC precision, JSON/JSONB, types mapped to TEXT by dsql_lint

pg-migrations/fk-replacement.md

When: MUST load for foreign-key validation code generation Contains: Tenant-scoped validate_fk_*() template, cascade handling

pg-migrations/index-conversion.md

When: MUST load for unfixable index diagnostics Contains: GIN/GiST/BRIN → btree, partial and expression index conversion, async index status

pg-migrations/schema-objects.md

When: MUST load for ENUM, materialized views, extensions, or multi-schema handling Contains: ENUM → CHECK, views, temp/partitioned/inherited tables, role/IAM mapping

pg-migrations/multi-region.md

When: Load for multi-region, active-active, or HA questions Contains: Architecture patterns, geographic partitioning

ORM Guides:

orm-guides/overview.md

When: Load when migrating any ORM to DSQL Contains: Adapter names and key gotchas for Django, Hibernate, Rails, SQLAlchemy

Data Loading:

data-loading.md

When: Load when planning or running bulk loads with aurora-dsql-loader Contains: Fresh-vs-warm partitions, resume/retry, --on-conflict semantics, throughput diagnostics

Query Plan Explainability (modular):

When: MUST load all four at Workflow 8 Phase 0 — query-plan/plan-interpretation.md, query-plan/catalog-queries.md, query-plan/guc-experiments.md, query-plan/report-format.md Contains: DSQL node types + Node Duration math + estimation-error bands, pg_class/pg_stats/pg_indexes SQL + correlated-predicate verification, GUC experiment procedures + 30-second skip protocol, required report structure + element checklist + support request template

SQL Compatibility Validation:

dsql-lint.md

When: MUST load before running dsql_lint, processing externally-sourced SQL (pg_dump, ORM migrations, user-pasted DDL), or resolving fixed_with_warning / unfixable diagnostics Contains: dsql_lint MCP tool reference, fix statuses, ORM integration, unfixable error resolution


MCP Tools Available

The aurora-dsql MCP server provides these tools:

Database Operations:

  1. readonly_query - Execute SELECT queries (returns list of dicts)
  2. transact - Execute DDL/DML statements in transaction (takes list of SQL statements)
  3. get_schema - Get table structure for a specific table

SQL Validation:

  1. dsql_lint - Validate SQL for DSQL compatibility and optionally auto-fix issues. Use before executing externally-sourced SQL.

Documentation & Knowledge:

  1. dsql_search_documentation - Search Aurora DSQL documentation
  2. dsql_read_documentation - Read specific documentation pages
  3. dsql_recommend - Get DSQL best practice recommendations

Note: There is no list_tables tool. Use readonly_query with information_schema.

See mcp-setup.md for detailed setup instructions. See mcp-tools.md for detailed usage and examples.

AWS Knowledge MCP (awsknowledge)

Consult for verifying DSQL service limits before advising users. The numeric limits below are defaults that may change — when a user's decision depends on an exact limit, verify it first:

LimitDefaultVerify query
Max rows per transaction3,000aurora dsql transaction limits
Max data size per transaction10 MiBaurora dsql transaction limits
Max transaction duration5 minutesaurora dsql transaction limits
Max connections per cluster10,000aurora dsql connection limits
Auth token expiry15 minutesaurora dsql authentication token
Max connection duration60 minutesaurora dsql connection limits
Max indexes per table24aurora dsql index limits
Max columns per index8aurora dsql index limits
IDENTITY/SEQUENCE CACHE values1 or >= 65536aurora dsql sequence cache
Supported column data typesSee docsaurora dsql supported data types

When to verify: Before recommending batch sizes, connection pool set


Content truncated.

When not to use it

  • Non-DSQL database tasks
  • Arbitrary DDL/DML execution

Prerequisites

Aurora DSQL cluster

Limitations

  • Requires Aurora DSQL cluster

How it compares

It provides DSQL-specific patterns, migration support, and query analysis rather than generic SQL tools.

Compared to similar skills

dsql side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
dsql (this skill)12moReviewAdvanced
aws-aurora14moReviewIntermediate
aws-dynamodb14moReviewAdvanced
dynamodb17moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry