migrations

migrations is a skill for Claude Code from filipebraida/adonisjs-starter-kit. It costs 141 tokens per session (1,802 once invoked), scanned A, original, MIT.

A set of project-specific rules for managing database migrations with Lucid, the database layer used by AdonisJS. Migrations are versioned code files that create or change database tables.

In plain words
What is it for?
Use it when adding or changing a database table or column, configuring a module's migration path, or regenerating and committing the database schema.
Why use it?
It defines how this starter project keeps one clean table-creation migration, registers migration folders, and updates its generated database schema without manual edits.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when adding or changing a database table or column, configuring…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/filipebraida/adonisjs-starter-kit/migrations
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.

Any agent
npx skills add filipebraida/adonisjs-starter-kit --skill migrations
Clone the repo
git clone --depth 1 https://github.com/filipebraida/adonisjs-starter-kit

Made for: Claude Code.

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 migrations

README.md
[![agentmods](https://agentmods.dev/badge/skills/filipebraida/adonisjs-starter-kit/migrations.svg)](https://agentmods.dev/skills/filipebraida/adonisjs-starter-kit/migrations)
Your own site
<a href="https://agentmods.dev/skills/filipebraida/adonisjs-starter-kit/migrations"><img src="https://agentmods.dev/badge/skills/filipebraida/adonisjs-starter-kit/migrations.svg" alt="Measured on agentmods" height="20"></a>
Per session 141 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,802 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00141 $0.01802
Opus 5 $0.00071 $0.00901
Sonnet 5 $0.00028 $0.00360
Haiku 4.5 $0.00014 $0.00180

Measured 7d ago against content hash 4fc05867feb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

packages/skills/migrations/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrations

Standard Lucid migrations — BaseSchema subclasses in app/<mod>/database/migrations/<ts>_<name>.ts with up() and down(). Three things are specific to this starter kit:

  1. Assumes no production data. When adding a column to an existing table, edit the existing create_<table>_table.ts migration and run pnpm ace migration:fresh instead of layering an alter_table migration on top. The goal is that every downstream project inherits a clean single migration per table, not a create-then-alter chain.
  2. Migration paths are explicit per module in apps/web/config/database.tsconnections.postgres.migrations.paths. There is no autoloader. Add the module's path when it first gets a migration ([[module-scaffolding]]).
  3. apps/web/app/core/database/schema.ts is auto-generated but committed — models import their schemas from it, so ace cannot boot on a fresh checkout without the file. Regenerated on migration:run / fresh; commit the diff alongside the migration change. Framework-owned — never hand-edit or lint it.

Rules

  • Location: app/<mod>/database/migrations/<unix-ms-timestamp>_<name>.ts. Filename shape mirrors ace make:migration output.
  • up() builds the table using this.schema.createTable(...) with knex-style builders. Include id primary first, business columns next, created_at (not null) and updated_at (nullable) at the bottom, plus any indexes.
  • down() drops the table with this.schema.dropTable(this.tableName).
  • Edit-in-place for schema evolution — the starter-kit rule. Add the column to create_<table>_table.ts, then pnpm ace migration:fresh to rebuild. Downstream projects that have production data adopt a stricter policy (alter-in-place chains, tools like pg_dump for reversibility).
  • migration:fresh is destructive — drops every table, re-runs every migration. Never on shared / production DB.
  • migration:run is additive — only runs migrations that haven't been applied. Use for adding net-new migrations without dropping data.
  • Migration paths: append 'app/<mod>/database/migrations' to apps/web/config/database.ts when the module first gets a migration. Same for seeder paths (seeders.paths).
  • Postgres types: text for strings without hard limits, jsonb for JSON payloads (not jsonjsonb is queryable and indexable), timestamp for datetimes.
  • Indexes: declare with table.index([...]) in the same migration. For lookup columns (user_id, tenant_id, notifiable_id), always add.
  • Cross-module FKs live with the table's owner. An alter_table or foreign-key column on another module's table belongs in that module's migration, not yours. If ownership is muddy, add a join table in your own module instead — don't reach into a table you don't own.

Read the full file on GitHub · 110 lines

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. 7d ago First seen · 110 lines · 141 tokens per session scan A 4fc05867feb9

Subscribe to this mod's changes

migrations is a skill published in the GitHub repository filipebraida/adonisjs-starter-kit (96 stars, last pushed 27d ago), licensed MIT. It adds 141 tokens to every session and 1,802 once invoked, about $0.0007 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

coss-particles

Index of all COSS UI particle examples. Use when implementing UI features to find copy-paste-ready component patterns built on coss primitives. Each particle has a description and a JSON URL for easy installation.

cosscom/coss · 46 tokens

coss

Helps implement coss UI components correctly. Use when building UIs with coss primitives and patterns (buttons, dialogs, selects, forms, menus, tabs, segmented controls, inputs, toasts, etc.), migrating from shadcn/Radix to coss/Base UI, composing trigger-based overlays, or troubleshooting coss component behavior.…

cosscom/coss · 85 tokens

ui-beats

Use this skill when users want to add, customize, or troubleshoot UI Beats components in React/Next.js projects. It covers component selection, shadcn registry installation from uibeats.com, the UI Beats MCP server, motion and reduced-motion handling, and integration patterns for animated sections.

nikhils4/ui-beats · 62 tokens

morphous-catalog

Create or refresh Morphous website design-system/theme bundles from animal, insect, plant, landscape, mineral, weather, or other nature motifs. Use when Codex is asked to generate Morphous motif images, light/dark design-system boards, reusable image prompts, generated web assets, shadcn/tweakcn theme exports, or the…

Ameyanagi/morphos · 79 tokens

design-a-schema

Model a new table (or reshape an existing one) in libs/db with Drizzle — normalize by default, add the right constraints, and index deliberately. Use when adding a table/column, deciding on keys and foreign keys, or when a query is slow because the schema or its indexes are wrong. Enforces the stack's "Drizzle is the…

lonormaly/builders-stack · 91 tokens

optimize-a-query

Diagnose and fix a slow Postgres query in the builders-stack — read its EXPLAIN plan, find the missing index or the ORM N+1, and confirm the fix. Use when a page or endpoint is slow, a query times out, or pgstatstatements shows a hot query. Pairs with design-a-schema for the index itself.

lonormaly/builders-stack · 77 tokens