Install
$ agentstack add skill-maksimzayats-specx-specx-sqlalchemy-migrations ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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, and
migrations/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//infrastructure/sqlalchemy/.
- Add a project-local SQLAlchemy declarative base under
src//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 from migrations/env.py and its guardrail test before assigning target_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, or
drop_all from src/.
- 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/*.py file.
- 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's connect and begin event-hook recipe.
Code Style
Use blank lines as logical separators in all code. Keep related statements together, but separate independent setup, action, assertion, response, branch, and transformation groups so long blocks stay readable.
References
references/alembic.md- async Alembic layout, env.py, Makefile targets,
initial migration, and migration tests.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: maksimzayats
- Source: maksimzayats/specx
- License: MIT
- Homepage: https://specx.dev
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.