lc:dead-code

Identify and remove unused classes, methods, routes, views, and imports in Laravel applications via static analysis.

12|2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/edulazaro/laraclaude --skill lc-dead-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lc:dead-code
Source: https://github.com/edulazaro/laraclaude/tree/main/skills/dead-code
Command: npx skills add https://github.com/edulazaro/laraclaude --skill lc-dead-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the problem of code rot and technical debt by identifying unused classes, methods, routes, views, and imports that clutter your Laravel application.

Core Features & Use Cases

  • Static Analysis: Scans the entire codebase to detect unused PHP classes, public methods, and Blade views.
  • Route Auditing: Identifies orphaned routes that are no longer referenced by the application.
  • Safe Cleanup: Provides a dry-run mode and interactive confirmation prompts to ensure no critical code is accidentally deleted.

Quick Start

Run the lc:dead-code skill to scan your entire project and generate a report of all unused code elements.

Frequently Asked Questions about lc:dead-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and remove unused code in a Laravel application?

You can identify unused Laravel code by running a static analysis scan across your entire project directory to detect unreferenced classes, methods, routes, views, and imports for safe cleanup.

What types of dead code can static analysis detect in a Laravel project?

Static analysis detects unused PHP classes, public methods, Blade views, routes, and imports within a Laravel application by scanning the entire codebase to locate references and dependencies.

How do I safely clean up orphaned routes and unused classes without breaking my app?

To safely clean up unused classes and orphaned routes, use the provided dry-run mode and interactive confirmation prompts to validate references and dependencies before any critical code is actually deleted.

Do I need specific tools installed to scan for unused Laravel views and methods?

Yes, scanning for unused Laravel views and methods requires standard grep and glob utilities to be available in your environment to perform comprehensive code scanning and dependency validation.

Can this tool audit Blade views and route definitions for technical debt?

Yes, this tool audits Blade views and route definitions to identify unreferenced routes and unused views, directly targeting technical debt and code rot accumulated within your Laravel application.