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 maksimzayats/specx --skill specx-sqlalchemy-migrationsgit clone --depth 1 https://github.com/maksimzayats/specxWrote 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/maksimzayats/specx/specx-sqlalchemy-migrations)<a href="https://agentmods.dev/skills/maksimzayats/specx/specx-sqlalchemy-migrations"><img src="https://agentmods.dev/badge/skills/maksimzayats/specx/specx-sqlalchemy-migrations.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00063 | $0.00732 |
| Opus 5 | $0.00032 | $0.00366 |
| Sonnet 5 | $0.00013 | $0.00146 |
| Haiku 4.5 | $0.00006 | $0.00073 |
Grade A, and why
specx-sqlalchemy-migrations 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 8d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
specx SQLAlchemy Migrations
Use this skill whenever a specx project has SQLAlchemy models or persistence
adapters. Read references/alembic.md before editing migration files.
Workflow
- Add
alembic>=1.18.5as a runtime dependency when SQLAlchemy adapters exist, together with SQLAlchemy's asyncio extra and the selected driver. - Add
alembic.ini,migrations/env.py,migrations/script.py.mako, andmigrations/versions/. - Use Alembic's async pattern for async SQLAlchemy engines.
- Put app-wide SQLAlchemy settings/session factory under top-level
infrastructure/sqlalchemy/. - Keep scope-owned ORM models and repositories under
core/<scope>/infrastructure/sqlalchemy/. - Add a project-local SQLAlchemy declarative base under
src/<package>/foundation/sqlalchemy_model.py; do not use shared packaged metadata for generated services. - Put reusable model discovery under top-level
infrastructure/sqlalchemy/model_discovery.py. Use that same function frommigrations/env.pyand its guardrail test before assigningtarget_metadata; do not duplicate discovery or maintain hard-coded model module names. - Set
target_metadatato the project-localBaseSQLAlchemyModel.metadata. - Generate or hand-review an initial migration for current models.
- Add
make migrateandmake makemigrations. - Add tests that run
alembic upgrade headagainst an isolated database, check for pending autogenerate changes, and prove every core SQLAlchemy model file is included by the exact discovery function Alembic uses. Use the production database family when dialect behavior matters.
Guardrails
- Do not call
Base.metadata.create_all,metadata.create_all, ordrop_allfromsrc/. - Do not run migrations from FastAPI startup by default. Run migrations as an operational command before app startup.
- Do not put app-wide engine/session factory code inside one core scope.
- Do not let delivery controllers import ORM models, repositories, sessions, or migration helpers.
- Do not let Alembic drift checks depend on incomplete metadata. Model discovery
must include every
core/*/infrastructure/sqlalchemy/models/*.pyfile. - Do not trust autogenerated migrations without review.
- Do not edit, delete, or reorder a revision that may already have been applied; add a new corrective revision.
- Do not pass SQLite's
autocommitconnect argument on Python 3.11. For a savepoint-based SQLite test harness spanning Python versions, use SQLAlchemy'sconnectandbeginevent-hook recipe.
What ships with it
2 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.
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.
- 8d ago First seen · 66 lines · 63 tokens per session scan A 75fac4082cbc
specx-sqlalchemy-migrations is a skill published in the GitHub repository maksimzayats/specx (201 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 732 once invoked, about $0.0003 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.
Other skills, from other repositories
new-entity
Create a backend entity with EF Core configuration and migration.
multitenant
Architecture multitenant avec approche tiered (Shared/Dedicated Schema/DB), RBAC/ABAC, field-level encryption. Use when working with multitenant applications, tenant isolation, data segregation.
graphql
GraphQL API design, Apollo Federation, schema stitching, resolvers, N+1 query problem. Use when implementing GraphQL API, federation, or optimizing queries.
postgres-drizzle
Proactively apply when creating APIs, backends, or data models. Triggers on PostgreSQL, Postgres, Drizzle, drizzle-orm, drizzle-kit, database, schema, pgTable, tables, columns, indexes, queries, migrations, ORM, relations, relational queries, joins, transactions, SQL, connection pooling, PgBouncer, N+1, JSONB, RLS…
testing-paperclip
Paperclip-Testing-Strategie — Vitest, Plugin-Test-Harness aus @paperclipai/plugin-sdk/testing, echte Postgres-Integration-Tests, Cross-Tenant-Isolation. Verwenden Sie dies beim Schreiben oder Reviewen von Paperclip-Tests.
flyway-or-liquibase-detection
Auto-detect the project's DB migration tool and follow its conventions. Never use both. Use when designing or writing a schema change.