database-schema-workflow

A documented process for changing the Player database entity and keeping the application’s data models and migrations in sync. It covers SQLite, a file-based database, and PostgreSQL, a database server.

In plain words
What is it for?
Use it when adding or changing Player fields, creating migrations, updating seed data and tests, or switching between SQLite and PostgreSQL.
Why use it?
It prevents schema changes from working in one database but failing in the other. It also clarifies which environment settings select each database.

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/nanotaboada/dotnet.samples.aspnetcore.webapi/database-schema-workflow
Any agent
npx skills add nanotaboada/Dotnet.Samples.AspNetCore.WebApi --skill database-schema-workflow
Clone the repo
git clone --depth 1 https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi

Made for: Claude Code, Codex.

Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 344 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 $0.00058 $0.00344
Opus 5 $0.00029 $0.00172
Sonnet 5 $0.00012 $0.00069
Haiku 4.5 $0.00006 $0.00034

Measured 2d ago against content hash da293b432b1c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

database-schema-workflow 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 2d 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.

.claude/skills/database-schema-workflow/SKILL.md · 25 lines

What it actually says

Database schema workflow

Modify schema: Update Player entity → update DTOs → update AutoMapper profile → update HasData() seed data in OnModelCreating if needed → add migrations for both providers → update tests → run dotnet test.

# SQLite migration (default)
dotnet ef migrations add <Name> --project src/Dotnet.Samples.AspNetCore.WebApi
# PostgreSQL migration
DATABASE_PROVIDER=postgres DATABASE_URL="Host=localhost;..." \
  dotnet ef migrations add <Name> --project src/Dotnet.Samples.AspNetCore.WebApi --output-dir Migrations/Npgsql

Switch database provider:

  • Set DATABASE_PROVIDER=postgres to use PostgreSQL, or leave unset for SQLite (default).
  • DATABASE_URL (required for PostgreSQL) follows the Npgsql convention: Host=...;Database=...;Username=...;Password=....
  • For SQLite, STORAGE_PATH overrides the default file path (AppContext.BaseDirectory/storage/players-sqlite3.db).
  • ProviderSpecificMigrationsAssembly filters migration discovery to the active provider's namespace at runtime — no code changes needed to switch.
  • Migrations run automatically at startup via MigrateAsync(); no manual dotnet ef database update is required.
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. 2d ago First seen · 25 lines · 58 tokens per session scan A da293b432b1c

Subscribe to this mod's changes

database-schema-workflow is a skill published in the GitHub repository nanotaboada/Dotnet.Samples.AspNetCore.WebApi (10 stars, last pushed 2d ago), licensed MIT. It adds 58 tokens to every session and 344 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-31.