Standard practice says: build the MVP, throw away the code once the idea is validated
In practice, almost nobody does this. The MVP code ships to production and stays there for years.
That's how high-load applications end up with beginner-level ORM problems: N+1 queries hammering the database with one round trip per row, or the opposite: pulling everything into Python and filtering in application code when a single JOIN would do the job.
I've worked mostly with one ORM, and more recently with a few others. The mistakes repeat across all of them, and agents writing code make the same simple errors every time. I run the nplusone plugin on most projects, and Claude Code almost always sets it off with an N+1 warning mid-session. Check pg_stat_statements on the Postgres side afterward, and the same query shows up again, confirming it's not a false positive, just an agent that skipped eager loading.
So I built a skill that audits an existing project for these patterns, plus a CLAUDE.md addition covering the top five ORM mistakes.
https://github.com/stepanfedyanov/orm-db-optimization-skill
Open to contributions and to hearing where this breaks on setups I haven't tested!
150 views