Claude Code Plugin

LaraClaude

A comprehensive Laravel toolkit plugin for Claude Code. 32 specialized skills to analyze, debug, scaffold, and optimize Laravel applications directly from your terminal.

GitHub
/plugin marketplace add edulazaro/laraclaude /plugin install laraclaude@edulazaro
32
Skills
10
Categories
MIT
License

Installation

Requires Claude Code installed.

Recommended (marketplace). Add the marketplace once, then install. You get version tracking and automatic updates with /plugin marketplace update.

/plugin marketplace add edulazaro/laraclaude
/plugin install laraclaude@edulazaro

Quick install (direct from GitHub):

/plugin install github:edulazaro/laraclaude

Database & Migrations

/lc:consolidate-migrations

Analyze and consolidate fragmented migration files. When your project accumulates hundreds of small migrations (add column, modify column, rename...), this skill merges them into clean, optimized files.

/lc:consolidate-migrations analyze # Show consolidation report
/lc:consolidate-migrations properties # Consolidate a specific table
/lc:consolidate-migrations all # Consolidate all safe tables
Groups migrations by table, detects foreign key dependencies, classifies each as SAFE / CAUTION / DO NOT MERGE, merges ADD COLUMN into original CREATE, preserves data migrations, validates syntax after consolidation.
/lc:check-foreign-keys

Detect broken, orphaned, or missing foreign key constraints across your migrations and models.

/lc:check-foreign-keys # Check all tables
/lc:check-foreign-keys properties # Check specific table
/lc:migration-fresh-test

Run migrate:fresh in your Docker container and get detailed error analysis with fix suggestions.

/lc:migration-fresh-test # Run migrate:fresh
/lc:migration-fresh-test --seed # With seeders

Models & Queries

/lc:analyze-model

Deep analysis of any Eloquent model: relationships, scopes, casts, fillable, observers, keepers, actions, and potential issues.

/lc:analyze-model Property # Analyze specific model
/lc:analyze-model # List all models
/lc:find-n-plus-one

Detect N+1 query problems in Blade views, Livewire components, and controllers. Suggests the exact with() statement needed.

/lc:find-n-plus-one # Scan entire project
/lc:find-n-plus-one resources/views/ # Scan specific directory
/lc:orphaned-records

Find database records where the parent (foreign key) no longer exists.

/lc:unused-columns

Detect database columns that are never referenced anywhere in the codebase.

/lc:boost-inspect

Runtime-verified inspection using the Laravel Boost MCP server. Instead of static grep, it reasons about the live app: real schema, real row counts, loaded models, and recent errors. Falls back to Docker + tinker if Boost is not installed.

/lc:boost-inspect # Full runtime report
/lc:boost-inspect models # Verify model relationships at runtime
/lc:boost-inspect schema # Diff live schema vs migrations
/lc:boost-inspect errors # Analyze the last runtime errors
Confirms orphaned foreign keys against actual data instead of guessing from migrations, detects schema drift between the running database and database/migrations/, and routes you to the matching fix skill.

Security & Performance

/lc:security-audit

Detect common Laravel security vulnerabilities: SQL injection, XSS, mass assignment, exposed secrets.

/lc:security-audit # Scan entire project
/lc:security-audit fix # Auto-fix with confirmation
/lc:security-audit fix --dry-run # Preview fixes
/lc:spatie-permissions-audit

Audit spatie/laravel-permission usage. Cross-references the permissions and roles defined in seeders and the database against the ones used in code, catching the gaps that silently break authorization.

/lc:spatie-permissions-audit # Scan entire project
/lc:spatie-permissions-audit fix # Auto-fix with confirmation
/lc:spatie-permissions-audit fix --dry-run # Preview fixes
Detects permissions used in code but never defined (typos that fail silently), dead permissions, guard mismatches, sensitive write routes with no middleware or policy, and seeders that create permissions without resetting spatie's cache.
/lc:slow-queries

Detect queries without indexes, queries in loops, and unbounded selects.

/lc:cache-opportunities

