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.
npx skills add sorah/config --skill dsql-on-railsgit clone --depth 1 https://github.com/sorah/configWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sorah/config/dsql-on-rails)<a href="https://agentmods.dev/skills/sorah/config/dsql-on-rails"><img src="https://agentmods.dev/badge/skills/sorah/config/dsql-on-rails/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sorah/config/dsql-on-rails"><img src="https://agentmods.dev/badge/skills/sorah/config/dsql-on-rails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00231 | $0.04290 |
| Opus 5.5 | $0.00092 | $0.01716 |
| Sonnet 5.5 | $0.00046 | $0.00858 |
| Haiku 4.5 | $0.00023 | $0.00429 |
Grade A, and why
dsql-on-rails 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.
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.
How it starts
The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rails on Aurora DSQL
How to run a Rails app on Aurora DSQL, from a production setup that also runs development, tests and CI against real DSQL clusters. Project-specific conventions (CLAUDE.md, docs/) always take priority.
- For DSQL itself (SQL support, quotas, IAM, cluster operations), use the
/dsqlskill from AWS's agent-plugins (databases-on-aws). - Schema is managed by psqldef, so read /sorah-guides:sqldef-on-rails first. This skill replaces several of its tasks.
DSQL speaks the PostgreSQL protocol but behaves differently. Plan around these:
- Optimistic concurrency control. There are no lock waits: a conflicting transaction fails at commit with
OC000/OC001and has to be retried. - No SAVEPOINT, so no nested transactions and no transactional test fixtures.
- One DDL statement per transaction. Indexes are built asynchronously (
create index async), and DDL itself causes OCC conflicts. - IAM authentication only. Sessions last at most one hour.
- Some changes cannot be undone later: no
ALTER COLUMN ... TYPE, no addingNOT NULLto an existing column.DROP COLUMN, defaults,DROP NOT NULL, partial and expression indexes,INCLUDE,NULLS NOT DISTINCT,json/jsonb, sequences and identity columns are supported. Check/dsqlfor anything newer. - There is no DSQL Local, so development and tests run against real clusters, and latency is what slows them down.
Reference files
references/ mirrors an app's tree. Copy the files, then replace the example.com names, the app_<name> role and the schema names.
| File | What it is |
|---|---|
config/database.yml |
Connection settings, per-developer host and schema |
config/initializers/dsql_monkey.rb |
Adapter patches, dsql_retryable? |
config/initializers/dsql_token.rb |
IAM token generator for pg-aws_rds_iam, Timecop-safe |
lib/dsql_host_resolver.rb |
Cluster, role and schema resolution for dev/test |
lib/local_config_file.rb |
tmp/ pin files that fall back to the main checkout from a git worktree |
lib/tasks/database.rake |
db:init, create, migrate, drop, pick_cluster, wait_for_jobs, wait_for_indexes, measure_latency, prune_ci, agent_user |
script/pdsql |
psql, psqldef or any libpq tool with a fresh IAM token (chmod +x) |
app/models/concerns/dsql_transactionable.rb |
retryable_transaction / non_idempotent_transaction |
rubocop/transaction_occ_awareness.rb |
Cop flagging bare transaction / with_lock |
spec/support/*.rb, db/schema/test_dsql_conflicts.sql |
RSpec setup (see Tests) |
What ships with it
15 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.
- references/app/models/concerns/dsql_transactionable.rb 1.2 KB runs code
- references/config/database.yml 1.5 KB
- references/config/initializers/dsql_monkey.rb 1.6 KB runs code
- references/config/initializers/dsql_token.rb 1.2 KB runs code
- references/db/schema/test_dsql_conflicts.sql 394 B
- references/lib/dsql_host_resolver.rb 4.2 KB runs code
- references/lib/local_config_file.rb 3.3 KB runs code
- references/lib/tasks/database.rake 20 KB
- references/rubocop/transaction_occ_awareness.rb 501 B runs code
- references/script/pdsql 2.5 KB
- references/spec/support/database_rewinder.rb 2.6 KB runs code
- references/spec/support/dsql_disable_referential_integrity.rb 376 B runs code
- references/spec/support/dsql.rb 4.2 KB runs code
- references/spec/support/factory_transaction_batcher.rb 1.2 KB runs code
- references/spec/support/test_prof.rb 553 B runs code
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.
- 2d ago First seen · 198 lines · 231 tokens per session scan A ee3c68ff55b2
dsql-on-rails is a skill published in the GitHub repository sorah/config (31 stars, last pushed yesterday), licensed MIT. It adds 231 tokens to every session and 4,290 once invoked, about $0.0009 per session on Opus 5.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-10-21.
Other skills, from other repositories
db-migration-mysql-postgres
Migrate a Ruby on Rails application's primary database from MySQL to PostgreSQL — schema upgrades (JSON to JSONB for queryability, ENUMs to native types or check constraints, TINYINT to BOOLEAN, case-sensitivity changes), data export/import via pgloader, the dual-write cutover pattern, the gem switch (mysql2/trilogy…
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…
jpa-patterns
JPA/Hibernate patterns and common pitfalls (N+1, lazy loading, transactions, queries). Use when user has JPA performance issues, LazyInitializationException, or asks about entity relationships and fetching strategies.
ecto-patterns
Use when a task touches Ecto, even a how-to question: schemas, changesets, validations, queries, preloads, Multi, migrations, constraints, money fields. Load it before writing Ecto code. Skip for Ash.
kysely
Guidelines for developing with Kysely, a type-safe TypeScript SQL query builder with autocompletion support.
sql-query-performance
Use when writing or changing a query against PostgreSQL from Go — avoiding N+1 loops, reading EXPLAIN output, indexing, and keyset pagination.