db-seed-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited db-seed-generator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Before generating any output, read config/defaults.md and adapt all patterns, imports, and code examples to the user's configured stack.
schema.prisma and extract all models, fields, types, constraints, relations, and enums.prisma/seed.ts file with realistic fake data that respects all constraints.Build a directed graph of model dependencies from @relation fields. Topologically sort so parent records are created before children.
User (no deps) → create first
Organization (no deps) → create first
Post (depends on User) → create second
Comment (depends on User, Post) → create thirdIf circular dependencies exist, use a two-pass approach: create records with required fields first, then update with optional relation fields.
Generate realistic values based on field names:
| Pattern | Generated value |
|---|---|
firstName | "Elena", "Marcus", "Priya" |
lastName | "Rodriguez", "Chen", "Okafor" |
name (on User) | "Elena Rodriguez" |
email | "[email protected]" |
phone | "555-0101", "555-0102" |
avatarUrl, imageUrl | "https://example.com/avatars/1.jpg" |
url, website | "https://example.com" |
title (on Post/Article) | Realistic short sentences |
content, body, description | 1-3 realistic sentences |
slug | Derived from title: "realistic-short-sentence" |
price, amount | Realistic numbers like 29.99, 149.00 |
quantity, count | Small integers: 1-100 |
createdAt, updatedAt | Dates spread over the last 90 days |
publishedAt | Either null or a date after createdAt |
isActive, isPublished | Mix of true/false |
role (enum) | Distribute across valid enum values |
password | Pre-hashed placeholder: "$2b$10$..." — never plaintext |
"[email protected]", "[email protected]".@db.SmallInt, @db.Decimal(10,2) etc.connect syntax after both sides exist.import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
async function main() {
// Clear existing data (reverse dependency order)
await prisma.comment.deleteMany();
await prisma.post.deleteMany();
await prisma.user.deleteMany();
// Seed in dependency order
const users = await Promise.all([
prisma.user.upsert({
where: { email: "[email protected]" },
update: {},
create: {
email: "[email protected]",
name: "Elena Rodriguez",
// ... fields
},
}),
// ... more users
]);
// Use createMany for bulk inserts where relations allow
await prisma.post.createMany({
data: [
{ title: "...", authorId: users[0].id },
// ...
],
});
console.log("Seeded: X users, Y posts, Z comments");
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(() => prisma.$disconnect());When the user specifies a count (e.g., "seed 50 users"), generate that many records. Default to 5-10 records per model. Use createMany for bulk inserts where possible. Wrap large seeds in a prisma.$transaction().
Use upsert on a unique field to make the seed idempotent — safe to run multiple times.
See references/seed-patterns.md for dependency ordering details, realistic data patterns, and performance tips.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.