It would be interesting to take this approach one step further and submit a PR with documentation.
pawurb · 9h ago
Hi, author here. Can you elaborate?
jnathsf · 4h ago
I was thinking rails-pg-extras could output to Claude Code since it can see the actual codebase, and generate PRs.
For example, instead of just "add this index", it could see the models and relationships, figure out the right migration syntax, spot N+1 queries in controllers that are causing the slow lookups in the first place.
The workflow would be pretty clean too - let your MCP tool do what it's good at (finding the problems), then hand it off to Claude Code/Cursor/etc that understands the Rails apps to actually write the fixes.
Thoughts?
pawurb · 3h ago
thanks for it works now, all the heavy lifting is done by LLM, gem only provides the data
For example, instead of just "add this index", it could see the models and relationships, figure out the right migration syntax, spot N+1 queries in controllers that are causing the slow lookups in the first place.
The workflow would be pretty clean too - let your MCP tool do what it's good at (finding the problems), then hand it off to Claude Code/Cursor/etc that understands the Rails apps to actually write the fixes.
Thoughts?