Ask Claude to Audit Your Project's Folder Structure and Suggest Improvements
Project structures drift over time. Utilities end up in the wrong folder, components get dumped in a flat list, and new features land wherever was convenient at the time. Claude Code can audit the whole tree and suggest a better organization.
Analyze my project's directory structure. Compare it against the
framework's conventions and best practices for a project this size.
Flag files that are in the wrong place and suggest where they should go.
Claude reads the directory tree, checks file contents to understand what each file does, and produces a report:
Issues found:
- src/helpers/UserService.ts is a service, not a helper — move to src/services/
- src/components/ has 47 files in a flat list — group by feature or domain
- src/utils/api.ts is 600 lines — should be split into per-resource clients
- tests/ doesn't mirror the src/ structure — hard to find matching tests
Target specific organizational concerns:
# Group by feature
Reorganize src/ from a type-based structure (controllers/, models/, views/)
to a feature-based structure (users/, orders/, billing/) where each
feature contains its own controller, model, and views.
# Fix test organization
Reorganize tests/ to mirror the src/ directory structure so every
source file's test is easy to find by convention.
# Clean up a flat directory
src/components/ has too many files. Group them into subdirectories
by feature area (auth/, dashboard/, shared/, forms/).
# Check framework conventions
Compare our Laravel project structure against the official conventions.
Are there custom directories that should be in standard locations?
After suggesting changes, ask Claude to do the reorganization:
Move the files to the new structure. Update all import paths, route
references, and autoloader configs. Run the tests to make sure nothing broke.
A clear folder structure is documentation that doesn't need to be written — let Claude organize your files so the structure tells new developers where everything belongs.
via Claude Code
Log in to leave a comment.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.