data-model-generator

data-model-generator is an agent for Claude Code from navraj007in/architecture-cowork-plugin. It costs 36 tokens per session (4,865 once invoked), scanned A, original, Apache-2.0.

An agent that turns shared application types and database definitions into ORM database schemas and starting migrations. An ORM is a programming layer that maps application data to database tables or collections.

In plain words
What is it for?
Use it with Prisma, SQLAlchemy, Mongoose, or Drizzle to generate schemas and, when requested, run an initial database migration from a blueprint and chosen technology stack.
Why use it?
It removes repetitive work when converting a project blueprint into database code. It first establishes which domain entities must receive schemas from the project's definitions.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the architect plugin — 48 skills, 63 commands, 19 agents, 7 MCP servers shipped together

Good fit Use it with Prisma, SQLAlchemy, Mongoose, or Drizzle to generate schemas and, when requested, run an initial database migration from a blueprint and chosen technology stack.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/navraj007in/architecture-cowork-plugin/data-model-generator
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.

Clone the repo
git clone --depth 1 https://github.com/navraj007in/architecture-cowork-plugin

Made for: Claude Code.

Or install architect, the plugin that ships this one along with the rest of its 48 skills, 63 commands, 19 agents, 7 MCP servers.

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 data-model-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/navraj007in/architecture-cowork-plugin/data-model-generator/github.svg)](https://agentmods.dev/agents/navraj007in/architecture-cowork-plugin/data-model-generator)
Your own site
<a href="https://agentmods.dev/agents/navraj007in/architecture-cowork-plugin/data-model-generator"><img src="https://agentmods.dev/badge/agents/navraj007in/architecture-cowork-plugin/data-model-generator/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 data-model-generator

Your own site · 80×15
<a href="https://agentmods.dev/agents/navraj007in/architecture-cowork-plugin/data-model-generator"><img src="https://agentmods.dev/badge/agents/navraj007in/architecture-cowork-plugin/data-model-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,865 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.00036 $0.04865
Opus 5 $0.00018 $0.02433
Sonnet 5 $0.00007 $0.00973
Haiku 4.5 $0.00004 $0.00487

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

Security

Grade A, and why

data-model-generator 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 10d 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/data-model-generator.md · 574 lines

How it starts

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

Data Model Generator Agent

You are the Data Model Generator Agent for the Architect AI plugin. Your job is to take the shared types (deliverable 4d) and database definitions from a blueprint's manifest and generate real, working ORM schemas with initial migrations.

Input

You will receive:

  • Shared types from the manifest (name, fields, used_by)
  • Database definitions from the manifest (type, purpose, key collections/tables)
  • The tech stack (framework, ORM preference)
  • The scaffolded project directory path
  • Whether to run initial migration

Process

0. Resolve Entity List

Before doing anything else, establish the authoritative entity inventory:

  1. Read domain.entities[] from SDL — this is the primary source. Check solution.sdl.yaml first; if absent, read sdl/README.md then the relevant module (typically sdl/data.yaml or sdl/domain.yaml). It lists PascalCase entity names (e.g. User, Appointment, Payment). Every entity here MUST get a schema.
  2. If domain.entities[] is absent, fall back to _state.json.entities (array of {name, fields, owner}).
  3. If neither exists, fall back to shared types from the manifest.

Do NOT read the SDL data: section for entity namesdata: describes database infrastructure (type, hosting, indexes), not entity names. Entity names live in domain:.

0.5: Check Multi-Tenancy Configuration

If SDL has nonFunctional.multiTenancy.enabled: true:

  • Add tenant_id UUID NOT NULL field to EVERY entity
  • If isolation model is schema-per-tenant: prefix all table names with tenant schema (e.g., CREATE TABLE tenant_${tenantId}.users (...))
  • If isolation model is row-level-security: add RLS policy to all tables:
    CREATE POLICY tenant_isolation ON users
      USING (tenant_id = current_setting('app.current_tenant_id')::uuid);
    
  • Set tenantIdField from SDL (default: tenant_id)

If nonFunctional.multiTenancy.enabled: false (single-tenant or not specified):

  • No special handling; proceed normally

Read the full file on GitHub · 574 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. 10d ago First seen · 574 lines · 36 tokens per session scan A f5c570c23921

Subscribe to this mod's changes

data-model-generator is an agent published in the GitHub repository navraj007in/architecture-cowork-plugin (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 36 tokens to every session and 4,865 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

data-engineer

Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…

testdouble/han · 216 tokens

d1-query-optimizer

Performance analysis agent that identifies slow queries, missing indexes, and optimization opportunities in Cloudflare D1 databases using metrics, insights, and query plan analysis. Use when encountering slow queries, high latency, or performance degradation.

secondsky/claude-skills · 49 tokens

reviewer-data-integrity

Use this agent when you need to review database migrations, data models, or any code that manipulates persistent data. This includes checking migration safety, validating data constraints, ensuring transaction boundaries are correct, and verifying that referential integrity and privacy requirements are maintained.…

wsauret/flywheel · 253 tokens

dnp-ef-migration-planner

🗄️ EF Core migration safety — validates migration chain, detects data loss risks, ensures correct DbContext targeting.

zdanovichnick/dotnet-pilot · 33 tokens

section-writer

Generates self-contained implementation section content. Outputs raw markdown. Used by /deep-plan for parallel section generation.

piercelamb/deep-plan · 26 tokens

n1-hunter

Use this agent when you need to statically find N+1 query patterns in ORM or data-access code, loops that lazily load a relation per row, missing eager-loading (selectrelated/prefetchrelated/joinedload/includes/with/Include/Preload), or serializer-triggered per-row queries. Trigger phrases include "N+1", "N plus one"…

sigistry/marketplace · 0 tokens