$ recombobulate _
home / tips / ask-claude-to-find-inconsistencies-between-related-files-that-should-match
66

Ask Claude to Find Inconsistencies Between Related Files That Should Match

recombobulate @recombobulate · Mar 29, 2026 · Debugging
ask-claude-to-find-inconsistencies-between-related-files-that-should-match

Code that should be consistent across files often isn't — a column was added to the migration but not the model's fillable array, or the frontend form sends fields the API doesn't accept. Claude reads both sides and finds the gaps.

"Check that the User model matches its migration — fillable fields, casts, 
relationships, and any columns that exist in the database but aren't in the model"

Claude compares the migration, model, factory, and tests, then flags every inconsistency — a column with no cast, a relationship with no foreign key, or a factory that creates data the validation would reject.

This works for any pair of files that should agree:

# Frontend forms vs API validation
"Check that the registration form sends exactly the fields the 
RegisterController validates — no missing fields, no extra ones"

# TypeScript types vs API responses
"Compare the TypeScript User interface with the UserResource — 
find fields that exist in one but not the other"

# Config references vs actual config
"Check that every config key referenced in the code actually exists 
in the config files"

# Route names vs usage
"Find route names used in the code that don't exist in the routes 
file, and routes defined but never referenced"

# Test data vs validation rules
"Check that the test factories create data that passes the 
validation rules — find any factory values that would fail validation"

Claude catches drift that's invisible to linters:

  • Schema drift — migration adds a column, model doesn't know about it
  • API contract drift — backend changed a response field, frontend still expects the old name
  • Validation drift — form request has rules for fields that were removed from the form
  • Test drift — tests assert old behavior after a refactor changed the expected output
  • Config drift — code references config keys that were renamed or removed

Inconsistencies between related files are the hardest bugs to find because each file looks correct in isolation — Claude reads them together and spots what doesn't match.

via Claude Code

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
161
Ask Claude to Find and Fix the Performance Bottleneck in a Slow Endpoint

When a page takes five seconds to load or an API endpoint times out under load, tell Claude which route is slow and it traces the entire code path — controller, services, queries, loops — identifying N+1 queries, redundant computations, missing indexes, and cacheable operations, then fixes each bottleneck.

recombobulate @recombobulate · 1 day ago
149
Ask Claude to Diagnose and Fix Flaky Tests That Pass Sometimes and Fail Randomly

Flaky tests are maddening — they pass locally, fail in CI, pass again when you retry. Tell Claude to read the test, identify the source of non-determinism — timing issues, shared state, date dependencies, or order-dependent setup — and fix the root cause so the test is reliably green or reliably red.

recombobulate @recombobulate · 1 day ago
148
Paste an Error Message or Stack Trace and Let Claude Trace It to the Root Cause

When your app throws an error, don't just Google the message — paste the full stack trace into Claude Code. It reads the trace, opens the referenced files in your codebase, follows the call chain, and pinpoints the actual root cause instead of just explaining the symptom.

recombobulate @recombobulate · 1 day ago