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.
npx skills add nonlinear-xyz/factory-kit --skill factory-db-schema-architectgit clone --depth 1 https://github.com/nonlinear-xyz/factory-kitWrote 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/skills/nonlinear-xyz/factory-kit/factory-db-schema-architect)<a href="https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-db-schema-architect"><img src="https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-db-schema-architect/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.
<a href="https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-db-schema-architect"><img src="https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-db-schema-architect.svg" alt="Reviewed on agentmods" width="80" 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.00127 | $0.01430 |
| Opus 5 | $0.00063 | $0.00715 |
| Sonnet 5 | $0.00025 | $0.00286 |
| Haiku 4.5 | $0.00013 | $0.00143 |
Grade A, and why
factory-db-schema-architect 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 9d 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 — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Apply the db-schema-architect specialist workflow. Design schemas grounded in the factory's data-layer conventions, not generic SQL. Load factory-data-layer and factory-stack through the host's skill capability when needed.
How to think (in order)
-
What entities are in scope? Restate the request — name every entity, every relationship. If the user asks for "a customer model," check whether they mean (a) just
customers, or (b)customers + addresses + contacts + .... Commit to the interpretation; flag the assumption. -
Multi-tenant key? Almost always yes. Every domain table gets
orgId(orworkspaceId/projectId) FK withonDelete: 'cascade'. If this is a shared-reference table (countries, states, vehicle types), call out that it's tenant-agnostic. -
Polymorphic? If entities share a base type but diverge significantly (ICE vs BEV vehicles, individual vs business accounts), use the shared-base + variant-tables pattern from
factory-data-layer.md. Don't reach for nullable columns ordiscriminator: 'type'. -
JSONB or columns? For each field, ask: "Does anything query / sort / filter on this?"
- Yes → real column
- No, but it's structured → JSONB envelope (
customAttributes,metadata,config) - No, and it's blob-shaped → external storage (S3) with a pointer column
-
Partition by domain? Check
src/server/db/schemas/:- If
_shared.tsexists withtimestampsandpgTableCreator, reuse them - If not, create them as part of this work
- Pick / create the domain file (e.g.
fleet.ts,payments.ts)
- If
-
Soft-delete or hard-delete? Default to hard-delete (with cascade). Use soft-delete when:
- Regulatory requirement (audit history must persist)
- User-facing "trash bin" UX
- References across tenants where hard delete would break referential integrity
-
Migration shape?
drizzle-kit generatefrom the schema diff. Name the migration file:- Timestamps:
<unix>_<verb_subject>.sql(preferred) - Or sequential:
000N_<verb_subject>.sql - Pick one convention per project and stick. Mixed naming is a
factory-pitfalls.mdentry.
- Timestamps:
-
ESLint Drizzle rules? If
eslint-plugin-drizzleisn't installed, recommend adding it for the WHERE enforcement on UPDATE/DELETE.
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.
- 9d ago First seen · 121 lines · 127 tokens per session scan A 6955b5d21076
factory-db-schema-architect is a skill published in the GitHub repository nonlinear-xyz/factory-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 127 tokens to every session and 1,430 once invoked, about $0.0006 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.
Other skills, from other repositories
databases
· Configure/tune/migrate PostgreSQL, MongoDB, MySQL/MariaDB, MSSQL. Triggers: 'database', 'postgres', 'mysql', 'mongodb', 'database schema', 'database migration', 'pgbouncer', 'EXPLAIN'. Not for HTTP APIs (use backend-api).
database-schema-designer
A guide for designing schemas—the tables, fields, relationships, and indexes that define how application data is stored—in SQL or NoSQL databases.
schema-evolve
This skill should be used when the user asks about 'schema drift', 'schema evolution', 'evolve schema', 'schema sync', 'sync schemas', 'update schema fields', 'schema field frequency', 'missing schema fields', 'unused schema fields', 'schema proposal', 'schema cardinality', 'check schema', 'schema audit', 'schema…
docker-db-backup
A Docker Compose add-on that runs scheduled backups for PostgreSQL, MySQL, or MariaDB databases. It adds a backup container and the scripts and settings needed to run it.
supabase-postgres-best-practices
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
lark-base
A tool for managing Feishu Base, a cloud database made from tables, fields, records, and views. It also covers calculations, forms, dashboards, workflows, and access roles.