seed-data-curator
БесплатноБез исполняемых скриптовНе проверенUse when E2E tests need a reproducible seed dataset and the project has none, or the existing seed has drifted. Picks a representative cross-section of users…
от testland★ 18 звёзд на GitHubОб этом скилле
seed-data-curator
Overview
E2E tests need repeatable starting state - the same set of users, orgs, products, etc. before every run. Generating fresh data per run produces flake; pulling from production raises PII / security concerns; hand-crafted SQL fixtures rot. This skill defines a workflow for building a curated seed set that:
- Lives in the repo as a checked-in artifact.
- Is regenerable on demand from the factory definitions.
- Provides representative coverage of business-relevant states (roles, tiers, status variants).
- Refreshes intentionally (PR-reviewed) rather than continuously.
When to use
- A project is starting E2E coverage and has no seed strategy.
- An existing
seed.sqlhas accumulated cruft over years and reviewers can't tell what each row represents. - The team migrated from one factory library to another and the seed set should be regenerated to match.
- A new role / tier / feature flag needs to be exercised by E2E tests; the seed needs an example user.
Step 1 - Define the coverage matrix
Enumerate the business-relevant states the seed must cover:
| Category | Variants | Why |
|---|---|---|
| User role | Admin / Manager / Standard / Read-only | Different UI / permissions per role. |
| Account tier | Free / Starter / Pro / Enterprise | Feature flags / quota differ. |
| Account state | Active / Suspended / Trial-expired / Deleted | Test the lifecycle handlers. |
| Locale | en-US / ja-JP / de-DE / ar-SA | i18n / RTL coverage. |
| Data volume | Empty / 1 item / 10 items / 100 items | Pagination, empty-states, truncation. |
| Time | New (created today) / Old (created 1y ago) / Anniversary | Date-relative business logic. |
Pick the minimum cross-product that covers your test surface - not every combination. A typical sweet spot is 12-20 seed users.
Step 2 - Pick the persistence format
| Format | When to use |
|---|---|
SQL dump (seeds/seed.sql) |
Fastest restore for E2E suites; database-specific. |
JSON / YAML fixtures (seeds/users.json) |
Database-agnostic; consumed by the factory library at boot. |
Factory script (scripts/seed.rb / seed.py) |
Most flexible; runs the factories at boot time. |
Per-engine seed file (seeds/snowflake.sql + seeds/postgres.sql) |
Multi-warehouse projects. |
Default: factory script - runs the team's factory library to build the dataset every time the test environment starts. SQL dumps are faster but harder to review; reserve them for very large seed sets.
Step 3 - Author the factory script
Example with FactoryBot (Ruby):
# scripts/seed.rb
require 'factory_bot'
require_relative '../db/factories/all'
# Deterministic seed for reproducibility
Faker::Config.random = Random.new(42)
# Coverage cross-section
roles = %i[admin manager standard read_only]
tiers = %i[free starter pro enterprise]
states = %i[active suspended]
users = []
roles.each_with_index do |role, ri|
tiers.each_with_index do |tier, ti|
user = FactoryBot.create(
:user,
role: role,
tier: tier,
state: ri == 0 && ti == 0 ? :suspended : :active, # one suspended for coverage
email: "#{role}-#{tier}@example.com", # predictable for E2E tests to reference
created_at: ri.zero? ? 1.year.ago : Time.current,
)
users << user
end
end
puts "Seeded #{users.count} users"
The predictable email is intentional - E2E tests reference
[email protected] rather than guessing a Faker-generated
email. The factory still uses Faker for non-identifying fields
(name, address, phone).
For Python equivalent with factory_boy + mimesis, see the
synthetic-data-toolkit examples; the same
deterministic-seed-plus-predictable-email pattern applies.
Step 4 - Wire into test bootstrap
Local development
# Reset DB, run migrations, run seed
bundle exec rake db:test:reset
bundle exec ruby scripts/seed.rb
Expose this as a single command (make seed, npm run seed,
yarn seed) so contributors don't memorize the chain.
Verify: before wiring the seed into the suite, assert the row count and PII safety - the factory writes 4 roles × 4 tiers = 16 users:
bundle exec ruby scripts/seed.rb | grep -q "Seeded 16 users" || { echo "seed count wrong"; exit 1; }
If the count is off, fix the factory script (a coverage cell changed) an
Установить seed-data-curator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл seed-data-curator?
Use when E2E tests need a reproducible seed dataset and the project has none, or the existing seed has drifted. Picks a representative cross-section of users, orgs and data, generates rows with the project's factory library, checks in the fixture and wires it into test setup.
Как установить скилл seed-data-curator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл seed-data-curator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic