seed-data-generator
Generate realistic test data for database development, testing, and demos.
What this skill does
# Seed Data Generator Skill
Generate realistic test data for database development, testing, and demos.
## Instructions
You are a test data generation expert. When invoked:
1. **Analyze Schema**:
- Identify tables and relationships
- Understand column types and constraints
- Detect foreign key dependencies
- Recognize data patterns (email, phone, dates, etc.)
2. **Generate Realistic Data**:
- Use faker libraries for realistic data
- Maintain referential integrity
- Follow business logic constraints
- Create diverse but realistic scenarios
3. **Seed Database**:
- Insert data in correct order (respect foreign keys)
- Handle different database systems
- Provide both SQL and ORM-based seeders
- Support incremental seeding
4. **Customize Generation**:
- Allow quantity specification
- Support different data scenarios (edge cases, happy path)
- Enable data relationships customization
- Provide reproducible seeds (with random seed values)
## Supported Tools
- **JavaScript/TypeScript**: Faker.js, Chance.js, Casual
- **Python**: Faker, Factory Boy, Mimesis
- **Ruby**: Faker, FactoryBot
- **Raw SQL**: Generate INSERT statements
- **ORMs**: Prisma, TypeORM, Sequelize, Django, Rails
## Usage Examples
```
@seed-data-generator
@seed-data-generator --count 100
@seed-data-generator --table users
@seed-data-generator --scenario e-commerce
@seed-data-generator --realistic-relationships
```
## SQL Seed Data
### PostgreSQL - Basic Insert
```sql
-- seed/001_users.sql
INSERT INTO users (username, email, password_hash, active, created_at)
VALUES
('john_doe', '[email protected]', '$2b$10$...', true, '2024-01-15 10:00:00'),
('jane_smith', '[email protected]', '$2b$10$...', true, '2024-01-16 11:30:00'),
('bob_wilson', '[email protected]', '$2b$10$...', true, '2024-01-17 09:15:00'),
('alice_brown', '[email protected]', '$2b$10$...', false, '2024-01-18 14:45:00'),
('charlie_davis', '[email protected]', '$2b$10$...', true, '2024-01-19 16:20:00');
-- seed/002_categories.sql
INSERT INTO categories (name, slug, parent_id)
VALUES
('Electronics', 'electronics', NULL),
('Computers', 'computers', 1),
('Laptops', 'laptops', 2),
('Desktops', 'desktops', 2),
('Accessories', 'accessories', 1),
('Clothing', 'clothing', NULL),
('Men', 'men', 6),
('Women', 'women', 6);
-- seed/003_products.sql
INSERT INTO products (name, description, price, stock_quantity, category_id, created_at)
VALUES
(
'MacBook Pro 16"',
'Powerful laptop with M3 chip, 16GB RAM, 512GB SSD',
2499.99,
15,
3,
NOW()
),
(
'Dell XPS 13',
'Compact laptop with Intel i7, 16GB RAM, 512GB SSD',
1299.99,
20,
3,
NOW()
),
(
'Gaming Desktop',
'High-performance desktop with RTX 4080, 32GB RAM',
2999.99,
8,
4,
NOW()
),
(
'Wireless Mouse',
'Ergonomic wireless mouse with precision tracking',
29.99,
100,
5,
NOW()
),
(
'Mechanical Keyboard',
'RGB mechanical keyboard with Cherry MX switches',
149.99,
45,
5,
NOW()
);
-- seed/004_orders.sql
INSERT INTO orders (user_id, total_amount, status, created_at)
VALUES
(1, 2529.98, 'completed', '2024-01-20 10:30:00'),
(2, 1299.99, 'completed', '2024-01-21 14:15:00'),
(3, 179.98, 'processing', '2024-01-22 09:45:00'),
(1, 2999.99, 'pending', '2024-01-23 16:00:00'),
(4, 29.99, 'completed', '2024-01-24 11:20:00');
-- seed/005_order_items.sql
INSERT INTO order_items (order_id, product_id, quantity, price)
VALUES
-- Order 1
(1, 1, 1, 2499.99),
(1, 4, 1, 29.99),
-- Order 2
(2, 2, 1, 1299.99),
-- Order 3
(3, 4, 1, 29.99),
(3, 5, 1, 149.99),
-- Order 4
(4, 3, 1, 2999.99),
-- Order 5
(5, 4, 1, 29.99);
```
### Generated Seed with Functions
```sql
-- Generate random users
CREATE OR REPLACE FUNCTION generate_users(count INTEGER)
RETURNS void AS $$
DECLARE
i INTEGER;
BEGIN
FOR i IN 1..count LOOP
INSERT INTO users (username, email, password_hash, active, created_at)
VALUES (
'user_' || i,
'user' || i || '@example.com',
'$2b$10$fakehashedpassword',
random() > 0.1, -- 90% active
NOW() - (random() * 365 || ' days')::INTERVAL
);
END LOOP;
END;
$$ LANGUAGE plpgsql;
-- Generate random products
CREATE OR REPLACE FUNCTION generate_products(count INTEGER)
RETURNS void AS $$
DECLARE
i INTEGER;
categories INTEGER[];
BEGIN
SELECT ARRAY_AGG(id) INTO categories FROM categories;
FOR i IN 1..count LOOP
INSERT INTO products (name, description, price, stock_quantity, category_id, created_at)
VALUES (
'Product ' || i,
'Description for product ' || i,
(random() * 1000 + 10)::NUMERIC(10,2),
(random() * 100)::INTEGER,
categories[1 + floor(random() * array_length(categories, 1))::INTEGER],
NOW() - (random() * 180 || ' days')::INTERVAL
);
END LOOP;
END;
$$ LANGUAGE plpgsql;
-- Generate random orders
CREATE OR REPLACE FUNCTION generate_orders(count INTEGER)
RETURNS void AS $$
DECLARE
i INTEGER;
user_ids INTEGER[];
product_ids INTEGER[];
order_id INTEGER;
item_count INTEGER;
j INTEGER;
total NUMERIC(10,2);
BEGIN
SELECT ARRAY_AGG(id) INTO user_ids FROM users WHERE active = true;
SELECT ARRAY_AGG(id) INTO product_ids FROM products WHERE stock_quantity > 0;
FOR i IN 1..count LOOP
-- Random number of items (1-5)
item_count := 1 + floor(random() * 5)::INTEGER;
total := 0;
INSERT INTO orders (user_id, total_amount, status, created_at)
VALUES (
user_ids[1 + floor(random() * array_length(user_ids, 1))::INTEGER],
0, -- Will update after adding items
(ARRAY['pending', 'processing', 'completed', 'cancelled'])[1 + floor(random() * 4)::INTEGER],
NOW() - (random() * 90 || ' days')::INTERVAL
)
RETURNING id INTO order_id;
-- Add order items
FOR j IN 1..item_count LOOP
DECLARE
product_price NUMERIC(10,2);
quantity INTEGER;
BEGIN
SELECT price INTO product_price
FROM products
WHERE id = product_ids[1 + floor(random() * array_length(product_ids, 1))::INTEGER];
quantity := 1 + floor(random() * 3)::INTEGER;
INSERT INTO order_items (order_id, product_id, quantity, price)
VALUES (
order_id,
product_ids[1 + floor(random() * array_length(product_ids, 1))::INTEGER],
quantity,
product_price
);
total := total + (product_price * quantity);
END;
END LOOP;
-- Update order total
UPDATE orders SET total_amount = total WHERE id = order_id;
END LOOP;
END;
$$ LANGUAGE plpgsql;
-- Usage
SELECT generate_users(100);
SELECT generate_products(50);
SELECT generate_orders(200);
```
## JavaScript/TypeScript Seeders
### Faker.js + Prisma
```typescript
// prisma/seed.ts
import { PrismaClient } from '@prisma/client';
import { faker } from '@faker-js/faker';
const prisma = new PrismaClient();
async function main() {
console.log('Seeding database...');
// Clear existing data
await prisma.orderItem.deleteMany();
await prisma.order.deleteMany();
await prisma.review.deleteMany();
await prisma.product.deleteMany();
await prisma.category.deleteMany();
await prisma.user.deleteMany();
// Create categories
const categories = await Promise.all([
prisma.category.create({
data: {
name: 'Electronics',
slug: 'electronics',
},
}),
prisma.category.create({
data: {
name: 'Clothing',
slug: 'clothing',
},
}),
prisma.category.create({
data: {
name: 'Home & Garden',
slug: 'home-garden',
},
}),
]);
// Create users
const users = await Promise.all(
Array.from({ length: 20 }, async () => {
const firstName = faker.person.firstName();
const lastName = faker.person.lastName();
return prisma.user.create({
data: {
username: faker.internet.userRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.