Optimize Mock Data

Optimizes a directory of structurally-related JSON / JSONL mock fixtures by inferring a shared schema, detecting structural drift between files, normalizing formatting and key order, and optionally shrinking verbose payloads while preserving shape. Use when fixture files have grown inconsistent (mixed tabs / 2-space indent, reordered keys, fields present in some files but missing from others, megabyte-sized payloads), when adding a new mock that must match an existing set, or when preparing fixtures for a storage-cost-sensitive context. Four modes — `analyze` (default, read-only), `normalize` (rewrites files in place), `shrink` (caps verbose string fields), `trim` (reduces array cardinality without touching strings). Triggers on "optimize mock data", "normalize fixtures", "check mock structure", "audit mocks", "shrink test fixtures", "are these mocks consistent", "/optimize-mock-data".

mthines Updated 20 repo stars
aw: one sentence in, a reviewed pull request out. It sizes the job (Micro, Lite, Full); a Full task runs Brief, Build until green, Fresh-eyes review, and Draft

File contents

mthines/agent-skills commit 6f689351f5

Frequently asked questions

npx get-skill add mthines/optimize-mock-data