Claude Code Plugin

LaraClaude

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

GitHub
/plugin install github:edulazaro/laraclaude
27
Skills
9
Categories
MIT
License

Installation

Requires Claude Code installed.

/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.

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: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).

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.

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