schema-gen

schema-gen is a skill for Claude Code from GlamgarOnDiscord/claude-saas-blueprint. It costs 23 tokens per session (454 once invoked), scanned A, original, MIT.

A database setup generator that creates a data schema, migration files, TypeScript types, validation, and a basic repository for an entity such as an invoice or project.

In plain words
What is it for?
Use it to add a new entity to a project using Drizzle, Prisma, or SQLAlchemy. It prepares the database changes and the code needed to create, read, update, and delete records.
Why use it?
It removes the repetitive work of connecting database structure to application code. It also applies common fields, relationships, indexes, and soft deletion when appropriate.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to add a new entity to a project using Drizzle, Prisma, or SQLAlchemy. It prepares the database changes and the code needed to create, read, update, and delete records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/glamgarondiscord/claude-saas-blueprint/schema-gen
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 GlamgarOnDiscord/claude-saas-blueprint --skill schema-gen
Clone the repo
git clone --depth 1 https://github.com/GlamgarOnDiscord/claude-saas-blueprint

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/glamgarondiscord/claude-saas-blueprint/schema-gen/github.svg)](https://agentmods.dev/skills/glamgarondiscord/claude-saas-blueprint/schema-gen)
Your own site
<a href="https://agentmods.dev/skills/glamgarondiscord/claude-saas-blueprint/schema-gen"><img src="https://agentmods.dev/badge/skills/glamgarondiscord/claude-saas-blueprint/schema-gen/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 schema-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/glamgarondiscord/claude-saas-blueprint/schema-gen"><img src="https://agentmods.dev/badge/skills/glamgarondiscord/claude-saas-blueprint/schema-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 454 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.00023 $0.00454
Opus 5 $0.00012 $0.00227
Sonnet 5 $0.00005 $0.00091
Haiku 4.5 $0.00002 $0.00045

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

Security

Grade A, and why

schema-gen 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 12d 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/schema-gen/SKILL.md · 46 lines

What it actually says

Arguments

  • entity : Nom de l'entité (ex: "Invoice", "Project")
  • fields : Description des champs en langage naturel

Instructions

1. Détection ORM

Lire .claude/memory/stack.md ou détecter :

  • drizzle.config.ts → Drizzle ORM
  • schema.prisma → Prisma
  • alembic/ → SQLAlchemy
  • Sinon → demander à l'utilisateur

2. Génération du Schema

Créer le fichier de schema avec :

  • Tous les champs demandés avec types appropriés
  • id : UUID v7 par défaut (ordonné chronologiquement)
  • organizationId : FK pour multi-tenancy (sauf si explicitement exclu)
  • createdAt : timestamp, default now
  • updatedAt : timestamp, auto-update
  • deletedAt : timestamp nullable (soft delete)
  • Index sur les FK et champs fréquemment recherchés
  • Relations définies explicitement

3. Fichiers Générés

  1. Schema/Migration : Dans le dossier de l'ORM
  2. Entity type dans core/entities/{entity}.ts :
    • Type TypeScript pur (pas d'import ORM)
    • Validation via Zod schema
  3. Port dans core/ports/i-{entity}-repo.ts :
    • Interface du repository avec CRUD de base
  4. Adapter dans adapters/db/{entity}-repo.ts :
    • Implémentation du port avec l'ORM choisi
    • Inclut soft delete, pagination, filtres de base

4. Validation

  • Générer et exécuter la migration
  • tsc --noEmit
  • Mettre à jour .claude/memory/domains.md
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. 12d ago First seen · 46 lines · 23 tokens per session scan A ed3f901295f1

Subscribe to this mod's changes

schema-gen is a skill published in the GitHub repository GlamgarOnDiscord/claude-saas-blueprint (2 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 454 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-31.