Laravel Controller Cleanup

🌐Community
by noartem · vlatest · Repository

This skill automatically removes unused code and outdated methods from your Laravel controllers, streamlining your project and improving maintainability.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add laravel-controller-cleanup npx -- -y @trustedskills/laravel-controller-cleanup
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "laravel-controller-cleanup": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/laravel-controller-cleanup"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill automates the process of cleaning up unused code and dependencies within Laravel controller files. It identifies and removes unnecessary imports, methods, and properties, streamlining your codebase for improved maintainability and performance. The tool aims to reduce clutter and improve readability by removing dead or redundant code blocks.

When to use it

  • Refactoring existing projects: To tidy up older Laravel applications with accumulated unused code.
  • Preparing code for deployment: As part of a pre-deployment checklist to ensure clean, optimized code.
  • Improving code readability: To make controller files easier to understand and maintain for development teams.
  • Reducing project size: By removing unnecessary dependencies and code, the overall project footprint can be minimized.

Key capabilities

  • Removes unused imports from controller files.
  • Identifies and removes unused methods within controllers.
  • Cleans up redundant properties in controllers.
  • Automated cleanup process for Laravel projects.

Example prompts

  • "Clean up the unused code in app/Http/Controllers/UserController.php."
  • "Remove any unnecessary imports from all controller files in my project."
  • "Optimize the app/Http/Controllers/ProductController.php file by removing dead code."

Tips & gotchas

This skill requires a Laravel project to be present and accessible for analysis. It's recommended to review the changes made by the tool before committing them, as aggressive cleanup could potentially remove necessary code if misidentified.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
noartem
Installs
12

🌐 Community

Passed automated security scans.