update-schema

update-schema is a skill for Claude Code, Codex from KhaledSaeed18/node-express-boilerplate. It costs 56 tokens per session (795 once invoked), scanned A, original, MIT.

A database-structure update guide for Prisma, a tool that connects a TypeScript or JavaScript app to its database. It covers adding models, fields, and relationships, then applying the database migration and rebuilding the generated client.

In plain words
What is it for?
Use it when adding a database model, changing a field, or modifying how records relate to one another in a Prisma project.
Why use it?
It reduces the risk of changing the app's code without bringing the database structure and generated database code into agreement. It also explains how to handle existing records when adding required fields.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when adding a database model, changing a field, or modifying how records relate to one another in a Prisma project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khaledsaeed18/node-express-boilerplate/update-schema
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 KhaledSaeed18/node-express-boilerplate --skill update-schema
Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/node-express-boilerplate

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 update-schema

README.md
[![agentmods](https://agentmods.dev/badge/skills/khaledsaeed18/node-express-boilerplate/update-schema/github.svg)](https://agentmods.dev/skills/khaledsaeed18/node-express-boilerplate/update-schema)
Your own site
<a href="https://agentmods.dev/skills/khaledsaeed18/node-express-boilerplate/update-schema"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/node-express-boilerplate/update-schema/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.

agentmods 80×15 button for update-schema

Your own site · 80×15
<a href="https://agentmods.dev/skills/khaledsaeed18/node-express-boilerplate/update-schema"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/node-express-boilerplate/update-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 795 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00056 $0.00795
Opus 5.5 $0.00022 $0.00318
Sonnet 5.5 $0.00011 $0.00159
Haiku 4.5 $0.00006 $0.00080

Measured 2mo ago against content hash 12fc2bd81024, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

update-schema 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 2mo 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.

.agents/skills/update-schema/SKILL.md · 104 lines

How it starts

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

When the user asks to modify the Prisma schema, follow this sequence.

Step 1 — Edit prisma/schema.prisma

Adding a new model:

model <Name> {
    id        String   @id @default(cuid())
    // required fields
    // optional fields (mark with ?)
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt

    // relations
    userId String
    user   User   @relation(fields: [userId], references: [id], onDelete: Cascade)

    @@index([userId])
    @@index([/* other commonly filtered fields */])
    @@map("<snake_case_table_name>")
}

Adding fields to an existing model:

  • Nullable new fields (safest for existing data): fieldName Type?
  • Non-nullable with a default: fieldName Type @default(value)
  • Non-nullable without a default: requires a migration with a --create-only step to backfill data before applying

Changing relations:

  • Adding a one-to-many: add the array field on the "one" side and the FK field + scalar on the "many" side
  • Always set onDelete: explicitly — use Cascade for child records that must not outlive the parent, Restrict or SetNull otherwise

Naming conventions:

  • Table names: @@map("snake_case") on every model
  • Column names: @map("snake_case") on every field that differs from the Prisma field name
  • All IDs: @id @default(cuid())
  • Always add @@index on foreign key columns

Step 2 — Run the migration

pnpm prisma:migrate

This creates a new migration file in prisma/migrations/ and applies it to the dev database.

If the migration involves a non-nullable column without a default (data backfill needed):

pnpm exec prisma migrate dev --create-only   # generate SQL without applying
# edit the generated SQL to add UPDATE statement for existing rows
pnpm exec prisma migrate deploy              # apply the edited migration

Step 3 — Regenerate the Prisma client

pnpm prisma:generate

This must run after every schema change. The generated client lives in src/generated/prisma/.

Read the full file on GitHub · 104 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. 2mo ago First seen · 104 lines · 56 tokens per session scan A 12fc2bd81024

Subscribe to this mod's changes

update-schema is a skill published in the GitHub repository KhaledSaeed18/node-express-boilerplate (36 stars, last pushed 4d ago), licensed MIT. It adds 56 tokens to every session and 795 once invoked, about $0.0002 per session on Opus 5.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

update-schema compared with skills from other repositories

update-schema next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
update-schemaKhaledSaeed18/node-express-boilerplateSkill364d agoMITA56Claude Code, Codex
prisma-8prisma/ormSkill48kyesterdayApache-2.0A220Claude Code, Codex
django-migrationsPostHog/posthogSkill41kyesterdaynoneA99Claude Code, Codex
mail-timeveliovgroup/mail-timeSkill1439d agoBSD-3-ClauseA195Claude Code, Codex
webiny-api-cms-content-modelswebiny/webiny-jsSkill8.0kyesterdaynoneA313Claude Code, Codex
webiny-form-modelwebiny/webiny-jsSkill8.0kyesterdaynoneA93Claude Code, Codex
webiny-api-cms-custom-field-typewebiny/webiny-jsSkill8.0kyesterdaynoneA60Claude Code, Codex