elixir-phoenix-migrations

elixir-phoenix-migrations is a skill for Claude Code, Codex from ccarvalho-eng/codex-elixir-phoenix. It costs 24 tokens per session (438 once invoked), scanned A, original, MIT.

A planning guide for changing Ecto database schemas backed by PostgreSQL, the database system used by many Phoenix applications.

In plain words
What is it for?
Use it to plan staged schema changes, resumable data backfills, index or column additions, renames, type changes, and cleanup work.
Why use it?
It helps avoid downtime, unsafe changes, lost data, and migrations that cannot be safely rolled back.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/ccarvalho-eng/codex-elixir-phoenix/elixir-phoenix-migrations
Any agent
npx skills add ccarvalho-eng/codex-elixir-phoenix --skill elixir-phoenix-migrations
Clone the repo
git clone --depth 1 https://github.com/ccarvalho-eng/codex-elixir-phoenix

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for elixir-phoenix-migrations

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccarvalho-eng/codex-elixir-phoenix/elixir-phoenix-migrations.svg)](https://agentmods.dev/skills/ccarvalho-eng/codex-elixir-phoenix/elixir-phoenix-migrations)
Your own site
<a href="https://agentmods.dev/skills/ccarvalho-eng/codex-elixir-phoenix/elixir-phoenix-migrations"><img src="https://agentmods.dev/badge/skills/ccarvalho-eng/codex-elixir-phoenix/elixir-phoenix-migrations.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 438 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.00438
Opus 5 $0.00012 $0.00219
Sonnet 5 $0.00005 $0.00088
Haiku 4.5 $0.00002 $0.00044

Measured 5d ago against content hash 101e27bd77f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

elixir-phoenix-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 5d 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.

skills/elixir-phoenix-migrations/SKILL.md · 68 lines

What it actually says

Ecto Migration Safety Workflow

Use when schema changes touch production data or availability. This skill optimizes for reversible, staged rollouts.

When to Use

  • Adding columns or indexes on large tables
  • Renaming or changing field types
  • Backfilling derived data
  • Splitting one migration into deploy-safe phases
  • Planning rollback behavior before release

Iron Laws

  1. Never ship destructive schema changes in the same release as new app code that depends on them.
  2. Prefer additive migrations first, then code switch, then cleanup migration.
  3. Every data backfill must be resumable and idempotent.
  4. Validate expected locks and runtime impact before merge.
  5. Define rollback/forward-fix strategy before running in production.

Workflow

Step 1: Classify the Change

Mark the request as:

  • Additive: safe in one step (new nullable column, concurrent index)
  • Transitional: requires staged deploy (rename/type change)
  • Destructive: requires explicit cleanup phase and rollback plan

Step 2: Generate Migration Plan

For transitional/destructive work, create a phased sequence:

  1. Migration A: additive schema only
  2. Application update: read/write both shapes when needed
  3. Backfill job or migration-safe data movement
  4. Migration B: constraints and cleanup after cutover

Step 3: Validate SQL Risk

Check for:

  • Full-table rewrites
  • Blocking index operations (prefer concurrent when supported)
  • Constraint validation timing
  • Lock-sensitive operations during peak traffic

Step 4: Define Runtime Execution

Specify:

  • Order of deploy vs migration steps
  • Backfill execution command and progress signal
  • Rollback path (and whether rollback is data-safe)

Output Expectations

Return:

  • Exact migration sequence by phase
  • Commands to run in each phase
  • Risk notes and mitigations
  • Rollback/forward-fix strategy
Changes

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.

  1. 5d ago First seen · 68 lines · 24 tokens per session scan A 101e27bd77f7

Subscribe to this mod's changes

elixir-phoenix-migrations is a skill published in the GitHub repository ccarvalho-eng/codex-elixir-phoenix (11 stars, last pushed 4mo ago), licensed MIT. It adds 24 tokens to every session and 438 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

drizzle

LobeHub Drizzle ORM schema and query style. Use for pgTable schemas, indexes, joins, inferred types, db.select/db.query, schema fields, foreign keys, junction tables, or postgres query patterns.

lobehub/lobehub · 46 tokens

ash-framework

Use this skill working with Ash Framework or any of its extensions. Always consult this when making any domain changes, features or fixes.

agentjido/jido_managed_agents · 29 tokens

supabase-operations

Design, deploy, and operate Supabase projects with explicit schema, migration, security, backup, and observability checks. Use for Supabase architecture, Postgres changes, auth, storage, edge functions, or deployment operations.

TIKAZI/TIKAZ-AI-Skills · 50 tokens

supabase-postgres-best-practices

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

guillermoscript/lms-front · 41 tokens

prisma-database-setup

Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.). Use when setting up a new project, changing databases, or troubleshooting connection issues. Triggers on "configure postgres", "connect to mysql", "setup mongodb", "sqlite setup".

JustineDevs/CRUX · 67 tokens

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens