Skip to content
cccskills
FreePublished on GitHub

data-seeding

Seed databases with fixtures, test data, and demo data for dev/staging. Go + TS, Postgres. Trigger: seed, fixtures, faker, factory, test data.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3 stars(GitHub 3 + cccskills 0)
Works withPostgreSQL

Run score Not tested

See how to install

Files included (1)

  • SKILL.md3.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Data Seeding

Poblar DBs de forma idempotente, segura y realista. Seeding = datos. NO migrations (schema) ni prod data.

Tipos de Seed

TipoEntornoVersionadoEjemplos
Reference/lookupsTODOS (incl prod)Sí, en reporoles, países, grados, materias, curricula
Dev/local fixturesdev localSí, opt-inusuarios/cursos/notas fake
Test fixturesCI/testsSí, por suiteescenarios controlados
Demo/stagingstagingSí, opt-intenant demo para comerciales

Regla: reference puede ir a prod; el resto, jamás.

Estructura

db/seeds/reference/ (siempre), fixtures/ (opt-in --fixtures), demo/ (opt-in --demo), anonymize/ (sanitización dumps prod).

Stack

TS (Prisma/Drizzle): prisma/seed.ts con @faker-js/faker/locale/es. Flags --fixtures, --demo. Factory pattern: userFactory(overrides) retorna objeto con defaults + spread.

Go (GORM/sqlx): cmd/seed/main.go con gofakeit.Seed(42). Flags via stdlib flag. Factory: UserFactory(overrides ...func(*User)).

Idempotencia (no negociable)

Correr N veces = mismo resultado. Usar upserts: ON CONFLICT DO NOTHING (SQL), prisma.upsert (TS), clause.OnConflict{DoNothing: true} (Go).

Relaciones

Parents → children. Cachear IDs. Orden Educabot: tenants → users → courses → enrollments → grades.

Volumen

Dev: 10-100. Staging demo: 100-1000. Perf tests: 10k-1M.

Locales LatAm

Siempre faker/locale/es (AR/MX/CO/CL/PE) o pt_BR (Brasil) para demos creíbles.

Fixtures Estándar Educabot

1 tenant "Escuela San Martín", 1 super_admin, 1 tenant_admin, 3 docentes, 5 cursos/docente, 30 alumnos/curso, 10 notas/alumno. Password: dev12345 (bcrypt/argon2). Banner rojo en staging: "ENTORNO DE PRUEBA".

CLI

npm run seed (reference only) / --fixtures / --demo --tenant=X / --reset (DEV ONLY) / --count users=1000. Go: go run ./cmd/seed --fixtures.

CI/Tests

A) Transaction rollback por test (rápido). B) Testcontainers (Go, DB fresca por suite). Seed determinista: faker.seed(42) / gofakeit.Seed(42).

Anonimización para Staging

NUNCA copiar prod tal cual. Flujo: dump con DPO → DB temporal → script anonimización → redump → staging. Reemplazar: email → user-{id}@staging, name → faker, DNI/CUIT/CPF → generador válido, phone/address → faker, password → hash fijo dev.

Performance (1M+ rows)

Disable triggers/índices → COPY FROM CSV (o pgx.CopyFrom / Prisma createMany con chunks 10k) → rebuild índices → ANALYZE.

Guardrails Anti-prod

Obligatorio en todo seeder: check NODE_ENV !== 'production' / APP_ENV != "production" → throw/fatal. Flag --confirm-prod-unsafe no documentada.

Anti-patterns

  • Seed dentro de migrations (mezcla schema+data)
  • Copiar PII real prod → staging (GDPR/LGPD)
  • Seed no idempotente, random sin seed fijo en tests
  • Seeds sin version control, correr en prod "por accidente"
  • Passwords dev con hash débil reutilizado
  • Demo data = copia literal prod
  • Children antes que parents (FK violations)

Checklist

  • Clasificado: reference/fixtures/test/demo
  • Idempotente (corre 2x sin romper/duplicar)
  • Guardrail NODE_ENV presente
  • Determinista (faker.seed(42))
  • Locale es/pt_BR
  • Sin PII real ni passwords prod
  • Relaciones en orden correcto
  • CLI documentada en README
  • Credenciales dev marcadas "NO PROD"
  • Si staging: script anonimización revisado
  • Tests CI pasan con seed fresco

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

See all skills by SebastianLuser

Report a problem with this skill