fake-data-refresh

Refresh Django test datasets by deleting and recreating fake data.

1|Updated Sep 6, 2024
One-click install
npx skills add https://github.com/carlos18bp/gym_project --skill fake-data-refresh-carlos18bp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fake-data-refresh
Source: https://github.com/carlos18bp/gym_project/tree/main/.agents/skills/fake-data-refresh
Command: npx skills add https://github.com/carlos18bp/gym_project --skill fake-data-refresh-carlos18bp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the time-consuming and error-prone task of reseeding Django databases with consistent fake data when testing flows require fresh, coherent records.

Core Features & Use Cases

  • Inverse production gate: Detects likely production via fleet metadata and environment settings, and refuses to run to prevent destructive reseeding.
  • Automatic command discovery: Scans the project for available management commands (e.g., delete and create/seed variants) and adapts to the project’s actual naming.
  • Deterministic refresh workflow with safeguards: Executes delete (with a best-effort confirmation flag when supported), recreates fake data with a target record count, verifies post-create model counts, and reports warnings when results look suspicious.

Quick Start

Ask the assistant: "Run fake-data-refresh for <proyecto> with 50 records in dry-run mode first so I can review the planned delete/create actions."

Frequently Asked Questions about fake-data-refresh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely reseed Django fake data without risking production databases?

Safely reseeding Django fake data requires an inverse production gate that detects likely production environments via fleet metadata and environment heuristics, refusing to run if detected. This prevents accidental destructive delete and recreate operations on live databases.

How do I refresh Django test datasets when model counts become inconsistent after foreign key changes?

Refreshing Django test datasets after foreign key changes involves deleting and recreating fake data with a target record count, then verifying post-create model counts to ensure data coherence and report warnings when results look suspicious.

Can I preview a Django database seeding refresh before committing the changes?

Yes, you can preview a Django database seeding refresh using dry-run mode, which lets you review planned delete and create actions before any actual data modification occurs. This works alongside automatic discovery of management commands.

Does this Django fake data refresh tool require specific management command names?

No specific management command names are required because the tool features automatic command discovery, scanning your Django project to find available delete and create or seed variants, adapting to your project's actual naming conventions.

When should I refresh staging fake data in Django before running Playwright validations?

You should refresh staging fake data in Django before Playwright validations when tests require fresh, coherent fixtures. This serves as a pre-step to ensure deterministic record counts and consistent foreign key relationships for reliable end-to-end testing.

What safeguards prevent accidental data loss during Django staging database seeding?

Safeguards against accidental data loss during Django staging database seeding include an inverse production gate, dry-run mode for reviewing actions, best-effort confirmation flags for deletes, optional delete skipping, and post-create model record count verification.