dsql

A guide for building applications with Aurora DSQL, Amazon’s serverless distributed SQL database with PostgreSQL compatibility. It covers database schemas, queries, migrations, access control, data loading, and troubleshooting.

In plain words
What is it for?
Use it to create schemas, run queries, perform migrations, connect with IAM authentication, design multi-tenant data, load data, convert schemas, and diagnose query or cluster problems.
Why use it?
It provides instructions for common database work while accounting for DSQL’s distributed behavior, authentication, and limits. It also explains patterns for moving schemas from MySQL or PostgreSQL.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/awslabs/agent-plugins/dsql
Any agent
npx skills add awslabs/agent-plugins --skill dsql
Clone the repo
git clone --depth 1 https://github.com/awslabs/agent-plugins

Made for: Claude Code, Codex.

Per session 227 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,294 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00227 $0.05294
Opus 5 $0.00113 $0.02647
Sonnet 5 $0.00045 $0.01059
Haiku 4.5 $0.00023 $0.00529

Measured 2d ago against content hash bc2cf436f8da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dsql scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (mcp/tools/safe_query.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/databases-on-aws/skills/dsql/SKILL.md · 300 lines

How it starts

The opening of the file, as written. The whole thing — 300 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Amazon Aurora DSQL Skill

Aurora DSQL is a serverless, PostgreSQL-compatible distributed SQL database. This skill covers direct query execution via MCP tools, schema management, migrations, multi-tenant isolation, IAM auth, and bulk data loading via aurora-dsql-loader.


Reference Files

Load these files as needed for detailed guidance:

Core:

Reference When to Load Contains
development-guide.md ALWAYS before schema changes or DB operations Best practices, DDL rules, transaction limits, app-layer referential integrity
language.md MUST load for language-specific choices Driver selection, DSQL Connectors, connection code
access-control.md MUST load for roles, grants, or sensitive data Scoped role setup, IAM-to-database role mapping
troubleshooting.md SHOULD load for errors or unexpected behavior OCC errors, connection failures, cluster state errors, token expiry, DDL rejection causes
dsql-examples.md Load for implementation examples Multi-tenant schema examples, batch operations, FK validation patterns, connection pooling
onboarding.md User requests "Get started with DSQL" Interactive step-by-step guide
occ-retry-patterns.md MUST load for OCC retry code or conflict mitigation DSQL Connectors, manual retry pattern, idempotent design

Read the full file on GitHub · 300 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 300 lines · 227 tokens per session scan A bc2cf436f8da

Subscribe to this mod's changes

dsql is a skill published in the GitHub repository awslabs/agent-plugins (876 stars, last pushed 5d ago), licensed Apache-2.0. It adds 227 tokens to every session and 5,294 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing…

prowler-cloud/prowler · 108 tokens

amazon aurora dsql

Deprecated compatibility redirect for Aurora DSQL guidance. Use when a request concerns DSQL, Aurora DSQL, distributed SQL, DSQL schemas, migrations, queries, authentication, performance, or application development.

awslabs/mcp · 46 tokens

azure-resource-manager-postgresql-dotnet

Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…

microsoft/skills · 97 tokens

clickhouse-managed-postgres-rca

MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance. Provides an evidence-based RCA workflow that scrapes the Prometheus endpoint for system signal, pulls per-digest evidence from the Slow Query Patterns API, and recommends (does not apply) a fix.

ClickHouse/agent-skills · 64 tokens

redshift-support-specialist

Amazon Redshift domain expertise for query optimization, operational reviews, and cost optimization on provisioned clusters and Serverless workgroups. Use when a user asks about Redshift query tuning, slow queries, disk spill, distribution/sort key issues, a Redshift health check or operational review, or Redshift…

aws/tools-for-devops-agent · 88 tokens

bedrock-adoption-readiness

Amazon Bedrock production readiness assessment covering IAM governance, data retention (ZDR), quota and capacity headroom, and operational observability across Standard Bedrock and Mantle surfaces. Use this skill when a user asks to review Bedrock readiness, assess Bedrock security posture, evaluate quota headroom…

aws/tools-for-devops-agent · 137 tokens