What problem does it solve? Changing or reviewing persistence code is risky: filesystem and Firestore adapters can silently diverge, IDs and timestamps can be corrupted, and provider migrations can lose data. This Skill enforces the invariants that keep both storage backends behaviorally identical and migration-safe. ## Core Features & Use Cases - Contract Preservation: Ensures PromptRepository behavior stays consistent across filesystem and Firestore implementations, including IDs, creation timestamps, counters, category protections, and duplicate semantics. - Security & Integrity Guardrails: Validates PERSISTENCE_PROVIDER server-side only, prevents path traversal and partial writes in the filesystem adapter, and requires Firestore transactions for atomic read-modify-write operations. - Migration Safety: Requires documented migration, backup, rollback, indexes, credentials, and data ownership before changing providers, and forbids presenting local uploads as durable Cloud Run storage. - Use Case: When adding a new field to prompt records, use this Skill to update both adapters, verify shared contract behavior with tests, and document the Firestore index and rollback plan. ## Quick Start Review the changes to server/repositories and confirm both the filesystem and Firestore adapters still satisfy the PromptRepository contract.