Who it is forAn Android or KMP developer changing a Room schema who needs to avoid data loss on app upgrade.
The problemMigration SQL and repository code can pass tests on a fresh install and still corrupt or drop data for existing users.
The outcomeA migration review tied to specific data-layer-footguns trap files, with each risk and its verification step listed.
What you need first
- A Kotlin, Compose Multiplatform or desktop JVM project in a git repository
- Claude Code, or any coding agent that reads the open agent-skills format
- Python 3 for the footgun-scan script
- Node.js with npx, if you use the skills CLI install
Steps
- Install the skills with
npx skills@latest add maxrave-dev/kotlin-footgunsand select the data-layer-footguns skill. - Ask the agent to read the data-layer-footguns index and open the trap files about migrations.
- Give the agent the schema diff and the migration file.
- Have the agent run the verification commands listed in each matched trap file against your tree.
- Fix each confirmed risk and rerun the review on the final migration.
Prompt for your agent
Using the data-layer-footguns skill from kotlin-footguns, review the Room migration in <migration file path> and its schema diff. Expected output: each matched migration trap with the SQL line that triggers it and the verification result. Verify that each verification command you run appears verbatim in the matched trap file.
Caveat. The migration traps come from one production app's Room database, so you still need to test upgrades against real data from your own users.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page