lc:unused-columns

Detect unused database columns by cross-referencing Laravel migrations with codebase usage patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the problem of database bloat and technical debt caused by orphaned columns that remain in your schema but are no longer referenced by your application code.

Core Features & Use Cases

  • Static Analysis: Scans migrations and codebase references to identify unused columns without needing a live database connection.
  • Safety First: Provides a dry-run mode to preview drop-column migrations and requires explicit user confirmation before generating any destructive changes.
  • Use Case: Use this when cleaning up a legacy Laravel project to identify columns that were once used for features that have since been removed, ensuring your database schema remains lean and maintainable.

Quick Start

Run the unused-columns skill to analyze all database tables and report any columns that appear to be unreferenced in your codebase.

Frequently Asked Questions about lc:unused-columns

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

FAQPage Schema
How do I find unused database columns in a Laravel project?

Detect unused database columns by cross-referencing migration definitions with codebase usage patterns across Laravel models, controllers, views, and services. This static analysis identifies schema cleanup candidates without requiring a live database connection.

What's the best way to clean up dead columns in Laravel Eloquent migrations?

Clean up dead columns by scanning migrations and codebase references to identify unreferenced schema fields, validating findings against standard column exclusions, and generating safe drop-column migrations using a dry-run preview mode for explicit confirmation.

Can I detect orphaned schema fields without connecting to a live database?

Yes, you can detect orphaned schema fields without a live database connection by performing static analysis that scans migration definitions and matches them against codebase-wide usage patterns in your application layer.

How do I safely generate migrations to remove dead columns in Laravel?

Safely generate migrations to remove dead columns by using a dry-run mode that previews drop-column operations and requires explicit user confirmation before generating any destructive schema cleanup changes.

What are the limitations of static analysis when removing unused database columns?

A limitation of static analysis for removing unused database columns is that it relies on scanning defined application layers, meaning dynamically referenced columns or those accessed exclusively via raw SQL outside scanned files may be incorrectly flagged as unused.