Detect repeated queries and computations that should be cached.

Livewire & Blade

/lc:livewire-audit

Detect common Livewire/Volt problems: unserializable properties, missing wire:key, orphaned events, re-render issues.

/lc:livewire-optimize

Detect and fix Livewire performance issues: heavy renders, excessive queries, unnecessary reactivity.

/lc:blade-audit

Detect hardcoded text without @text(), duplicate CSS classes, unused Blade components, and accessibility issues.

Scaffolding

/lc:volt-component

Generate a Livewire Volt single-file component following your project's conventions.

/lc:volt-component UserProfile
/lc:generate-action

Create a Laractions action class with proper boilerplate and register it in the model.

/lc:extract-action

Extract business logic from a controller or Livewire component method into a Laractions Action class.

/lc:generate-modal

Generate a modal component using the project's x-modal pattern with Livewire integration.

/lc:generate-table

Generate a table component with filters, sorting, and infinite scroll.

/lc:generate-crud

Generate complete CRUD scaffolding: migration, model, controller, routes, views (index + create/edit modal).

/lc:generate-spatie-permissions

Scaffold a spatie/laravel-permission setup: add the HasRoles trait to a model and generate an idempotent roles and permissions seeder, with the cache reset wired in.

/lc:generate-spatie-permissions # Default to User model
/lc:generate-spatie-permissions Member # Add HasRoles to a specific model
/lc:generate-scraper

Create a Larascraper scraper class for a target website. Inspects the real page to pick selectors, and wires up browser actions (click, type, wait, scroll) when the page needs interaction before the content is available.

/lc:generate-scraper BikeScraper https://shop.com/bikes
/lc:generate-scraper PriceScraper # Prompts for the URL
Reads the installed Scraper API so it matches your version, fills handle() from the real markup, adds the right action chain for cookie walls, search forms, pagination or infinite scroll, and runs it once to confirm the fields come back populated.
/lc:laracrate-collection

Add or edit a Laracrate file collection in config/laracrate.php with the correct anatomy: disk, access mode, accepted types, variants, previews, text extraction and embeddings, flags and per-model scoping.

/lc:laracrate-collection # Prompts for the collection
/lc:laracrate-collection avatar # Add or edit a named collection

Testing

/lc:generate-test

Generate feature/unit tests for a model, controller, action, or component by analyzing its code.

/lc:test-coverage

Analyze which models, controllers, and actions have tests and which don't.

Code Quality

/lc:dead-code

Find unused classes, methods, routes, views, and imports.

/lc:dead-code # Scan entire project
/lc:dead-code clean # Remove dead code with confirmation
/lc:dead-code clean --dry-run # Preview removals

Debug

/lc:analyze-error

Paste a Laravel stacktrace and get root cause analysis with a specific fix. Parses the stacktrace, reads the relevant source files, identifies the root cause (not just the symptom), and provides a specific code fix.

Documentation

/lc:api-docs

Generate API documentation from routes, controllers, and form requests.

/lc:model-diagram

Generate an ER diagram of Eloquent models in Mermaid format.

DevOps

/lc:docker-check

Verify docker-compose.yml, Dockerfile, and .env are properly synchronized.

Checks: database/Redis/mail host matching service names, port conflicts, PHP version consistency, required PHP extensions, volume path validity, .env vs .env.example completeness.
/lc:deploy-checklist

Verify the project is production-ready with a comprehensive checklist.

Compatibility

Claude Code (recommended)

Works everywhere Claude Code runs:

Agent Skills compatible tools

LaraClaude skills follow the Agent Skills standard, so any tool implementing it can use them:

  • Crush — copy the skills/ directory to ~/.config/crush/skills/, .crush/skills/, or .claude/skills/
  • Any future tool that implements the Agent Skills specification

Requirements

  • Claude Code
  • A Laravel project (8+, 9+, 10+, 11+, 12+, 13+)
  • Docker (optional, for migration-fresh-test and orphaned-records)

Sponsors

MIT License. View on GitHub