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.
Install the package as a dev dependency and run the audit in read-only mode first:
composer require --dev leek/laravel-vendor-cleanup
php artisan vendor-cleanup --help
The package finds published vendor files in your app that can be removed or refreshed: unchanged copies, orphaned published files, and stale copies whose vendor source has moved on. Start with a narrow audit such as config and view, then expand once you trust the output.
If you use Laravel Boost, run php artisan boost:install and select leek/laravel-vendor-cleanup in the third-party picker. Boost does not install third-party skills automatically. Then run:
/vendor-cleanup-audit
/vendor-cleanup-audit config view
The Boost skill is read-only by default and verifies findings before reporting them. If you are upgrading from an earlier version, re-run boost:install or boost:update and keep the package selected so the new skill files replace the old ones.
Look first at the README’s Boost section for the picker step, and after installation at references/verification.md, which Boost installs alongside the skill.
config and view, and review each batch before moving on.git rm for selected files. The Boost skill deletes only files you choose, using git rm. Avoid the command’s --delete flag for normal cleanup because it removes everything the command reports as unchanged, not just the files you reviewed.AskUserQuestion; other agents get numbered questions. File-by-file verification is delegated to a Sonnet subagent in Claude Code, keeping the main conversation cheaper.php artisan config:clear and exercise the app so vendor defaults take over cleanly.--delete is the main footgun. It removes every file the audit reports as unchanged. Use the skill’s guided deletion or manually git rm only the files you verified.Config/ as config folders, producing false “missing” config findings like FileLocator.php. Folder names now must match exactly.composer update leek/laravel-vendor-cleanup alone does not replace the installed skill files. Run php artisan boost:install or boost:update and keep the package selected.# comment lines inside code blocks as headings and split the examples. v0.13.0 removes those lines and installs cleanly on Boost 2.x.allowed-tools covers only the exact audit commands and a few read-only tools. Deletions go through your normal permission prompt; do not broadly loosen that configuration.references/verification.md when a finding looks wrong. Per-category verification steps live there, and the skill’s “Not confirmed” label is a signal to inspect both files, diff them, and grep for references before acting.Upgrade path:
composer update leek/laravel-vendor-cleanup
php artisan boost:install
How can I help you explore Laravel packages today?