structure-audit

Scan Laravel PHP source files and report structural and architectural issues.

1|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/jonaaix/laravel-livewire-base --skill structure-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: structure-audit
Source: https://github.com/jonaaix/laravel-livewire-base/tree/main/.ai/skills/structure-audit
Command: npx skills add https://github.com/jonaaix/laravel-livewire-base --skill structure-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze a Laravel project's code organization against proven structuring principles. Scan all PHP source files (excluding vendor/, node_modules/, storage/) and produce a structured report of findings with actionable suggestions.

Core Features & Use Cases

  • Inline Validation in Controllers: detect validation logic inside controllers and suggest moving to Form Requests.
  • Fat Controllers: identify long methods and heavy business logic for extraction to services or actions.
  • Duplicate Logic: flag repeated queries or transformations to promote DRY code.
  • Route & Blade Organization: highlight route file bloat and logic in templates to improve separation of concerns.

Quick Start

Run a full structure audit on your Laravel project to identify architecture and code organization issues.

Frequently Asked Questions about structure-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit my Laravel project for clean architecture and code organization issues?

Fat controllers in Laravel are identified by detecting long methods and heavy business logic within controller files. The audit suggests extracting this logic into dedicated services or action classes to improve testability and maintainability.

How do I detect inline validation in my Laravel controllers?

Inline validation in Laravel controllers is detected by scanning for validation logic directly within controller methods. The audit recommends moving this validation logic into dedicated Form Requests to separate concerns and improve code reusability.

Does the structure audit work on large Laravel codebases?

Yes, the structure audit works on Laravel projects of varying sizes. It scans all PHP source files while excluding vendor, node_modules, and storage directories to ensure the analysis remains efficient and focused on your actual application code.

What is the best way to find duplicated logic and route file bloat in a Laravel app?

The best way to find duplicated logic and route file bloat is to run a full structure audit that scans PHP source files for repeated queries, transformations, and oversized route configurations. It highlights these issues to promote DRY code and improve separation of concerns.