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 sqldef-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/sqldef-on-rails)<a href="https://agentmods.dev/skills/sorah/config/sqldef-on-rails"><img src="https://agentmods.dev/badge/skills/sorah/config/sqldef-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/sqldef-on-rails"><img src="https://agentmods.dev/badge/skills/sorah/config/sqldef-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.00182 | $0.02045 |
| Opus 5.5 | $0.00073 | $0.00818 |
| Sonnet 5.5 | $0.00036 | $0.00409 |
| Haiku 4.5 | $0.00018 | $0.00204 |
Grade A, and why
sqldef-on-rails scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
( cd /tmp/psqldef && curl -SsfLO "https://github.com/sqldef/sqldef/releases/download/v3.11.20/psqldef_linux_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" ) \ How it starts
The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
psqldef on Rails
Running a Rails app's PostgreSQL schema with psqldef instead of ActiveRecord migrations: the desired schema is a set of CREATE statements, and psqldef diffs it against the live database and applies the difference. Project-specific conventions (CLAUDE.md, docs/) always take priority.
For Aurora DSQL, read /sorah-guides:dsql-on-rails as well; it builds on this setup and replaces several tasks.
The model
- The schema is
db/schema/*.sql, one file per table, holding itsCREATE TABLE, its indexes and itsGRANTs. The rake task concatenates the files in sorted order and hands psqldef one desired schema. - There is no
db/migrate/and noschema.rb/structure.sql. The.sqlfiles are the source of truth, and reviewers read the diff of the desired state, not a migration. - A schema change ships in the same commit as the code that uses it, never as a preparatory commit.
rake db:migrateapplies the files;rake db:migrate:statusshows the plan (--dry-run). Read the plan before applying anything that drops or rewrites.- psqldef only expresses the end state, plus rename hints. Renaming a table or column without the hint looks like drop-and-add, and a backfill does not exist in the file at all (see below).
-- db/schema/widgets.sql
create table widgets (
id uuid primary key default gen_random_uuid(),
owner_id uuid not null references owners (id),
name varchar(64) not null,
created_at timestamp(6) with time zone not null default now(),
updated_at timestamp(6) with time zone not null default now()
);
create index idx_widgets_owner_id on widgets (owner_id);
grant all privileges on widgets to app_admin;
grant select, insert, update, delete on widgets to app_user;
Write a comment on a column whose meaning the name does not carry (an enum's values, an encoded payload). It is the only schema documentation there is.
Rake tasks
references/database.rake is a complete lib/tasks/database.rake for plain PostgreSQL; copy it and adjust. What it does:
What ships with it
1 file 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.
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 · 120 lines · 182 tokens per session scan A 2eeacc6941d9
sqldef-on-rails is a skill published in the GitHub repository sorah/config (31 stars, last pushed yesterday), licensed MIT. It adds 182 tokens to every session and 2,045 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). 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.