alti3/litestar-skills/advanced-alchemy-database-seeding

Claude Code and agent skill by alti3/litestar-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Seed databases and load fixtures with Advanced Alchemy using JSON fixture files, sync or async helpers, repository bulk operations, and framework startup hooks. Use when creating development or test seed data, loading initial reference data, or dumping and restoring fixture-backed tables. Do not use for schema migrations or general runtime CRUD handling.

Install

npx vskill@latest install alti3/litestar-skills/advanced-alchemy-database-seeding

SKILL.md

The same SKILL.md was published earlier as alti3/litestar-skills/advanced-alchemy-database-seeding.

Database Seeding

Execution Workflow

  1. Store fixtures as JSON objects or arrays of objects in a dedicated fixtures directory.
  2. Use open_fixture() for sync code or open_fixture_async() for async code.
  3. Create repository instances inside a real session and load fixture records in batches.
  4. Seed parent tables before child tables and make the process idempotent when possible.
  5. Wire seeding into startup hooks, dedicated commands, or one-off scripts based on environment needs.

Implementation Rules

  • Keep fixture files versioned alongside the application code.
  • Use add_many() or upsert_many() instead of row-by-row inserts for non-trivial datasets.
  • Separate development, test, and production seed data explicitly.
  • Do not hide seeding in normal request paths.

Example Pattern

python
product_data = await open_fixture_async(fixtures_path, "product")
await product_repo.add_many([Product(**item) for item in product_data])
await db_session.commit()

Validation Checklist

  • Confirm fixture files include all required model fields.
  • Confirm seeding can run twice without creating bad duplicates or broken foreign keys.
  • Confirm batch operations commit only after the dataset passes validation.
  • Confirm framework startup seeding is acceptable for the target environment and data size.

Cross-Skill Handoffs

  • Use advanced-alchemy-cli for dumping fixture data or pairing seeding with migration workflows.
  • Use advanced-alchemy-litestar, advanced-alchemy-fastapi, or advanced-alchemy-flask for framework-specific startup integration.
  • Use advanced-alchemy-repositories when custom seed logic depends on repository helpers.

Advanced Alchemy References

  • https://advanced-alchemy.litestar.dev/latest/usage/database_seeding.html
  • https://docs.advanced-alchemy.litestar.dev/latest/usage/database_seeding.html

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/alti3/litestar-skills/advanced-alchemy-database-seeding/badge)](https://verified-skill.com/skills/alti3/litestar-skills/advanced-alchemy-database-seeding)

Something wrong with this skill or its page? Tell us.