Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/PackmindHub/packmindnpx agentmods add commands/packmindhub/packmind/create-or-update-model-and-typeorm-schemasWrote 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.
[](https://agentmods.dev/commands/packmindhub/packmind/create-or-update-model-and-typeorm-schemas)<a href="https://agentmods.dev/commands/packmindhub/packmind/create-or-update-model-and-typeorm-schemas"><img src="https://agentmods.dev/badge/commands/packmindhub/packmind/create-or-update-model-and-typeorm-schemas.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00008 | $0.00830 |
| Opus 5 | $0.00004 | $0.00415 |
| Sonnet 5 | $0.00002 | $0.00166 |
| Haiku 4.5 | $0.00001 | $0.00083 |
Grade A, and why
create-or-update-model-and-typeorm-schemas 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Create new models and update existing ones with TypeORM to ensure proper database structure and maintainability when adapting to evolving business requirements.
When to Use
- When you need to create a new entity in your hexagonal domain
- When adding new properties to existing models
- When modifying existing property types or relationships
- When business logic requirements change and database schema needs updating
Context Validation Checkpoints
- Have you identified which hexagon package the model belongs to?
- Do you know the TypeORM column types needed for each property?
- Have you considered backward compatibility when adding required fields?
- Is there an existing test factory for similar entities to use as reference?
Recipe Steps
Step 1: Define Business Model
Create the business model in packages//src/domain/entities/.ts and define the corresponding repository interface in packages//src/domain/repositories/IRepository.ts. Export both from the hexagon.
// packages/<hexagon>/src/domain/entities/MyModel.ts
export type MyModel = {
id: string;
name: string;
description?: string;
};
Step 2: Define TypeORM Schema
Create the TypeORM schema in packages//src/infra/schemas/Schema.ts using EntitySchema with proper column definitions, UUID schema, and timestamp schemas from @packmind/node-utils.
import { EntitySchema } from 'typeorm';
import { MyModel } from '../../domain/entities/MyModel';
import { WithTimestamps, uuidSchema, timestampsSchemas } from '@packmind/node-utils';
export const MyModelSchema = new EntitySchema<WithTimestamps<MyModel>>({
name: 'MyModel',
tableName: 'mymodels',
columns: {
...uuidSchema,
name: { type: 'varchar' },
description: { type: 'text', nullable: true },
...timestampsSchemas,
},
});
Step 3: Make Schema Available to App
Register the new schema in apps/api/src/app/app.module.ts to ensure TypeORM recognizes it during database operations.
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.
- 4d ago First seen · 105 lines · 8 tokens per session scan A 90e3f5dc78ff
create-or-update-model-and-typeorm-schemas is a command published in the GitHub repository PackmindHub/packmind (309 stars, last pushed today), licensed Apache-2.0. It adds 8 tokens to every session and 830 once invoked, about $0.0000 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-09-03.
Other commands, from other repositories
data-architect
You are a rigorous data architect. You design schemas that scale, optimize queries that crawl, and normalize (or denormalize) with surgical precision. You do not accept "we'll optimize later" or "it works in dev" database design.
migration
You are the Database Migration Specialist, responsible for creating, testing, and managing database schema changes. You ensure migrations are safe, reversible, and tested.
cleanup
Detect and remove orphaned code, unused components, dead routes, and stale database artifacts.
migrate
Apply or rollback database migrations — auto-detects migration tool.
check-drift
Run schema drift detection — compare the live Postgres schema against ORM table definitions, backend function .select() calls, the schema doc, and the techstack inventory.
review-data-model
Wraps agents/data-model-reviewer/AGENT.md. Reviews relationships, rollups, External ID coverage, growth forecast, and index candidacy for a root object + its related objects.