Skip to content
Skill

Dsql on rails

Guides an agent through building and testing Rails apps on Aurora DSQL

Dsql on rails is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
Ruby
Platforms
Claude Code, Codex, Cursor
GitHub stars
31
Last commit
License
MIT
Listing updated

Similar skills

About Dsql on rails

This skill covers running a Rails application on Amazon Aurora DSQL, from connection settings and adapter patches to development, test and CI against real clusters. It explains the differences from PostgreSQL that matter in practice: optimistic concurrency control with retried transactions, no savepoints, one DDL statement per transaction, and IAM-only authentication with short sessions.

The skill ships reference files to copy into a project, including database configuration, a rake task set for initialising, creating and migrating per-developer schemas, a psql wrapper script that attaches a fresh IAM token, and a RuboCop cop that flags bare transactions. It also describes role layout, schema changes through psqldef with async indexes, and RSpec setup that replaces transactional fixtures with cleanup and conflict-retry helpers.

The guidance expects an existing Rails project with the pg, aws-sdk-dsql and pg-aws_rds_iam gems, access to DSQL clusters and AWS credentials. Project conventions documented in the repository take precedence over the skill's defaults.

When your agent uses it

This skill should be used when building, extending, or testing a Rails app on Amazon Aurora DSQL, or when moving a Rails app onto DSQL. Use it when writing a transaction, a uniqueness check, a schema change, a spec, a rake task, or CI for such an app, even if the user only says "add a model" or "fix this flaky spec" in such an app. Signs include `aws-sdk-dsql`, `pg-aws_rds_iam`, `aws_rds_iam_auth_token_generator`, a `*.dsql.<region>.on.aws` host, `ActiveRecord::SerializationFailure` with `OC000`/`OC001`, `retryable_transaction`, `non_idempotent_transaction`, `create index async`, `script/pdsql`, or the user mentioning "DSQL", "Aurora DSQL", or "OCC". Provides connection settings and adapter patches, OCC-aware transactions, schema constraints with psqldef, roles, per-developer schemas, RSpec setup, and CI against real clusters. Project-specific conventions always take priority.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 16 files (62 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the sorah-guides plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add sorah/config
/plugin install sorah-guides@sorah-marketplace

Or copy only this skill to ~/.claude/skills/dsql-on-rails:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/dsql-on-rails &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/dsql-on-rails" ~/.claude/skills/dsql-on-rails &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/dsql-on-rails inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/dsql-on-rails to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/dsql-on-rails &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/dsql-on-rails" ~/.agents/skills/dsql-on-rails &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/dsql-on-rails inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/dsql-on-rails to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/dsql-on-rails &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/dsql-on-rails" ~/.cursor/skills/dsql-on-rails &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/dsql-on-rails inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/sorah/config.git --path claude/marketplace/plugins/sorah-guides/skills/dsql-on-rails

Or copy the folder to ~/.gemini/skills/dsql-on-rails yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/dsql-on-rails:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/dsql-on-rails &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/dsql-on-rails" ~/.copilot/skills/dsql-on-rails &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/dsql-on-rails inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/sorah/config.git

Then copy config/claude/marketplace/plugins/sorah-guides/skills/dsql-on-rails into your agent's skills folder as dsql-on-rails. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

OCC-aware transactions
Wrappers that retry optimistic concurrency conflicts and a cop that flags unsafe transaction usage.
Connection and adapter setup
IAM token generation, SSL settings and patches for the Rails PostgreSQL adapter on DSQL.
Schema management with psqldef
Guidance on applying schema files, async index creation and waiting for index jobs.
Role and schema layout
Permission roles, login roles and per-developer schemas with SQL bootstrap statements.
RSpec test helpers
Database cleanup without transactional fixtures, OCC retry around examples and conflict triggers.
CI against real clusters
Guidance on latency, parallel test splitting and a pooled schema design for CI jobs.

Good for

  • Set up a new Rails app to connect to Aurora DSQL with IAM tokens
  • Make a Rails model write wrapped in a retry-safe transaction
  • Add a unique index to a DSQL-backed table without breaking deploys
  • Fix a flaky RSpec example that fails on optimistic concurrency conflicts
  • Create per-developer dev and test schemas on a shared DSQL cluster
  • Configure a CI job that runs the Rails suite against a DSQL cluster

Dsql on rails FAQ

Does Dsql on rails need Ruby on Rails?

Yes. It targets Rails apps using ActiveRecord, RSpec and rake tasks on Aurora DSQL.

Which gems does Dsql on rails require?

The production gems are pg, aws-sdk-dsql and pg-aws_rds_iam. Tests use database_rewinder, timecop, test-prof and, for CI, parallel_tests.

Can Dsql on rails run without a real DSQL cluster?

No. The guidance states there is no local DSQL emulator, so development and tests run against real clusters.

Does Dsql on rails replace the schema tooling for my app?

It builds on the sqldef-on-rails skill and replaces several of its tasks for DSQL, such as async index creation and per-statement DDL.

How do I install Dsql on rails in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/dsql-on-rails to use it in all your projects, or to .claude/skills/dsql-on-rails in one project. Or install the sorah-guides plugin, which includes it: /plugin marketplace add sorah/config, then /plugin install sorah-guides@sorah-marketplace.

Does Dsql on rails run scripts?

Yes. It runs Ruby scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Dsql on rails?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Dsql on rails?

The closest alternatives to Dsql on rails are Sqldef on rails, Rails, Database migrations, Schema exploration and Go database.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from sorah/config

  1. Guides an agent through maintaining sorah's aptly-managed APT repositories and their

    • Open source
    • 31 GitHub stars
    • Cloud and infrastructure
  2. Runs a chief-of-staff session that watches your coding agents and keeps work on track

    • Open source
    • 31 GitHub stars
    • Developer tools
  3. Applies language-agnostic coding conventions to code writing and review

    • Open source
    • 31 GitHub stars
    • Developer tools
  4. Guides the agent to write git commit messages and PR titles in a concise house style

    • Open source
    • 31 GitHub stars
    • Developer tools
  5. Writes English text in the author's terse, direct technical voice for GitHub and email

    • Open source
    • 31 GitHub stars
    • Developer tools
  6. Guides an agent through writing and reviewing secure GitHub Actions CI and release

    • Open source
    • 31 GitHub stars
    • Developer tools