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.
git clone --depth 1 https://github.com/bernierllc/agents-environment-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/rules/bernierllc/agents-environment-config/alembic)<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/alembic"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/alembic/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/rules/bernierllc/agents-environment-config/alembic"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/alembic.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.00000 | $0.00585 |
| Opus 5.5 | $0.00000 | $0.00234 |
| Sonnet 5.5 | $0.00000 | $0.00117 |
| Haiku 4.5 | $0.00000 | $0.00059 |
Grade A, and why
alembic 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 1mo 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 — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Alembic Migration Rules
Command Usage
Standard Commands
Use python manage.py or make for all database tasks:
# Create migration
make makemigration m="add foo"
# or
python manage.py makemigration -m "add foo"
# Apply migrations
make migrate
# or
python manage.py migrate
# Reset DB (dev only!)
make reset
# or
python manage.py reset
# Seed DB
make seed
# or
python manage.py seed
Migration Best Practices
Autogenerate Migrations
- Autogenerate always works (all models imported in env.py)
- Review autogenerated migrations before applying
- Never auto-generate without review
- Manual migration review ensures correctness
Database Configuration
- DB URL is always read from app config, not alembic.ini
- Use environment variables for database URLs
- Different URLs for different environments
Migration Management
- Alembic revision every PR - Create migrations for each pull request
- Never auto-generate without review - Always review generated migrations
- Manual migration review ensures correctness
Migration Workflow
- Make schema changes in SQLAlchemy models
- Generate migration:
python manage.py makemigration -m "description" - Review migration file - Check generated SQL
- Test migration: Apply to development database
- Commit migration with code changes
Common Patterns
Adding a Column
# Migration file
def upgrade():
op.add_column('users', sa.Column('email', sa.String(), nullable=True))
def downgrade():
op.drop_column('users', 'email')
Creating a Table
def upgrade():
op.create_table(
'users',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('users')
Best Practices
- Review all migrations before applying
- Test migrations on development database first
- Keep migrations small and focused
- Never edit existing migrations (create new ones)
- Document migrations with clear descriptions
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.
- 1mo ago First seen · 101 lines · 0 tokens per session scan A b5909d0eef17
alembic is a cursor rule published in the GitHub repository bernierllc/agents-environment-config (11 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 585 tokens. 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-31.
Other cursor rules, from other repositories
django-orm
This guide provides opinionated, actionable best practices for writing efficient, maintainable, and performant Django ORM code, focusing on common pitfalls and modern patterns.
peewee
Definitive guidelines for writing robust, maintainable, and performant Peewee ORM code in Python, covering data modeling, querying, and application structure.
database-algorithm-rules
Database algorithm rules guide Python applications that store and retrieve data, including containerized services. They cover schema design, indexes, query efficiency, transactions, connection pools, caching, retries, and migrations.
django-models
A small set of rules for Django models, the Python framework's definitions of database-backed data. It also guides how Django code should access and validate that data.
sqlalchemy-patterns
SQLAlchemy models, queries, relationships.
sqlmodel
Satisfying the type checker when working with SQLModel.