[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FRVR50E7RFTZ4GJQY8PHX":3,"skill-same:01M71FRVR50E7RFTZ4GJQY8PHX":96},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M71FRVR50E7RFTZ4GJQY8PHX","db-seeder",null,"This skill should be used when seeding databases with realistic fake data for development, testing, or staging environments. Supports PostgreSQL, MySQL, SQLite, MongoDB with ORM-based seeding (SQLAlchemy, Django, Prisma) and Faker library for generating realistic test data. Use when the user needs to populate databases with sample data, create test fixtures, or set up development\u002Fstaging environments with realistic data.","JSGforever\u002Fskillguard","JSGforever","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85541948?v=4","01M71FQD3E132VMR5F4TAYX3YS","01M71FQD4DYW0XJ4XQ4YQH75Y9",2,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"db seeder","db","django","sqlalchemy","environments","library","data","sample","create","postgresql","mysql","prisma","sqlite","when","create test","mongodb","up","testing","databases","SET","2026-11-10 10:12:30",false,"---\nname: db-seeder\ndescription: This skill should be used when seeding databases with realistic fake data for development, testing, or staging environments. Supports PostgreSQL, MySQL, SQLite, MongoDB with ORM-based seeding (SQLAlchemy, Django, Prisma) and Faker library for generating realistic test data. Use when the user needs to populate databases with sample data, create test fixtures, or set up development\u002Fstaging environments with realistic data.\n---\n\n# Database Seeder Skill\n\nSeed any database with realistic fake data using ORM patterns and the Faker library. This skill provides scripts, references, and templates for efficiently populating databases with test data for development, testing, and staging environments.\n\n## When to Use This Skill\n\nUse this skill when:\n- Setting up local development databases with sample data\n- Creating test fixtures for automated testing\n- Populating staging environments with realistic production-like data\n- Generating demo data for presentations or user onboarding\n- Need to quickly create large volumes of realistic test data\n- Migrating between database systems and need to populate new databases\n\n## Supported Databases\n\n- **PostgreSQL** - Relational database (default for production)\n- **MySQL \u002F MariaDB** - Relational database\n- **SQLite** - File-based database (testing, development)\n- **MongoDB** - NoSQL document database\n- **Any ORM-supported database** - Via SQLAlchemy, Django ORM, Prisma, etc.\n\nThe skill automatically detects database configuration from:\n- Environment variables (`DATABASE_URL`, `DB_TYPE`, etc.)\n- Configuration files (`.env`, `settings.py`, `config.yaml`)\n- Alembic migrations (`alembic.ini`)\n- Docker Compose files\n\n## Skill Workflow\n\n### Step 1: Detect Database Configuration\n\nBefore seeding, detect the database configuration automatically:\n\n```bash\npython scripts\u002Fdetect_db_config.py\n```\n\nThe detection script will:\n1. Check environment variables (`DATABASE_URL`, `DB_TYPE`, etc.)\n2. Search for configuration files (`.env`, `settings.py`, `alembic.ini`)\n3. Analyze project structure (SQLite files, Docker Compose)\n4. Output connection details and ready-to-use seeding commands\n\n### Step 1.5: Inspect Database Schema (Optional but Recommended)\n\n**NEW**: Automatically inspect your database schema to generate factories and fixtures:\n\n```bash\n# Inspect schema and print summary\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\"\n\n# Generate factory functions for all tables\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-factories\n\n# Generate JSON fixture templates\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-fixtures \\\n  --fixture-count 5\n\n# Both\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-factories \\\n  --generate-fixtures\n```\n\n**What it does:**\n- ✅ **Detects all tables\u002Fcollections** in your database\n- ✅ **Analyzes column types** (VARCHAR, INTEGER, DATE, etc.)\n- ✅ **Identifies foreign key relationships**\n- ✅ **Generates appropriate Faker methods** for each field\n- ✅ **Creates ready-to-use factory functions** (`generated_factories.py`)\n- ✅ **Creates JSON fixture templates** (`generated_fixtures.json`)\n\n**Works with ANY schema** - No hardcoded assumptions!\n\n**Manual Configuration:**\nIf auto-detection fails, specify database details manually:\n\n```bash\n# PostgreSQL\npython scripts\u002Fseed_database.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost:5432\u002Fmydb\" \\\n  --count 100\n\n# SQLite\npython scripts\u002Fseed_database.py \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002F.\u002Ftest.db\" \\\n  --count 50\n\n# MongoDB\npython scripts\u002Fseed_database.py \\\n  --db mongodb \\\n  --connection \"mongodb:\u002F\u002Fadmin:pass@localhost:27017\u002Fmydb\" \\\n  --count 100\n```\n\n**Configuration Files Reference:**\nFor detailed database connection patterns and configuration examples, refer to:\n`references\u002Fdatabase-configs.md`\n\n### Step 2: Choose Seeding Approach\n\nThree primary approaches are available:\n\n#### Approach A: Generate JSON Fixtures First (Recommended for Reusability)\n\nGenerate reusable JSON fixtures that can be version-controlled and shared:\n\n```bash\n# Generate using predefined templates\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Felios_data.json \\\n  --pretty\n\n# Generate specific models\npython scripts\u002Fgenerate_fixtures.py \\\n  --models User:100,Post:500,Candidate:50 \\\n  --output fixtures\u002Ftest_data.json \\\n  --pretty\n\n# Seed database from fixtures\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Ftest_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n```\n\n**Benefits:**\n- Fixtures can be version-controlled\n- Reusable across environments\n- Consistent test data\n- Easy to share with team\n\n#### Approach B: Direct Database Seeding with Custom Factories\n\nCreate Python factory functions and seed directly:\n\n```python\n# Create seeding script: scripts\u002Fseed_elios.py\n\nfrom seed_database import DatabaseSeeder, create_seeder\n\ndef candidate_factory(fake, index):\n    return {\n        'full_name': fake.name(),\n        'email': fake.email(),\n        'years_of_experience': fake.random_int(min=0, max=15),\n        'skills': fake.random_elements(\n            ['Python', 'JavaScript', 'SQL', 'React'],\n            length=fake.random_int(min=2, max=6),\n            unique=True\n        ),\n        'status': fake.random_element(['pending', 'interviewed', 'hired']),\n    }\n\n# Run seeding\nseeder = create_seeder('postgresql', 'postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb')\nseeder.seed_model(Candidate, count=50, factory_func=candidate_factory)\n```\n\n**Benefits:**\n- Full control over data generation\n- Can use complex business logic\n- Direct database insertion (faster)\n\n#### Approach C: Configuration-Based Seeding\n\nUse YAML configuration file for declarative seeding:\n\n```bash\n# Copy template\ncp assets\u002Fseed-config-template.yaml seed-config.yaml\n\n# Edit seed-config.yaml to define models and factories\n\n# Run seeding\npython scripts\u002Fseed_database.py --config seed-config.yaml\n```\n\n**Benefits:**\n- Declarative configuration\n- No code required\n- Easy to modify counts and settings\n\n### Step 3: Execute Seeding\n\nBased on chosen approach:\n\n**For Fixtures:**\n```bash\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Ftest_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n```\n\n**For Custom Factories:**\n```bash\npython scripts\u002Fseed_elios.py\n```\n\n**For Configuration:**\n```bash\npython scripts\u002Fseed_database.py --config seed-config.yaml\n```\n\n### Step 4: Verify Seeding\n\nAfter seeding completes, verify the data:\n\n```bash\n# For PostgreSQL\u002FMySQL\npsql -d mydb -c \"SELECT COUNT(*) FROM users;\"\npsql -d mydb -c \"SELECT COUNT(*) FROM candidates;\"\n\n# For SQLite\nsqlite3 mydb.db \"SELECT COUNT(*) FROM users;\"\n\n# For MongoDB\nmongosh mydb --eval \"db.users.countDocuments()\"\n```\n\n## Bundled Resources\n\n### Scripts (`scripts\u002F`)\n\n#### `seed_database.py`\nMain seeding orchestrator with Faker integration.\n\n**Features:**\n- Auto-detects database type from connection string\n- Supports SQLAlchemy-based databases (PostgreSQL, MySQL, SQLite)\n- Supports MongoDB with PyMongo\n- Batch insertion for performance\n- Progress reporting\n- Error handling and rollback\n\n**Usage:**\n```bash\n# Seed from fixtures\npython scripts\u002Fseed_database.py \\\n  --fixtures data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n\n# Seed from config\npython scripts\u002Fseed_database.py --config seed-config.yaml\n\n# Custom locale for international data\npython scripts\u002Fseed_database.py \\\n  --fixtures data.json \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002Ftest.db\" \\\n  --locale fr_FR\n```\n\n#### `detect_db_config.py`\nAutomatically detects database configuration from project.\n\n**Features:**\n- Scans environment variables\n- Parses configuration files (`.env`, `settings.py`, `config.yaml`)\n- Detects Alembic migrations configuration\n- Finds SQLite database files\n- Outputs connection strings with masked passwords\n\n**Usage:**\n```bash\n# Auto-detect\npython scripts\u002Fdetect_db_config.py\n\n# Specify config file\npython scripts\u002Fdetect_db_config.py --config-path src\u002Finfrastructure\u002Fconfig\u002Fsettings.py\n\n# Specify .env file\npython scripts\u002Fdetect_db_config.py --env-file .env.local\n\n# Specify project root\npython scripts\u002Fdetect_db_config.py --project-root \u002Fpath\u002Fto\u002Fproject\n```\n\n#### `generate_fixtures.py`\nGenerates JSON fixtures with realistic fake data.\n\n**Features:**\n- Predefined templates (Elios interview system, blog, e-commerce)\n- Custom model generation\n- Configurable record counts\n- Multiple Faker locales\n- Pretty-printed JSON output\n\n**Usage:**\n```bash\n# Generate from template\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures.json \\\n  --pretty\n\n# Generate specific models\npython scripts\u002Fgenerate_fixtures.py \\\n  --models User:100,Post:500 \\\n  --output test_data.json\n\n# Use different locale (Vietnamese)\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --locale vi_VN \\\n  --output vietnamese_data.json \\\n  --pretty\n\n# Japanese locale\npython scripts\u002Fgenerate_fixtures.py \\\n  --template blog \\\n  --locale ja_JP \\\n  --output japanese_blog_data.json\n```\n\n**Available Templates:**\n- `elios-interview` - Candidates, Questions, Interview Sessions (Elios-specific)\n- `blog` - Users, Posts\n- More templates can be added to the script\n\n**Supported Locales:**\n- `en_US` - English (United States) - Default\n- `vi_VN` - Vietnamese (Vietnam) - **Includes Vietnamese universities, degrees, majors**\n- `ja_JP` - Japanese (Japan)\n- `fr_FR` - French (France)\n- `en_GB` - English (United Kingdom)\n- And 50+ more locales supported by Faker\n\n#### `inspect_schema.py` ⭐ NEW\n**Automatically inspects database schema and generates seeding helpers.**\n\n**Features:**\n- Discovers all tables\u002Fcollections automatically\n- Analyzes column types (VARCHAR, INTEGER, DATE, JSONB, etc.)\n- Identifies foreign key relationships\n- Generates appropriate Faker methods for each field type\n- Creates ready-to-use factory functions\n- Creates JSON fixture templates with sample data\n- **Works with ANY database schema** - No hardcoded assumptions!\n\n**Usage:**\n```bash\n# Print schema summary\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\"\n\n# Generate factory functions for all tables\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-factories\n# Output: generated_factories.py\n\n# Generate JSON fixture templates\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-fixtures \\\n  --fixture-count 5\n# Output: generated_fixtures.json\n\n# Generate both\npython scripts\u002Finspect_schema.py \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002F.\u002Ftest.db\" \\\n  --generate-factories \\\n  --generate-fixtures\n\n# Save schema info as JSON\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --output schema_info.json\n```\n\n**Smart Field Detection:**\nThe script intelligently detects field types and generates appropriate Faker methods:\n- `email` field → `fake.email()`\n- `phone` field → `fake.phone_number()`\n- `address` field → `fake.address()`\n- `first_name` field → `fake.first_name()`\n- `description` field → `fake.paragraph()`\n- `created_at` (TIMESTAMP) → `fake.date_time_between()`\n- Integer types → `fake.random_int()`\n- Boolean types → `fake.boolean()`\n- And many more patterns...\n\n**Example Output:**\n```python\n# generated_factories.py (auto-generated)\n\ndef candidate_factory(fake, index):\n    \"\"\"Factory for candidate model\"\"\"\n    return {\n        'full_name': fake.name(),\n        'email': fake.email(),\n        'phone': fake.phone_number(),\n        'years_of_experience': fake.random_int(min=1, max=1000),\n        'skills': {},  # JSON field\n        'created_at': fake.date_time_between(start_date='-1y', end_date='now'),\n        'status': fake.word(),\n    }\n```\n\n### References (`references\u002F`)\n\n#### `database-configs.md`\nComprehensive database connection patterns and configuration examples.\n\n**Contents:**\n- Connection string formats for all supported databases\n- Environment variable patterns\n- Configuration file examples (`.env`, `settings.py`, `config.yaml`)\n- Docker Compose configurations\n- Security best practices\n- Common issues and solutions\n\n**Use when:**\n- Setting up database connections\n- Troubleshooting connection errors\n- Configuring different environments (dev, staging, prod)\n\n#### `faker-recipes.md`\nCommon patterns and examples for generating realistic fake data with Faker.\n\n**Contents:**\n- Personal information (names, emails, addresses)\n- Business data (companies, jobs)\n- Technical data (URLs, IPs, UUIDs)\n- Dates and times\n- Text generation\n- Numbers and sequences\n- Localization\n- Custom providers\n- Database-specific factory patterns\n\n**Use when:**\n- Creating custom factory functions\n- Need inspiration for data generation\n- Understanding Faker capabilities\n- Creating project-specific data generators\n\n#### `orm-patterns.md`\nPatterns and best practices for seeding databases using various ORMs.\n\n**Contents:**\n- **SQLAlchemy** - Setup, batch operations, relationships, error handling, factories\n- **Django ORM** - Models, bulk operations, management commands\n- **Prisma** (TypeScript) - Seeding scripts, relations\n- **MongoDB** (PyMongo) - Document insertion, embedded docs, references\n- Best practices (transactions, idempotency, constraints, progress reporting)\n\n**Use when:**\n- Implementing ORM-specific seeding\n- Need examples for your ORM\n- Understanding relationship seeding (one-to-many, many-to-many)\n- Creating production-grade seeding scripts\n\n### Assets (`assets\u002F`)\n\n#### `seed-config-template.yaml`\nTemplate for YAML-based seeding configuration.\n\n**Features:**\n- Database connection configuration\n- Faker settings (locale, seed for reproducibility)\n- Model definitions with factory functions\n- Seeding options (batch size, clear existing, idempotency)\n- Post-seeding hooks\n\n**Usage:**\n```bash\n# Copy template\ncp assets\u002Fseed-config-template.yaml seed-config.yaml\n\n# Edit configuration\n# ... customize models, counts, factories ...\n\n# Run seeding\npython scripts\u002Fseed_database.py --config seed-config.yaml\n```\n\n#### `fixture-template.json`\nTemplate for JSON test fixtures.\n\n**Features:**\n- Example structure for common models (User, Post)\n- Elios-specific models (Candidate, Question, InterviewSession)\n- Proper JSON formatting with relationships\n- Nested data examples (embedded documents, foreign keys)\n\n**Usage:**\n```bash\n# Copy and customize\ncp assets\u002Ffixture-template.json fixtures\u002Fmy_data.json\n\n# Edit JSON file with your data\n# ...\n\n# Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Fmy_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n```\n\n## Common Workflows\n\n### Workflow 1: Quick Development Setup\n\nSeed local database with sample data for immediate development:\n\n```bash\n# 1. Auto-detect database\npython scripts\u002Fdetect_db_config.py\n\n# 2. Generate fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Fdev_data.json\n\n# 3. Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Fdev_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fpostgres:password@localhost\u002Felios_dev\"\n\n# Verify\npsql -d elios_dev -c \"SELECT COUNT(*) FROM candidates;\"\n```\n\n### Workflow 2: Test Fixture Creation\n\nCreate fixtures for automated testing:\n\n```bash\n# Generate small, focused test fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --models Candidate:10,Question:20,InterviewSession:5 \\\n  --output tests\u002Ffixtures\u002Ftest_data.json \\\n  --pretty\n\n# Use in tests:\n# - Version control fixtures\u002Ftest_data.json\n# - Load in test setup\n# - Consistent test data across CI\u002FCD\n```\n\n### Workflow 3: Staging Environment Population\n\nPopulate staging with production-like data:\n\n```bash\n# 1. Generate large dataset\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Fstaging_data.json\n\n# Manually increase counts in fixture file if needed\n\n# 2. Detect staging database\npython scripts\u002Fdetect_db_config.py --env-file .env.staging\n\n# 3. Seed staging\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Fstaging_data.json \\\n  --db postgresql \\\n  --connection \"$STAGING_DATABASE_URL\"\n```\n\n### Workflow 4: Database Migration Testing\n\nTest migrations with seeded data:\n\n```bash\n# 1. Seed old schema\npython scripts\u002Fseed_database.py --fixtures fixtures\u002Fold_schema.json\n\n# 2. Run migrations\nalembic upgrade head\n\n# 3. Verify data integrity\npython scripts\u002Fverify_migration.py\n\n# 4. Seed new fields (if needed)\npython scripts\u002Fseed_database.py --fixtures fixtures\u002Fnew_fields.json\n```\n\n## Best Practices\n\n### 1. Version Control Fixtures\n\nStore fixtures in version control for consistency:\n\n```bash\n# Create fixtures directory\nmkdir -p fixtures\u002F{development,testing,staging}\n\n# Generate and commit\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Fdevelopment\u002Fbase_data.json \\\n  --pretty\n\ngit add fixtures\u002F\ngit commit -m \"Add base development fixtures\"\n```\n\n### 2. Use Reproducible Seeds\n\nFor consistent test data, use Faker seeds:\n\n```python\nfrom faker import Faker\n\n# Set seed for reproducibility\nFaker.seed(12345)\nfake = Faker()\n\n# Always generates same data\nfake.name()  # Always \"John Smith\" (example)\n```\n\n### 3. Separate Seeding Scripts by Environment\n\n```\nscripts\u002F\n├── seed_development.py    # Small datasets for local dev\n├── seed_testing.py         # Controlled fixtures for tests\n├── seed_staging.py         # Large production-like datasets\n└── seed_demo.py            # Curated demo data\n```\n\n### 4. Idempotent Seeding\n\nEnsure seeding can be run multiple times safely:\n\n```python\ndef seed_users(session, count=100):\n    # Check if already seeded\n    existing_count = session.query(User).count()\n    if existing_count >= count:\n        print(f\"Already seeded with {existing_count} users, skipping...\")\n        return\n\n    # Seed remaining\n    remaining = count - existing_count\n    # ... create users ...\n```\n\n### 5. Progress Reporting for Large Datasets\n\n```python\n# Batch insertions with progress\nbatch_size = 1000\nfor i in range(0, count, batch_size):\n    # ... create batch ...\n    print(f\"Progress: {i}\u002F{count} ({(i\u002Fcount)*100:.1f}%)\")\n```\n\n## Dependencies\n\n### Required\n- **Python 3.8+**\n- **Faker** (`pip install faker`)\n\n### Optional (based on database)\n- **SQLAlchemy** (`pip install sqlalchemy`) - For PostgreSQL, MySQL, SQLite\n- **psycopg2** (`pip install psycopg2-binary`) - PostgreSQL driver\n- **pymysql** (`pip install pymysql`) - MySQL driver\n- **pymongo** (`pip install pymongo`) - MongoDB driver\n- **PyYAML** (`pip install pyyaml`) - For YAML config support\n\n### Installation\n\n```bash\n# Install core dependencies\npip install faker pyyaml\n\n# Install database drivers (choose based on your database)\npip install sqlalchemy psycopg2-binary  # PostgreSQL\npip install sqlalchemy pymysql          # MySQL\npip install pymongo                     # MongoDB\n```\n\n## Troubleshooting\n\n### Issue: \"Faker not installed\"\n```\nError: Faker library not installed\n```\n**Solution:**\n```bash\npip install faker\n```\n\n### Issue: Database connection refused\n```\nError: connection refused\n```\n**Solutions:**\n1. Check if database is running\n2. Verify connection string (host, port, credentials)\n3. Check firewall settings\n4. Refer to `references\u002Fdatabase-configs.md` for detailed troubleshooting\n\n### Issue: Unique constraint violation\n```\nError: duplicate key value violates unique constraint\n```\n**Solutions:**\n1. Clear database before seeding: `session.query(Model).delete()`\n2. Use idempotent seeding (check existing records)\n3. Generate unique values with Faker\n\n### Issue: Foreign key constraint violation\n```\nError: foreign key constraint fails\n```\n**Solutions:**\n1. Seed in correct order (parent models before children)\n2. Use actual existing IDs for foreign keys\n3. Store created records for reference: `created_users = [...]; post.author_id = random.choice([u.id for u in created_users])`\n\n### Issue: Out of memory for large datasets\n```\nError: MemoryError\n```\n**Solutions:**\n1. Use batch insertions with commits: `session.flush()` every N records\n2. Reduce batch size\n3. Stream data instead of loading all in memory\n\n## Advanced Usage\n\n### Custom Faker Provider\n\nCreate domain-specific providers:\n\n```python\nfrom faker import Faker\nfrom faker.providers import BaseProvider\n\nclass InterviewProvider(BaseProvider):\n    def interview_status(self):\n        return self.random_element(['pending', 'scheduled', 'completed', 'cancelled'])\n\n    def skill_level(self):\n        return self.random_element(['beginner', 'intermediate', 'advanced', 'expert'])\n\n    def programming_language(self):\n        return self.random_element(['Python', 'JavaScript', 'Java', 'C++', 'Go'])\n\nfake = Faker()\nfake.add_provider(InterviewProvider)\n\n# Use custom methods\ncandidate = {\n    'skill_level': fake.skill_level(),\n    'primary_language': fake.programming_language(),\n}\n```\n\n### Multi-Locale Data Generation\n\nGenerate international test data:\n\n```python\nfrom faker import Faker\n\n# Create multiple locales\nfake_us = Faker('en_US')\nfake_jp = Faker('ja_JP')\nfake_fr = Faker('fr_FR')\n\nusers = [\n    {'name': fake_us.name(), 'address': fake_us.address()},\n    {'name': fake_jp.name(), 'address': fake_jp.address()},\n    {'name': fake_fr.name(), 'address': fake_fr.address()},\n]\n```\n\n### Seeding with Relationships\n\nHandle complex relationships:\n\n```python\n# One-to-Many\nauthor = User(username=fake.user_name())\nsession.add(author)\nsession.flush()  # Get author.id\n\nposts = [\n    Post(title=fake.sentence(), author_id=author.id)\n    for _ in range(10)\n]\nsession.add_all(posts)\n\n# Many-to-Many\nskills = [Skill(name=name) for name in ['Python', 'JavaScript', 'SQL']]\nsession.add_all(skills)\nsession.flush()\n\ncandidate = Candidate(full_name=fake.name())\ncandidate.skills.extend(random.sample(skills, k=2))\nsession.add(candidate)\n\nsession.commit()\n```\n\n## Examples\n\n### Example 1: Seed Elios Interview System\n\n```bash\n# Generate Elios-specific fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Felios_dev.json \\\n  --pretty\n\n# Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Felios_dev.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fpostgres:password@localhost\u002Felios_dev\"\n\n# Verify\npsql -d elios_dev -c \"SELECT COUNT(*) FROM candidates;\"\npsql -d elios_dev -c \"SELECT COUNT(*) FROM questions;\"\npsql -d elios_dev -c \"SELECT COUNT(*) FROM interview_sessions;\"\n```\n\n### Example 2: Create Test Fixtures for CI\u002FCD\n\n```bash\n# Generate small, controlled fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --models Candidate:5,Question:10 \\\n  --output tests\u002Ffixtures\u002Fci_test_data.json \\\n  --pretty\n\n# In CI pipeline:\npython scripts\u002Fseed_database.py \\\n  --fixtures tests\u002Ffixtures\u002Fci_test_data.json \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002F:memory:\"\n\n# Run tests with seeded data\npytest tests\u002F\n```\n\n### Example 3: Generate Vietnamese Test Data\n\n```bash\n# Generate Vietnamese fixtures for Elios\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --locale vi_VN \\\n  --output fixtures\u002Felios_vietnamese.json \\\n  --pretty\n\n# Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Felios_vietnamese.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fpostgres:password@localhost\u002Felios_dev\"\n\n# Verify Vietnamese data\npsql -d elios_dev -c \"SELECT full_name, education->>'university' as university FROM candidates LIMIT 5;\"\n```\n\n**Expected output:**\n```\n        full_name        |          university\n-------------------------+-------------------------------\n Nguyễn Văn Minh         | Đại học Bách Khoa Hà Nội\n Trần Thị Hương          | Đại học FPT\n Lê Minh Tuấn            | Đại học Quốc gia Hà Nội\n Phạm Thị Lan            | Đại học Công nghệ\n Hoàng Văn Nam           | Đại học Bách Khoa TP.HCM\n```\n\n### Example 4: Custom Factory Script\n\n```python\n# scripts\u002Fseed_custom.py\n\nfrom seed_database import create_seeder\nfrom faker import Faker\n\nfake = Faker()\n\ndef advanced_candidate_factory(fake, index):\n    \"\"\"Generate realistic interview candidates\"\"\"\n    skills_by_role = {\n        'frontend': ['JavaScript', 'React', 'CSS', 'HTML', 'Vue'],\n        'backend': ['Python', 'Django', 'FastAPI', 'SQL', 'Docker'],\n        'fullstack': ['JavaScript', 'React', 'Python', 'SQL', 'AWS'],\n        'data': ['Python', 'Pandas', 'SQL', 'Machine Learning', 'Statistics'],\n    }\n\n    role = fake.random_element(list(skills_by_role.keys()))\n    skills = fake.random_elements(\n        skills_by_role[role],\n        length=fake.random_int(min=3, max=5),\n        unique=True\n    )\n\n    return {\n        'full_name': fake.name(),\n        'email': fake.email(),\n        'phone': fake.phone_number(),\n        'years_of_experience': fake.random_int(min=0, max=15),\n        'skills': list(skills),\n        'desired_role': role,\n        'expected_salary': fake.random_int(min=50000, max=200000),\n        'created_at': fake.date_time_between(start_date='-6m', end_date='now'),\n    }\n\n# Run seeding\nseeder = create_seeder('postgresql', 'postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb')\ncandidates = seeder.seed_model(Candidate, count=100, factory_func=advanced_candidate_factory)\nprint(f\"✓ Created {len(candidates)} candidates\")\n```\n\n## Integration with Development Workflow\n\n### Docker Compose Integration\n\nAdd seeding to Docker Compose setup:\n\n```yaml\n# docker-compose.yml\n\nversion: '3.8'\nservices:\n  postgres:\n    image: postgres:15\n    environment:\n      POSTGRES_DB: elios_dev\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: password\n    ports:\n      - \"5432:5432\"\n\n  seeder:\n    build: .\n    depends_on:\n      - postgres\n    environment:\n      DATABASE_URL: postgresql:\u002F\u002Fpostgres:password@postgres:5432\u002Felios_dev\n    command: >\n      sh -c \"\n        sleep 5 &&\n        python scripts\u002Fgenerate_fixtures.py --template elios-interview --output \u002Ftmp\u002Ffixtures.json &&\n        python scripts\u002Fseed_database.py --fixtures \u002Ftmp\u002Ffixtures.json --db postgresql --connection $$DATABASE_URL\n      \"\n```\n\n### Makefile Integration\n\n```makefile\n# Makefile\n\n.PHONY: seed seed-dev seed-test\n\nseed-dev:\n\tpython scripts\u002Fgenerate_fixtures.py --template elios-interview --output fixtures\u002Fdev.json\n\tpython scripts\u002Fseed_database.py --fixtures fixtures\u002Fdev.json --db postgresql --connection $(DATABASE_URL)\n\nseed-test:\n\tpython scripts\u002Fgenerate_fixtures.py --models Candidate:10,Question:20 --output tests\u002Ffixtures\u002Ftest.json\n\tpython scripts\u002Fseed_database.py --fixtures tests\u002Ffixtures\u002Ftest.json --db sqlite --connection \"sqlite:\u002F\u002F\u002F:memory:\"\n\nseed-staging:\n\tpython scripts\u002Fdetect_db_config.py --env-file .env.staging\n\tpython scripts\u002Fseed_database.py --fixtures fixtures\u002Fstaging.json --db postgresql --connection $(STAGING_DATABASE_URL)\n```\n\nUsage:\n```bash\nmake seed-dev\nmake seed-test\nmake seed-staging\n```\n\n## Summary\n\nThis skill provides a complete database seeding solution:\n\n1. **Auto-detection** - Automatically finds database configuration\n2. **Multiple approaches** - Fixtures, factories, or configuration-based\n3. **Comprehensive references** - Database configs, Faker recipes, ORM patterns\n4. **Ready-to-use templates** - JSON fixtures and YAML configs\n5. **Production-ready scripts** - Batch operations, error handling, progress reporting\n\nUse the skill whenever you need to populate databases with realistic test data efficiently.","# Database Seeder Skill\n\nSeed any database with realistic fake data using ORM patterns and the Faker library. This skill provides scripts, references, and templates for efficiently populating databases with test data for development, testing, and staging environments.\n\n## When to Use This Skill\n\nUse this skill when:\n- Setting up local development databases with sample data\n- Creating test fixtures for automated testing\n- Populating staging environments with realistic production-like data\n- Generating demo data for presentations or user onboarding\n- Need to quickly create large volumes of realistic test data\n- Migrating between database systems and need to populate new databases\n\n## Supported Databases\n\n- **PostgreSQL** - Relational database (default for production)\n- **MySQL \u002F MariaDB** - Relational database\n- **SQLite** - File-based database (testing, development)\n- **MongoDB** - NoSQL document database\n- **Any ORM-supported database** - Via SQLAlchemy, Django ORM, Prisma, etc.\n\nThe skill automatically detects database configuration from:\n- Environment variables (`DATABASE_URL`, `DB_TYPE`, etc.)\n- Configuration files (`.env`, `settings.py`, `config.yaml`)\n- Alembic migrations (`alembic.ini`)\n- Docker Compose files\n\n## Skill Workflow\n\n### Step 1: Detect Database Configuration\n\nBefore seeding, detect the database configuration automatically:\n\n```bash\npython scripts\u002Fdetect_db_config.py\n```\n\nThe detection script will:\n1. Check environment variables (`DATABASE_URL`, `DB_TYPE`, etc.)\n2. Search for configuration files (`.env`, `settings.py`, `alembic.ini`)\n3. Analyze project structure (SQLite files, Docker Compose)\n4. Output connection details and ready-to-use seeding commands\n\n### Step 1.5: Inspect Database Schema (Optional but Recommended)\n\n**NEW**: Automatically inspect your database schema to generate factories and fixtures:\n\n```bash\n# Inspect schema and print summary\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\"\n\n# Generate factory functions for all tables\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-factories\n\n# Generate JSON fixture templates\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-fixtures \\\n  --fixture-count 5\n\n# Both\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-factories \\\n  --generate-fixtures\n```\n\n**What it does:**\n- ✅ **Detects all tables\u002Fcollections** in your database\n- ✅ **Analyzes column types** (VARCHAR, INTEGER, DATE, etc.)\n- ✅ **Identifies foreign key relationships**\n- ✅ **Generates appropriate Faker methods** for each field\n- ✅ **Creates ready-to-use factory functions** (`generated_factories.py`)\n- ✅ **Creates JSON fixture templates** (`generated_fixtures.json`)\n\n**Works with ANY schema** - No hardcoded assumptions!\n\n**Manual Configuration:**\nIf auto-detection fails, specify database details manually:\n\n```bash\n# PostgreSQL\npython scripts\u002Fseed_database.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost:5432\u002Fmydb\" \\\n  --count 100\n\n# SQLite\npython scripts\u002Fseed_database.py \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002F.\u002Ftest.db\" \\\n  --count 50\n\n# MongoDB\npython scripts\u002Fseed_database.py \\\n  --db mongodb \\\n  --connection \"mongodb:\u002F\u002Fadmin:pass@localhost:27017\u002Fmydb\" \\\n  --count 100\n```\n\n**Configuration Files Reference:**\nFor detailed database connection patterns and configuration examples, refer to:\n`references\u002Fdatabase-configs.md`\n\n### Step 2: Choose Seeding Approach\n\nThree primary approaches are available:\n\n#### Approach A: Generate JSON Fixtures First (Recommended for Reusability)\n\nGenerate reusable JSON fixtures that can be version-controlled and shared:\n\n```bash\n# Generate using predefined templates\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Felios_data.json \\\n  --pretty\n\n# Generate specific models\npython scripts\u002Fgenerate_fixtures.py \\\n  --models User:100,Post:500,Candidate:50 \\\n  --output fixtures\u002Ftest_data.json \\\n  --pretty\n\n# Seed database from fixtures\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Ftest_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n```\n\n**Benefits:**\n- Fixtures can be version-controlled\n- Reusable across environments\n- Consistent test data\n- Easy to share with team\n\n#### Approach B: Direct Database Seeding with Custom Factories\n\nCreate Python factory functions and seed directly:\n\n```python\n# Create seeding script: scripts\u002Fseed_elios.py\n\nfrom seed_database import DatabaseSeeder, create_seeder\n\ndef candidate_factory(fake, index):\n    return {\n        'full_name': fake.name(),\n        'email': fake.email(),\n        'years_of_experience': fake.random_int(min=0, max=15),\n        'skills': fake.random_elements(\n            ['Python', 'JavaScript', 'SQL', 'React'],\n            length=fake.random_int(min=2, max=6),\n            unique=True\n        ),\n        'status': fake.random_element(['pending', 'interviewed', 'hired']),\n    }\n\n# Run seeding\nseeder = create_seeder('postgresql', 'postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb')\nseeder.seed_model(Candidate, count=50, factory_func=candidate_factory)\n```\n\n**Benefits:**\n- Full control over data generation\n- Can use complex business logic\n- Direct database insertion (faster)\n\n#### Approach C: Configuration-Based Seeding\n\nUse YAML configuration file for declarative seeding:\n\n```bash\n# Copy template\ncp assets\u002Fseed-config-template.yaml seed-config.yaml\n\n# Edit seed-config.yaml to define models and factories\n\n# Run seeding\npython scripts\u002Fseed_database.py --config seed-config.yaml\n```\n\n**Benefits:**\n- Declarative configuration\n- No code required\n- Easy to modify counts and settings\n\n### Step 3: Execute Seeding\n\nBased on chosen approach:\n\n**For Fixtures:**\n```bash\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Ftest_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n```\n\n**For Custom Factories:**\n```bash\npython scripts\u002Fseed_elios.py\n```\n\n**For Configuration:**\n```bash\npython scripts\u002Fseed_database.py --config seed-config.yaml\n```\n\n### Step 4: Verify Seeding\n\nAfter seeding completes, verify the data:\n\n```bash\n# For PostgreSQL\u002FMySQL\npsql -d mydb -c \"SELECT COUNT(*) FROM users;\"\npsql -d mydb -c \"SELECT COUNT(*) FROM candidates;\"\n\n# For SQLite\nsqlite3 mydb.db \"SELECT COUNT(*) FROM users;\"\n\n# For MongoDB\nmongosh mydb --eval \"db.users.countDocuments()\"\n```\n\n## Bundled Resources\n\n### Scripts (`scripts\u002F`)\n\n#### `seed_database.py`\nMain seeding orchestrator with Faker integration.\n\n**Features:**\n- Auto-detects database type from connection string\n- Supports SQLAlchemy-based databases (PostgreSQL, MySQL, SQLite)\n- Supports MongoDB with PyMongo\n- Batch insertion for performance\n- Progress reporting\n- Error handling and rollback\n\n**Usage:**\n```bash\n# Seed from fixtures\npython scripts\u002Fseed_database.py \\\n  --fixtures data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n\n# Seed from config\npython scripts\u002Fseed_database.py --config seed-config.yaml\n\n# Custom locale for international data\npython scripts\u002Fseed_database.py \\\n  --fixtures data.json \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002Ftest.db\" \\\n  --locale fr_FR\n```\n\n#### `detect_db_config.py`\nAutomatically detects database configuration from project.\n\n**Features:**\n- Scans environment variables\n- Parses configuration files (`.env`, `settings.py`, `config.yaml`)\n- Detects Alembic migrations configuration\n- Finds SQLite database files\n- Outputs connection strings with masked passwords\n\n**Usage:**\n```bash\n# Auto-detect\npython scripts\u002Fdetect_db_config.py\n\n# Specify config file\npython scripts\u002Fdetect_db_config.py --config-path src\u002Finfrastructure\u002Fconfig\u002Fsettings.py\n\n# Specify .env file\npython scripts\u002Fdetect_db_config.py --env-file .env.local\n\n# Specify project root\npython scripts\u002Fdetect_db_config.py --project-root \u002Fpath\u002Fto\u002Fproject\n```\n\n#### `generate_fixtures.py`\nGenerates JSON fixtures with realistic fake data.\n\n**Features:**\n- Predefined templates (Elios interview system, blog, e-commerce)\n- Custom model generation\n- Configurable record counts\n- Multiple Faker locales\n- Pretty-printed JSON output\n\n**Usage:**\n```bash\n# Generate from template\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures.json \\\n  --pretty\n\n# Generate specific models\npython scripts\u002Fgenerate_fixtures.py \\\n  --models User:100,Post:500 \\\n  --output test_data.json\n\n# Use different locale (Vietnamese)\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --locale vi_VN \\\n  --output vietnamese_data.json \\\n  --pretty\n\n# Japanese locale\npython scripts\u002Fgenerate_fixtures.py \\\n  --template blog \\\n  --locale ja_JP \\\n  --output japanese_blog_data.json\n```\n\n**Available Templates:**\n- `elios-interview` - Candidates, Questions, Interview Sessions (Elios-specific)\n- `blog` - Users, Posts\n- More templates can be added to the script\n\n**Supported Locales:**\n- `en_US` - English (United States) - Default\n- `vi_VN` - Vietnamese (Vietnam) - **Includes Vietnamese universities, degrees, majors**\n- `ja_JP` - Japanese (Japan)\n- `fr_FR` - French (France)\n- `en_GB` - English (United Kingdom)\n- And 50+ more locales supported by Faker\n\n#### `inspect_schema.py` ⭐ NEW\n**Automatically inspects database schema and generates seeding helpers.**\n\n**Features:**\n- Discovers all tables\u002Fcollections automatically\n- Analyzes column types (VARCHAR, INTEGER, DATE, JSONB, etc.)\n- Identifies foreign key relationships\n- Generates appropriate Faker methods for each field type\n- Creates ready-to-use factory functions\n- Creates JSON fixture templates with sample data\n- **Works with ANY database schema** - No hardcoded assumptions!\n\n**Usage:**\n```bash\n# Print schema summary\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\"\n\n# Generate factory functions for all tables\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-factories\n# Output: generated_factories.py\n\n# Generate JSON fixture templates\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --generate-fixtures \\\n  --fixture-count 5\n# Output: generated_fixtures.json\n\n# Generate both\npython scripts\u002Finspect_schema.py \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002F.\u002Ftest.db\" \\\n  --generate-factories \\\n  --generate-fixtures\n\n# Save schema info as JSON\npython scripts\u002Finspect_schema.py \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fmydb\" \\\n  --output schema_info.json\n```\n\n**Smart Field Detection:**\nThe script intelligently detects field types and generates appropriate Faker methods:\n- `email` field → `fake.email()`\n- `phone` field → `fake.phone_number()`\n- `address` field → `fake.address()`\n- `first_name` field → `fake.first_name()`\n- `description` field → `fake.paragraph()`\n- `created_at` (TIMESTAMP) → `fake.date_time_between()`\n- Integer types → `fake.random_int()`\n- Boolean types → `fake.boolean()`\n- And many more patterns...\n\n**Example Output:**\n```python\n# generated_factories.py (auto-generated)\n\ndef candidate_factory(fake, index):\n    \"\"\"Factory for candidate model\"\"\"\n    return {\n        'full_name': fake.name(),\n        'email': fake.email(),\n        'phone': fake.phone_number(),\n        'years_of_experience': fake.random_int(min=1, max=1000),\n        'skills': {},  # JSON field\n        'created_at': fake.date_time_between(start_date='-1y', end_date='now'),\n        'status': fake.word(),\n    }\n```\n\n### References (`references\u002F`)\n\n#### `database-configs.md`\nComprehensive database connection patterns and configuration examples.\n\n**Contents:**\n- Connection string formats for all supported databases\n- Environment variable patterns\n- Configuration file examples (`.env`, `settings.py`, `config.yaml`)\n- Docker Compose configurations\n- Security best practices\n- Common issues and solutions\n\n**Use when:**\n- Setting up database connections\n- Troubleshooting connection errors\n- Configuring different environments (dev, staging, prod)\n\n#### `faker-recipes.md`\nCommon patterns and examples for generating realistic fake data with Faker.\n\n**Contents:**\n- Personal information (names, emails, addresses)\n- Business data (companies, jobs)\n- Technical data (URLs, IPs, UUIDs)\n- Dates and times\n- Text generation\n- Numbers and sequences\n- Localization\n- Custom providers\n- Database-specific factory patterns\n\n**Use when:**\n- Creating custom factory functions\n- Need inspiration for data generation\n- Understanding Faker capabilities\n- Creating project-specific data generators\n\n#### `orm-patterns.md`\nPatterns and best practices for seeding databases using various ORMs.\n\n**Contents:**\n- **SQLAlchemy** - Setup, batch operations, relationships, error handling, factories\n- **Django ORM** - Models, bulk operations, management commands\n- **Prisma** (TypeScript) - Seeding scripts, relations\n- **MongoDB** (PyMongo) - Document insertion, embedded docs, references\n- Best practices (transactions, idempotency, constraints, progress reporting)\n\n**Use when:**\n- Implementing ORM-specific seeding\n- Need examples for your ORM\n- Understanding relationship seeding (one-to-many, many-to-many)\n- Creating production-grade seeding scripts\n\n### Assets (`assets\u002F`)\n\n#### `seed-config-template.yaml`\nTemplate for YAML-based seeding configuration.\n\n**Features:**\n- Database connection configuration\n- Faker settings (locale, seed for reproducibility)\n- Model definitions with factory functions\n- Seeding options (batch size, clear existing, idempotency)\n- Post-seeding hooks\n\n**Usage:**\n```bash\n# Copy template\ncp assets\u002Fseed-config-template.yaml seed-config.yaml\n\n# Edit configuration\n# ... customize models, counts, factories ...\n\n# Run seeding\npython scripts\u002Fseed_database.py --config seed-config.yaml\n```\n\n#### `fixture-template.json`\nTemplate for JSON test fixtures.\n\n**Features:**\n- Example structure for common models (User, Post)\n- Elios-specific models (Candidate, Question, InterviewSession)\n- Proper JSON formatting with relationships\n- Nested data examples (embedded documents, foreign keys)\n\n**Usage:**\n```bash\n# Copy and customize\ncp assets\u002Ffixture-template.json fixtures\u002Fmy_data.json\n\n# Edit JSON file with your data\n# ...\n\n# Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Fmy_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n```\n\n## Common Workflows\n\n### Workflow 1: Quick Development Setup\n\nSeed local database with sample data for immediate development:\n\n```bash\n# 1. Auto-detect database\npython scripts\u002Fdetect_db_config.py\n\n# 2. Generate fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Fdev_data.json\n\n# 3. Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Fdev_data.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fpostgres:password@localhost\u002Felios_dev\"\n\n# Verify\npsql -d elios_dev -c \"SELECT COUNT(*) FROM candidates;\"\n```\n\n### Workflow 2: Test Fixture Creation\n\nCreate fixtures for automated testing:\n\n```bash\n# Generate small, focused test fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --models Candidate:10,Question:20,InterviewSession:5 \\\n  --output tests\u002Ffixtures\u002Ftest_data.json \\\n  --pretty\n\n# Use in tests:\n# - Version control fixtures\u002Ftest_data.json\n# - Load in test setup\n# - Consistent test data across CI\u002FCD\n```\n\n### Workflow 3: Staging Environment Population\n\nPopulate staging with production-like data:\n\n```bash\n# 1. Generate large dataset\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Fstaging_data.json\n\n# Manually increase counts in fixture file if needed\n\n# 2. Detect staging database\npython scripts\u002Fdetect_db_config.py --env-file .env.staging\n\n# 3. Seed staging\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Fstaging_data.json \\\n  --db postgresql \\\n  --connection \"$STAGING_DATABASE_URL\"\n```\n\n### Workflow 4: Database Migration Testing\n\nTest migrations with seeded data:\n\n```bash\n# 1. Seed old schema\npython scripts\u002Fseed_database.py --fixtures fixtures\u002Fold_schema.json\n\n# 2. Run migrations\nalembic upgrade head\n\n# 3. Verify data integrity\npython scripts\u002Fverify_migration.py\n\n# 4. Seed new fields (if needed)\npython scripts\u002Fseed_database.py --fixtures fixtures\u002Fnew_fields.json\n```\n\n## Best Practices\n\n### 1. Version Control Fixtures\n\nStore fixtures in version control for consistency:\n\n```bash\n# Create fixtures directory\nmkdir -p fixtures\u002F{development,testing,staging}\n\n# Generate and commit\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Fdevelopment\u002Fbase_data.json \\\n  --pretty\n\ngit add fixtures\u002F\ngit commit -m \"Add base development fixtures\"\n```\n\n### 2. Use Reproducible Seeds\n\nFor consistent test data, use Faker seeds:\n\n```python\nfrom faker import Faker\n\n# Set seed for reproducibility\nFaker.seed(12345)\nfake = Faker()\n\n# Always generates same data\nfake.name()  # Always \"John Smith\" (example)\n```\n\n### 3. Separate Seeding Scripts by Environment\n\n```\nscripts\u002F\n├── seed_development.py    # Small datasets for local dev\n├── seed_testing.py         # Controlled fixtures for tests\n├── seed_staging.py         # Large production-like datasets\n└── seed_demo.py            # Curated demo data\n```\n\n### 4. Idempotent Seeding\n\nEnsure seeding can be run multiple times safely:\n\n```python\ndef seed_users(session, count=100):\n    # Check if already seeded\n    existing_count = session.query(User).count()\n    if existing_count >= count:\n        print(f\"Already seeded with {existing_count} users, skipping...\")\n        return\n\n    # Seed remaining\n    remaining = count - existing_count\n    # ... create users ...\n```\n\n### 5. Progress Reporting for Large Datasets\n\n```python\n# Batch insertions with progress\nbatch_size = 1000\nfor i in range(0, count, batch_size):\n    # ... create batch ...\n    print(f\"Progress: {i}\u002F{count} ({(i\u002Fcount)*100:.1f}%)\")\n```\n\n## Dependencies\n\n### Required\n- **Python 3.8+**\n- **Faker** (`pip install faker`)\n\n### Optional (based on database)\n- **SQLAlchemy** (`pip install sqlalchemy`) - For PostgreSQL, MySQL, SQLite\n- **psycopg2** (`pip install psycopg2-binary`) - PostgreSQL driver\n- **pymysql** (`pip install pymysql`) - MySQL driver\n- **pymongo** (`pip install pymongo`) - MongoDB driver\n- **PyYAML** (`pip install pyyaml`) - For YAML config support\n\n### Installation\n\n```bash\n# Install core dependencies\npip install faker pyyaml\n\n# Install database drivers (choose based on your database)\npip install sqlalchemy psycopg2-binary  # PostgreSQL\npip install sqlalchemy pymysql          # MySQL\npip install pymongo                     # MongoDB\n```\n\n## Troubleshooting\n\n### Issue: \"Faker not installed\"\n```\nError: Faker library not installed\n```\n**Solution:**\n```bash\npip install faker\n```\n\n### Issue: Database connection refused\n```\nError: connection refused\n```\n**Solutions:**\n1. Check if database is running\n2. Verify connection string (host, port, credentials)\n3. Check firewall settings\n4. Refer to `references\u002Fdatabase-configs.md` for detailed troubleshooting\n\n### Issue: Unique constraint violation\n```\nError: duplicate key value violates unique constraint\n```\n**Solutions:**\n1. Clear database before seeding: `session.query(Model).delete()`\n2. Use idempotent seeding (check existing records)\n3. Generate unique values with Faker\n\n### Issue: Foreign key constraint violation\n```\nError: foreign key constraint fails\n```\n**Solutions:**\n1. Seed in correct order (parent models before children)\n2. Use actual existing IDs for foreign keys\n3. Store created records for reference: `created_users = [...]; post.author_id = random.choice([u.id for u in created_users])`\n\n### Issue: Out of memory for large datasets\n```\nError: MemoryError\n```\n**Solutions:**\n1. Use batch insertions with commits: `session.flush()` every N records\n2. Reduce batch size\n3. Stream data instead of loading all in memory\n\n## Advanced Usage\n\n### Custom Faker Provider\n\nCreate domain-specific providers:\n\n```python\nfrom faker import Faker\nfrom faker.providers import BaseProvider\n\nclass InterviewProvider(BaseProvider):\n    def interview_status(self):\n        return self.random_element(['pending', 'scheduled', 'completed', 'cancelled'])\n\n    def skill_level(self):\n        return self.random_element(['beginner', 'intermediate', 'advanced', 'expert'])\n\n    def programming_language(self):\n        return self.random_element(['Python', 'JavaScript', 'Java', 'C++', 'Go'])\n\nfake = Faker()\nfake.add_provider(InterviewProvider)\n\n# Use custom methods\ncandidate = {\n    'skill_level': fake.skill_level(),\n    'primary_language': fake.programming_language(),\n}\n```\n\n### Multi-Locale Data Generation\n\nGenerate international test data:\n\n```python\nfrom faker import Faker\n\n# Create multiple locales\nfake_us = Faker('en_US')\nfake_jp = Faker('ja_JP')\nfake_fr = Faker('fr_FR')\n\nusers = [\n    {'name': fake_us.name(), 'address': fake_us.address()},\n    {'name': fake_jp.name(), 'address': fake_jp.address()},\n    {'name': fake_fr.name(), 'address': fake_fr.address()},\n]\n```\n\n### Seeding with Relationships\n\nHandle complex relationships:\n\n```python\n# One-to-Many\nauthor = User(username=fake.user_name())\nsession.add(author)\nsession.flush()  # Get author.id\n\nposts = [\n    Post(title=fake.sentence(), author_id=author.id)\n    for _ in range(10)\n]\nsession.add_all(posts)\n\n# Many-to-Many\nskills = [Skill(name=name) for name in ['Python', 'JavaScript', 'SQL']]\nsession.add_all(skills)\nsession.flush()\n\ncandidate = Candidate(full_name=fake.name())\ncandidate.skills.extend(random.sample(skills, k=2))\nsession.add(candidate)\n\nsession.commit()\n```\n\n## Examples\n\n### Example 1: Seed Elios Interview System\n\n```bash\n# Generate Elios-specific fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --output fixtures\u002Felios_dev.json \\\n  --pretty\n\n# Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Felios_dev.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fpostgres:password@localhost\u002Felios_dev\"\n\n# Verify\npsql -d elios_dev -c \"SELECT COUNT(*) FROM candidates;\"\npsql -d elios_dev -c \"SELECT COUNT(*) FROM questions;\"\npsql -d elios_dev -c \"SELECT COUNT(*) FROM interview_sessions;\"\n```\n\n### Example 2: Create Test Fixtures for CI\u002FCD\n\n```bash\n# Generate small, controlled fixtures\npython scripts\u002Fgenerate_fixtures.py \\\n  --models Candidate:5,Question:10 \\\n  --output tests\u002Ffixtures\u002Fci_test_data.json \\\n  --pretty\n\n# In CI pipeline:\npython scripts\u002Fseed_database.py \\\n  --fixtures tests\u002Ffixtures\u002Fci_test_data.json \\\n  --db sqlite \\\n  --connection \"sqlite:\u002F\u002F\u002F:memory:\"\n\n# Run tests with seeded data\npytest tests\u002F\n```\n\n### Example 3: Generate Vietnamese Test Data\n\n```bash\n# Generate Vietnamese fixtures for Elios\npython scripts\u002Fgenerate_fixtures.py \\\n  --template elios-interview \\\n  --locale vi_VN \\\n  --output fixtures\u002Felios_vietnamese.json \\\n  --pretty\n\n# Seed database\npython scripts\u002Fseed_database.py \\\n  --fixtures fixtures\u002Felios_vietnamese.json \\\n  --db postgresql \\\n  --connection \"postgresql:\u002F\u002Fpostgres:password@localhost\u002Felios_dev\"\n\n# Verify Vietnamese data\npsql -d elios_dev -c \"SELECT full_name, education->>'university' as university FROM candidates LIMIT 5;\"\n```\n\n**Expected output:**\n```\n        full_name        |          university\n-------------------------+-------------------------------\n Nguyễn Văn Minh         | Đại học Bách Khoa Hà Nội\n Trần Thị Hương          | Đại học FPT\n Lê Minh Tuấn            | Đại học Quốc gia Hà Nội\n Phạm Thị Lan            | Đại học Công nghệ\n Hoàng Văn Nam           | Đại học Bách Khoa TP.HCM\n```\n\n### Example 4: Custom Factory Script\n\n```python\n# scripts\u002Fseed_custom.py\n\nfrom seed_database import create_seeder\nfrom faker import Faker\n\nfake = Faker()\n\ndef advanced_candidate_factory(fake, index):\n    \"\"\"Generate realistic interview candidates\"\"\"\n    skills_by_role = {\n        'frontend': ['JavaScript', 'React', 'CSS', 'HTML', 'Vue'],\n        'backend': ['Python', 'Django', 'FastAPI', 'SQL', 'Docker'],\n        'fullstack': ['JavaScript', 'React', 'Python', 'SQL', 'AWS'],\n        'data': ['Python', 'Pandas', 'SQL', 'Machine Learning', 'Statistics'],\n    }\n\n    role = fake.random_element(list(skills_by_role.keys()))\n    skills = fake.random_elements(\n        skills_by_role[role],\n        length=fake.random_int(min=3, max=5),\n        unique=True\n    )\n\n    return {\n        'full_name': fake.name(),\n        'email': fake.email(),\n        'phone': fake.phone_number(),\n        'years_of_experience': fake.random_int(min=0, max=15),\n        'skills': list(skills),\n        'desired_role': role,\n        'expected_salary': fake.random_int(min=50000, max=200000),\n        'created_at': fake.date_time_between(start_date='-6m', end_date='now'),\n    }\n\n# Run seeding\nseeder = create_seeder('postgresql', 'postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb')\ncandidates = seeder.seed_model(Candidate, count=100, factory_func=advanced_candidate_factory)\nprint(f\"✓ Created {len(candidates)} candidates\")\n```\n\n## Integration with Development Workflow\n\n### Docker Compose Integration\n\nAdd seeding to Docker Compose setup:\n\n```yaml\n# docker-compose.yml\n\nversion: '3.8'\nservices:\n  postgres:\n    image: postgres:15\n    environment:\n      POSTGRES_DB: elios_dev\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: password\n    ports:\n      - \"5432:5432\"\n\n  seeder:\n    build: .\n    depends_on:\n      - postgres\n    environment:\n      DATABASE_URL: postgresql:\u002F\u002Fpostgres:password@postgres:5432\u002Felios_dev\n    command: >\n      sh -c \"\n        sleep 5 &&\n        python scripts\u002Fgenerate_fixtures.py --template elios-interview --output \u002Ftmp\u002Ffixtures.json &&\n        python scripts\u002Fseed_database.py --fixtures \u002Ftmp\u002Ffixtures.json --db postgresql --connection $$DATABASE_URL\n      \"\n```\n\n### Makefile Integration\n\n```makefile\n# Makefile\n\n.PHONY: seed seed-dev seed-test\n\nseed-dev:\n\tpython scripts\u002Fgenerate_fixtures.py --template elios-interview --output fixtures\u002Fdev.json\n\tpython scripts\u002Fseed_database.py --fixtures fixtures\u002Fdev.json --db postgresql --connection $(DATABASE_URL)\n\nseed-test:\n\tpython scripts\u002Fgenerate_fixtures.py --models Candidate:10,Question:20 --output tests\u002Ffixtures\u002Ftest.json\n\tpython scripts\u002Fseed_database.py --fixtures tests\u002Ffixtures\u002Ftest.json --db sqlite --connection \"sqlite:\u002F\u002F\u002F:memory:\"\n\nseed-staging:\n\tpython scripts\u002Fdetect_db_config.py --env-file .env.staging\n\tpython scripts\u002Fseed_database.py --fixtures fixtures\u002Fstaging.json --db postgresql --connection $(STAGING_DATABASE_URL)\n```\n\nUsage:\n```bash\nmake seed-dev\nmake seed-test\nmake seed-staging\n```\n\n## Summary\n\nThis skill provides a complete database seeding solution:\n\n1. **Auto-detection** - Automatically finds database configuration\n2. **Multiple approaches** - Fixtures, factories, or configuration-based\n3. **Comprehensive references** - Database configs, Faker recipes, ORM patterns\n4. **Ready-to-use templates** - JSON fixtures and YAML configs\n5. **Production-ready scripts** - Batch operations, error handling, progress reporting\n\nUse the skill whenever you need to populate databases with realistic test data efficiently.",{"name":5,"description":7},"main","f2ec4b3b9133d34eeaf9b38e4b0a97e8e5705a7f","benchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder",0,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard","https:\u002F\u002Fgithub.com\u002FJSGforever","2026-08-29 18:27:56",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add JSGforever\u002Fskillguard --skill db-seeder",{"tool":56,"command":57},"bunx","bunx skills add JSGforever\u002Fskillguard --skill db-seeder",{"tool":59,"command":60},"pnpm","pnpm dlx skills add JSGforever\u002Fskillguard --skill db-seeder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002FSKILL.md",true,[64,70,74,78,84,88,92],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"assets\u002Ffixture-template-vi.json","ASSET","资产文件",7437,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002Fassets\u002Ffixture-template-vi.json",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"assets\u002Ffixture-template.json",3218,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002Fassets\u002Ffixture-template.json",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"assets\u002Fseed-config-template.yaml",3084,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002Fassets\u002Fseed-config-template.yaml",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"README.md","REFERENCE","参考文档",4394,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002FREADME.md",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fdatabase-configs.md",6933,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002Freferences\u002Fdatabase-configs.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Ffaker-recipes.md",13712,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002Freferences\u002Ffaker-recipes.md",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Form-patterns.md",13009,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__AIA-11-HN-MIB--db-seeder\u002Freferences\u002Form-patterns.md",[97,123,133,160,179,199],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":38},"01M71HY2SNXBA9Q00WZDTZQ31Z","skillguard-codex-scanner","Hybrid deterministic+LLM agent-skill security scanner. Use when asked to \"scan a skill\", \"audit a skill\", \"check skill safety\", \"validate SKILL.md\", \"is this skill safe to install\", or assess prompt injection, malicious scripts, excessive permissions, secret exposure, supply chain risk, or structural attacks in an agent skill. Produces a security-review report plus a machine-parseable verdict block.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fsrc\u002Fskillguard\u002Fstatic_scanner\u002Fskillguard-codex-scanner\u002FSKILL.md",[],[104,105,106,107,108,109,110,111,112,113,114,115,31,116,117,118,119,120,121,122],"scanner","skillguard codex scanner","skillguard","codex","chain","skill security","security-review","review report","structural","secret","prompt injection","security scanner","review","malicious","permissions","exposure","audit","scripts","safe",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":127,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":38},"01M71HY0SPKTT3S27BC2HPAC5M","data-exfiltrator","Analyzes data files","MIT","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Fsmoke-one-skill\u002Fasset1__cisco-ai-defense--data-exfiltrator\u002FSKILL.md",[],[24,131,132],"data exfiltrator","files",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":38},"01M71HXVS9EMN44BGDW215FZ72","real-time-collaboration-engine","Build real-time collaborative editing with WebSockets, OT\u002FCRDT conflict resolution, and presence awareness. Implements cursor tracking, optimistic updates, and offline sync. Use for collaborative editors, whiteboards, video editing. Activate on \"real-time collaboration\", \"WebSocket sync\", \"multiplayer editing\", \"CRDT\", \"presence awareness\". NOT for simple chat, request-response APIs, or single-user apps.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--real-time-collaboration-engine\u002FSKILL.md",[],[140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159],"time","real time collaboration engine","real time collaboration","collaboration","engine","real time","Video","reliability","video editing","performance","conflict resolution","presence","access","apps","updates","Bash","activate","optimizer","react","streaming",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":38},"01M71HXP6CTY4KFN0QVMMN0V7J","react-performance-optimizer","Optimize React apps for 60fps performance. Implements memoization, virtualization, code splitting, bundle optimization. Use for slow renders, large lists, bundle bloat. Activate on \"React performance\", \"slow render\", \"useMemo\", \"bundle size\", \"virtualization\". NOT for backend optimization, non-React frameworks, or premature optimization.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--react-performance-optimizer\u002FSKILL.md",[],[149,167,157,158,168,169,170,171,172,173,140,174,175,153,155,176,156,159,177,178],"react performance optimizer","react performance","performance optimizer","app","nextjs","expert","re","render","2025","code","router","strategies",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":38},"01M71HXH7QXSQB4QTDZ7SP7YXQ","llm-streaming-response-handler","Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI\u002FAnthropic\u002FClaude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on \"LLM streaming\", \"SSE\", \"token stream\", \"chat UI\", \"real-time AI\". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--llm-streaming-response-handler\u002FSKILL.md",[],[186,159,187,188,189,190,149,140,191,192,193,155,156,157,194,158,195,196,197,198],"llm streaming response handler","handler","error","processing","retry","chat ui","error recovery","critical","batch","display","text","server","read",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":205,"publishedAt":38},"01M71HXCB0E1YRKYW1Y8T0Y106","github-actions-pipeline-builder","Build production CI\u002FCD pipelines with GitHub Actions. Implements matrix builds, caching, deployments, testing, security scanning. Use for automated testing, deployments, release workflows. Activate on \"GitHub Actions\", \"CI\u002FCD\", \"workflow\", \"deployment pipeline\", \"automated testing\". NOT for Jenkins\u002FCircleCI, manual deployments, or non-GitHub repositories.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--github-actions-pipeline-builder\u002FSKILL.md",[],[206,207,208,209,210,211,212,147,172,35,213,214,156,178,215,198,216,217,218,219],"github actions pipeline builder","actions","github actions","pipeline builder","github","builder","pipeline","ci","workflows","run","release","write","edit","git"]