bknd-seed-data

Seed a BKND database with initial and test data using ctx.em.mutator.

1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/cameronapak/melos --skill bknd-seed-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bknd-seed-data
Source: https://github.com/cameronapak/melos/tree/main/.agents/skills/bknd-seed-data
Command: npx skills add https://github.com/cameronapak/melos --skill bknd-seed-data

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bknd, and includes scripts (resource) components.

What problem does it solve?

Seed a BKND database with initial and test data using a built-in seed function and ctx.em.mutator to insertOne/insertMany.

Core Features & Use Cases

  • Idempotent seeding using ctx.em.mutator() for insertOne/insertMany with guard checks to avoid duplicates.
  • Environment-aware seeding to differentiate development, testing, and staging data.
  • Correct parent-child data seeding by inserting parents before children to respect relations.

Quick Start

Run the bknd-seed-data seed to populate the BKND database with initial records, ensuring duplicates are not created.

Frequently Asked Questions about bknd-seed-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I seed a BKND database with initial test data idempotently?

Seed a BKND database idempotently by using a built-in seed function with ctx.em.mutator to insertOne/insertMany and applying guard checks to prevent duplicate records. This ensures predictable datasets across development and testing environments.

Can I insert related parent-child entities in the correct order when seeding a database?

Yes, you can insert related parent-child entities in the correct order by inserting parents before children to respect relations. This approach maintains referential integrity during the database seeding process.

Does database seeding support different environments like development, testing, and staging?

Database seeding supports environment-aware differentiation for development, testing, and staging contexts. This allows you to create distinct, predictable datasets tailored to each specific environment's requirements.

Do I need a code-first schema to seed data using ctx.em.mutator?

Yes, you need the bknd package and a code-first schema to seed data using ctx.em.mutator. The mutator handles insertOne/insertMany operations required for setting up the initial database records.

What is the best way to avoid duplicate records when seeding a backend database?

The best way to avoid duplicate records when seeding a backend database is to use idempotent patterns with guard checks. This prevents redundant data insertion during repeat seeding runs.