{
  "markdown": "![LaraClaude](art/banner.png)\n\n# LaraClaude\n\nA comprehensive Laravel toolkit plugin for [Claude Code](https://claude.ai/code). 31 specialized skills to analyze, debug, scaffold, and optimize Laravel applications directly from your terminal.\n\n## Installation\n\nRequires [Claude Code](https://claude.ai/code) installed.\n\n**Recommended (marketplace):** add the marketplace once, then install. You get version tracking and automatic updates with `/plugin marketplace update`.\n\n```bash\n/plugin marketplace add edulazaro/laraclaude\n/plugin install laraclaude@edulazaro\n```\n\n**Quick install (direct from GitHub):**\n\n```bash\n/plugin install github:edulazaro/laraclaude\n```\n\n## Skills\n\n### Database & Migrations\n\n#### `/lc:consolidate-migrations`\nAnalyze 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.\n\n```\n/lc:consolidate-migrations analyze        # Show consolidation report\n/lc:consolidate-migrations properties     # Consolidate a specific table\n/lc:consolidate-migrations all            # Consolidate all safe tables\n```\n\n**What it does:**\n- Groups migrations by table\n- Detects foreign key dependencies\n- Classifies each as SAFE / CAUTION / DO NOT MERGE\n- Merges ADD COLUMN into original CREATE\n- Preserves data migrations\n- Validates syntax after consolidation\n\n#### `/lc:check-foreign-keys`\nDetect broken, orphaned, or missing foreign key constraints across your migrations and models.\n\n```\n/lc:check-foreign-keys                    # Check all tables\n/lc:check-foreign-keys properties         # Check specific table\n```\n\n**Detects:**\n- FK in migration but no relationship in model\n- Relationship in model but no FK in migration\n- FK referencing non-existent tables or columns\n- Risky `onDelete` actions\n\n#### `/lc:migration-fresh-test`\nRun `migrate:fresh` in your Docker container and get detailed error analysis with fix suggestions.\n\n```\n/lc:migration-fresh-test                  # Run migrate:fresh\n/lc:migration-fresh-test --seed           # With seeders\n```\n\n---\n\n### Models & Queries\n\n#### `/lc:analyze-model`\nDeep analysis of any Eloquent model: relationships, scopes, casts, fillable, observers, keepers, actions, and potential issues.\n\n```\n/lc:analyze-model Property                # Analyze specific model\n/lc:analyze-model                         # List all models\n```\n\n**Shows:**\n- All relationships with types and related models\n- Scopes, accessors, mutators\n- Casts, fillable, guarded\n- Observers, Larakeep keepers, Laractions actions\n- Potential issues (missing fillable, N+1 risks)\n\n#### `/lc:find-n-plus-one`\nDetect N+1 query problems in Blade views, Livewire components, and controllers.\n\n```\n/lc:find-n-plus-one                       # Scan entire project\n/lc:find-n-plus-one resources/views/      # Scan specific directory\n```\n\n**Detects:**\n- `$model->relationship` inside `@foreach` without eager loading\n- Missing `with()` in Livewire computed properties\n- Suggests the exact `with()` statement needed\n\n#### `/lc:orphaned-records`\nFind database records where the parent (foreign key) no longer exists.\n\n```\n/lc:orphaned-records                      # Check all tables\n/lc:orphaned-records operations           # Check specific table\n```\n\n#### `/lc:unused-columns`\nDetect database columns that are never referenced anywhere in the codebase.\n\n```\n/lc:unused-columns                        # Check all tables\n/lc:unused-columns properties             # Check specific table\n```\n\n#### `/lc:boost-inspect`\nRuntime-verified inspection using the [Laravel Boost](https://laravel.com/docs/13.x/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.\n\n```\n/lc:boost-inspect                         # Full runtime report\n/lc:boost-inspect models                  # Verify model relationships at runtime\n/lc:boost-inspect schema                  # Diff live schema vs migrations\n/lc:boost-inspect errors                  # Analyze the last runtime errors\n/lc:boost-inspect Property                # Focus on one model/table\n```\n\n**What it does:**\n- Uses Boost's MCP tools (Database Schema, Database Query, Tinker, Last Error) when available\n- Confirms orphaned FKs against actual data (not guessed from migrations)\n- Detects schema drift between the running database and `database/migrations/`\n- Pairs with Boost rather than replacing it, then routes you to the matching fix skill\n\n---\n\n### Security & Performance\n\n#### `/lc:security-audit`\nDetect common Laravel security vulnerabilities: SQL injection, XSS, mass assignment, exposed secrets.\n\n```\n/lc:security-audit                        # Scan entire project\n/lc:security-audit fix                    # Auto-fix with confirmation\n/lc:security-audit fix --dry-run          # Preview fixes\n/lc:security-audit app/Http/Controllers/  # Scan specific directory\n```\n\n#### `/lc:spatie-permissions-audit`\nAudit [spatie/laravel-permission](https://github.com/spatie/laravel-permission) usage. Cross-references the permissions/roles defined (seeders, DB) against the ones used in code, catching the gaps that silently break authorization.\n\n```\n/lc:spatie-permissions-audit              # Scan entire project\n/lc:spatie-permissions-audit fix          # Auto-fix with confirmation\n/lc:spatie-permissions-audit fix --dry-run # Preview fixes\n/lc:spatie-permissions-audit app/Http/    # Scan specific directory\n```\n\n**Detects:**\n- Permissions/roles used in code but never defined (typos that fail silently)\n- Permissions defined but never used (dead permissions)\n- Guard mismatches between checks and definitions\n- Sensitive write routes with no permission/role middleware or policy\n- Seeders that create permissions without resetting spatie's cache\n\n#### `/lc:slow-queries`\nDetect queries without indexes, queries in loops, and unbounded selects.\n\n```\n/lc:slow-queries                          # Scan entire project\n/lc:slow-queries fix                      # Auto-fix with confirmation\n/lc:slow-queries fix --dry-run            # Preview fixes\n/lc:slow-queries app/Models/              # Scan specific directory\n```\n\n#### `/lc:cache-opportunities`\nDetect repeated queries and computations that should be cached.\n\n```\n/lc:cache-opportunities                   # Scan entire project\n/lc:cache-opportunities fix               # Auto-fix with confirmation\n/lc:cache-opportunities fix --dry-run     # Preview fixes\n/lc:cache-opportunities app/Services/     # Scan specific directory\n```\n\n---\n\n### Livewire & Blade\n\n#### `/lc:livewire-audit`\nDetect common Livewire/Volt problems: unserializable properties, missing wire:key, orphaned events, re-render issues.\n\n```\n/lc:livewire-audit                        # Scan all components\n/lc:livewire-audit fix                    # Auto-fix with confirmation\n/lc:livewire-audit fix --dry-run          # Preview fixes\n/lc:livewire-audit path/to/component.php  # Scan specific file\n```\n\n#### `/lc:livewire-optimize`\nDetect and fix Livewire performance issues: heavy renders, excessive queries, unnecessary reactivity.\n\n```\n/lc:livewire-optimize                     # Scan all components\n/lc:livewire-optimize fix                 # Auto-fix with confirmation\n/lc:livewire-optimize fix --dry-run       # Preview fixes\n/lc:livewire-optimize path/to/file.php    # Scan specific file\n```\n\n#### `/lc:blade-audit`\nDetect hardcoded text without `@text()`, duplicate CSS classes, unused Blade components, and accessibility issues.\n\n```\n/lc:blade-audit                           # Scan all views\n/lc:blade-audit fix                       # Auto-fix with confirmation\n/lc:blade-audit fix --dry-run             # Preview fixes\n/lc:blade-audit resources/views/livewire/ # Scan specific directory\n```\n\n---\n\n### Scaffolding\n\n#### `/lc:volt-component`\nGenerate a Livewire Volt single-file component following your project's conventions.\n\n```\n/lc:volt-component UserProfile            # Create component\n```\n\n**Generates:**\n- PHP logic at top with `new class extends Component`\n- Proper mount(), validation, form methods\n- `@text()` translations with English defaults\n- Single root element, proper wire:model bindings\n\n#### `/lc:generate-action`\nCreate a [Laractions](https://github.com/edulazaro/laractions) action class with proper boilerplate and register it in the model.\n\n```\n/lc:generate-action Property/ToggleFeatured\n```\n\n#### `/lc:extract-action`\nExtract business logic from a controller or Livewire component method into a [Laractions](https://github.com/edulazaro/laractions) Action class.\n\n```\n/lc:extract-action PropertyController:store    # Extract from controller method\n/lc:extract-action path/to/file.php:methodName # Extract from any file\n```\n\n#### `/lc:generate-modal`\nGenerate a modal component using the project's `x-modal` pattern with Livewire integration.\n\n```\n/lc:generate-modal ConfirmDelete          # Create modal component\n```\n\n#### `/lc:generate-table`\nGenerate a table component with filters, sorting, and infinite scroll using the project's TableComponent base.\n\n```\n/lc:generate-table Property               # Create table for model\n```\n\n#### `/lc:generate-crud`\nGenerate complete CRUD scaffolding: migration, model, controller, routes, views (index + create/edit modal).\n\n```\n/lc:generate-crud Invoice                 # Full CRUD for Invoice\n```\n\n#### `/lc:generate-spatie-permissions`\nScaffold a [spatie/laravel-permission](https://github.com/spatie/laravel-permission) setup: add the `HasRoles` trait to a model and generate an idempotent roles & permissions seeder (with cache reset wired in).\n\n```\n/lc:generate-spatie-permissions           # Default to User model\n/lc:generate-spatie-permissions Member    # Add HasRoles to a specific model\n```\n\n#### `/lc:generate-scraper`\nCreate a [Larascraper](https://github.com/edulazaro/larascraper) scraper class for a target website. Generates the class with `make:scraper`, 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.\n\n```\n/lc:generate-scraper BikeScraper https://shop.com/bikes   # Scraper for a URL\n/lc:generate-scraper PriceScraper                         # Prompts for the URL\n```\n\n**What it does:**\n- Verifies Larascraper (and the Node/Puppeteer side) is installed\n- Reads the installed `Scraper` API so it matches your version\n- Generates `app/Scrapers/{Name}.php` and fills `handle()` from the real markup\n- Adds the right action chain for cookie walls, search forms, pagination or infinite scroll\n- Runs it once to confirm the fields come back populated\n\n---\n\n### Testing\n\n#### `/lc:generate-test`\nGenerate feature/unit tests for a model, controller, action, or component by analyzing its code.\n\n```\n/lc:generate-test Property                # Generate tests for model\n/lc:generate-test PropertyController      # Generate tests for controller\n/lc:generate-test path/to/file.php        # Generate tests for any file\n```\n\n#### `/lc:test-coverage`\nAnalyze which models, controllers, and actions have tests and which don't.\n\n```\n/lc:test-coverage                         # Full coverage report\n/lc:test-coverage app/Models/             # Check specific directory\n```\n\n---\n\n### Code Quality\n\n#### `/lc:dead-code`\nFind unused classes, methods, routes, views, and imports.\n\n```\n/lc:dead-code                             # Scan entire project\n/lc:dead-code clean                       # Remove dead code with confirmation\n/lc:dead-code clean --dry-run             # Preview removals\n/lc:dead-code app/Services/               # Scan specific directory\n```\n\n---\n\n### Debug\n\n#### `/lc:analyze-error`\nPaste a Laravel stacktrace and get root cause analysis with a specific fix.\n\n```\n/lc:analyze-error\n```\n\nThen paste your error. The skill will:\n- Parse the stacktrace\n- Read the relevant source files\n- Identify the root cause (not just the symptom)\n- Provide a specific code fix\n\n---\n\n### Documentation\n\n#### `/lc:api-docs`\nGenerate API documentation from routes, controllers, and form requests.\n\n```\n/lc:api-docs                              # Document all API routes\n/lc:api-docs api/v1                       # Document specific route prefix\n```\n\n#### `/lc:model-diagram`\nGenerate an ER diagram of Eloquent models in Mermaid format.\n\n```\n/lc:model-diagram                         # All models\n/lc:model-diagram Property                # Specific model and its relations\n```\n\n---\n\n### DevOps\n\n#### `/lc:docker-check`\nVerify `docker-compose.yml`, `Dockerfile`, and `.env` are properly synchronized.\n\n```\n/lc:docker-check                          # Analyze configuration\n/lc:docker-check fix                      # Fix .env mismatches\n/lc:docker-check fix --dry-run            # Preview fixes\n```\n\n**Checks:**\n- Database/Redis/Mail host matching service names\n- Port conflicts between services\n- PHP version consistency (Dockerfile vs composer.json)\n- Required PHP extensions installed\n- Volume path validity\n- `.env` vs `.env.example` completeness\n\n#### `/lc:deploy-checklist`\nVerify the project is production-ready with a comprehensive checklist.\n\n```\n/lc:deploy-checklist                      # Run all checks\n```\n\n---\n\n## Compatibility\n\n### Claude Code (recommended)\n\nWorks everywhere Claude Code runs:\n\n- **Terminal**: Claude Code CLI\n- **VS Code**: via the [Claude Code extension](https://marketplace.visualstudio.com/items?itemName=anthropics.claude-code)\n- **JetBrains** (PHPStorm, WebStorm, etc.): via the [Claude Code extension](https://plugins.jetbrains.com/plugin/27718-claude-code)\n- **Any IDE with integrated terminal**: Cursor, Windsurf, etc.\n\n### Agent Skills compatible tools\n\nLaraClaude skills follow the [Agent Skills](https://agentskills.io) standard. Any tool that supports this standard can use them, including:\n\n- **[Crush](https://github.com/charmbracelet/crush)**: copy the `skills/` directory to `~/.config/crush/skills/`, `.crush/skills/`, or `.claude/skills/` in your project\n- Any future tool that implements the Agent Skills specification\n\n## Requirements\n\n- [Claude Code](https://claude.ai/code)\n- A Laravel project (8+, 9+, 10+, 11+, 12+, 13+)\n- Docker (optional, for `migration-fresh-test` and `orphaned-records`)\n\n## Contributing\n\nPull requests welcome. To add a new skill:\n\n1. Create `skills/your-skill/SKILL.md`\n2. Follow the YAML frontmatter format\n3. Add to README\n4. Submit PR\n\n## Sponsors\n\nLaraClaude is supported by the following sponsors. Thank you for keeping it growing:\n\n<p>\n  <a href=\"https://kenodo.com\"><img src=\"art/logo-kenodo.png\" width=\"24\" alt=\"Kenodo\"></a>&nbsp;<a href=\"https://kenodo.com\">Kenodo</a>&nbsp;&nbsp;&nbsp;&nbsp;\n  <a href=\"https://andorradev.com\"><img src=\"art/logo-andorradev.png\" width=\"24\" alt=\"AndorraDev\"></a>&nbsp;<a href=\"https://andorradev.com\">AndorraDev</a>\n</p>\n\n## Branding\n\nOfficial LaraClaude logos. Use the light or dark version depending on your background:\n\n<div>\n  <div style=\"display:inline-block;text-align:center;margin-right:20px\">\n    <strong>Light</strong><br>\n    <img src=\"art/laraclaude-light.svg\" width=\"300\" alt=\"LaraClaude Light\">\n  </div>\n  <div style=\"display:inline-block;text-align:center\">\n    <strong>Dark</strong><br>\n    <img src=\"art/laraclaude-dark.svg\" width=\"300\" alt=\"LaraClaude Dark\">\n  </div>\n</div>\n\n## Bonus\n\nA little something for making it this far down the README:\n\n<p align=\"center\">\n  <a href=\"https://www.youtube.com/watch?v=rcjOnym_JA8\">\n    <img src=\"https://img.youtube.com/vi/rcjOnym_JA8/hqdefault.jpg\" alt=\"Watch the video\" width=\"480\">\n  </a>\n</p>\n\n## Author\n\nCreated by [Edu Lazaro](https://edulazaro.com)\n\n## License\n\nMIT: see [LICENSE](LICENSE)\n",
  "bytes": 15724,
  "sha": "399d2a04142b12b60287cae142a36f1bf90b7064ced0a878d5ff5513dadba849",
  "repo_slug": "edulazaro/laraclaude",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_edulazaro_laraclaude_laraclaude_b5b9cf6f/readme"
}