laravel-devtoolbox-cli

Inspects Laravel applications via artisan commands to analyze models, routes, SQL queries, security, and performance.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/devtools-skills --skill laravel-devtoolbox-cli-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: laravel-devtoolbox-cli
Source: https://github.com/reason-machines/devtools-skills/tree/main/skills/laravel-devtoolbox-cli
Command: npx skills add https://github.com/reason-machines/devtools-skills --skill laravel-devtoolbox-cli-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Laravel developers lack visibility into their application's internal structure, making it hard to find unused routes, detect N+1 query problems, identify unprotected routes, and diagnose performance bottlenecks without manual code review. ## Core Features & Use Cases - Application Scanning: Run comprehensive health checks across models, routes, services, and container bindings with a single artisan command. - SQL & Performance Analysis: Trace queries per route, detect N+1 duplicates, measure memory usage, and find slow queries with configurable thresholds. - Security Auditing: Detect unprotected routes and analyze middleware coverage, exporting results to JSON for CI/CD quality gates. - Use Case: Before a deployment, run php artisan dev:security:unprotected-routes --format=json in a GitHub Actions workflow and fail the build if more than five unprotected routes are found. ## Quick Start Ask the AI to scan your Laravel application for unused routes and unprotected endpoints, then export the findings as JSON reports.

Frequently Asked Questions about laravel-devtoolbox-cli

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

FAQPage Schema
How do I find unused routes in a Laravel application?▼

Run php artisan dev:routes:unused to list routes not referenced anywhere in your codebase. Add --format=json --output=unused-routes.json to export the results for cleanup or CI checks.

How to detect N+1 query problems in Laravel?▼

Use php artisan dev:sql:duplicates --route=users.index --threshold=3 to trace duplicate queries on a specific route. The output suggests eager loading fixes, such as adding Post::with(['author', 'comments']) in your controller.

What Laravel and PHP versions does laravel-devtoolbox support?▼

The package requires PHP 8.3 or higher and Laravel 11.x or 12.x. Install it as a development dependency with composer require --dev grazulex/laravel-devtoolbox.

Can I use Laravel Devtoolbox in CI/CD pipelines?▼

Yes, all commands support --format=json output designed for automation. You can export security and route reports, parse counts with jq, and fail builds when thresholds for unused or unprotected routes are exceeded.

Why are the dev: artisan commands not found after installation?▼

Command registration usually fails due to cached configuration. Run php artisan clear-compiled, config:clear, cache:clear, and composer dump-autoload, then verify installation with composer show grazulex/laravel-devtoolbox.

How do I generate a model relationship diagram in Laravel?▼

Run php artisan dev:model:graph --format=mermaid --output=relationships.mmd to generate a Mermaid diagram of Eloquent relationships. Use --models=User,Post to limit the diagram to specific models when the output is too large.