leek/laravel-vendor-cleanup
Laravel Vendor Cleanup provides an Artisan command to strip tests, documentation, and other unnecessary files from your vendor directory, reducing deployment size and speeding up uploads while keeping required runtime dependencies intact.
Architecture fit: leek/laravel-vendor-cleanup is a Laravel dev dependency that identifies unused vendor files (configs, views, migrations, etc.) and supports cleanup. v0.13.0 adds a Laravel Boost skill (vendor-cleanup-audit) that brings AI-assisted audit and guided cleanup into the developer workflow. This is complementary to the existing artisan commands and does not affect production runtime.
Integration feasibility: The package integrates via Composer and requires Laravel Boost 2.x for the new skill. Upgrade is straightforward: composer update then php artisan boost:install, selecting the package in the third‑party picker. The skill uses allowed-tools and a Sonnet subagent in Claude Code; other agents receive plain numbered questions. Teams not using Boost or AI agents can continue using the core commands unchanged.
Technical risk: The AI‑driven cleanup introduces risk of unintended deletions, but mitigations include read‑only defaults, git rm with explicit file selection, per‑file verification (reading, diffing, grepping, git history), and a “Not confirmed” category. The case‑insensitive filesystem fix reduces false positives on macOS/Windows. Remaining risks: AI agent may misinterpret verification results, users may bypass permission prompts, and external AI services introduce latency, cost, and data‑privacy considerations.
Key questions: Does the team use Laravel Boost? Is Claude Code (or another AI agent) approved for source‑code interaction? What review process governs AI‑suggested deletions? How will we ensure the skill is selected during boost:install? Are there licensing or data‑residency concerns with sending code to a subagent?
Stack fit: Works with any Laravel project, especially those with accumulated vendor cruft. Fits local development, CI cleanup audits, and AI‑assisted workflows. The Boost skill is optional and can be adopted incrementally.
Migration path: From v0.12.0 or earlier: run composer update leek/laravel-vendor-cleanup, then php artisan boost:install (or boost:update) and keep the package selected so the new skill files replace the old ones. New adopters: require the package via Composer and follow the updated README.
Compatibility: The skill installs byte‑for‑byte on Boost 2.x (including versions before 2.8 after the garbled‑display fix). Folder matching is now case‑sensitive, resolving false “missing” configs on macOS/Windows. The core package likely supports current Laravel versions; verify against the project’s Laravel constraint.
Sequencing: For existing users: upgrade package first, then re‑run boost:install. For teams new to Boost: install Boost, add the package, then select the skill. Pilot the skill on a scoped run (e.g., /vendor-cleanup-audit config view) before full audits. Integrate into CI as a read‑only report initially.
Maintenance: Active maintenance with recent releases, Dependabot squash‑merge automation, and CI action bumps. As a dev tool, maintenance burden is low; keep Boost and AI tooling updated.
Support: README now documents the Boost skill and the critical step of selecting the package in boost:install. Community support via GitHub. Internal support may require a short guide on skill invocation and interpreting “Not confirmed” findings.
Scaling: Audit runs can be scoped by file type and parallelised. The Sonnet subagent offloads file‑by‑file verification from the main conversation, improving throughput on large codebases. No production scaling concerns.
Failure modes: False positives (fixed for case‑insensitive filesystems), AI hallucination (mitigated by verification steps), accidental deletions (mitigated by git rm and explicit confirmation), skill installation failures (garbled display fixed). The skill may fail if Boost is incompatible or the AI agent lacks required tools.
Ramp‑up: Developers need to learn how to invoke /vendor-cleanup-audit, select the skill in boost:install, and review “Not confirmed” items. A pilot on a non‑critical branch plus a short onboarding session is recommended. The guided AskUserQuestion flow reduces the learning curve for cleanup decisions.
How can I help you explore Laravel packages today?