check-index-usage

Installation
SKILL.md

Database Index Usage Audit

Analyze PHP code for missing or suboptimal database index usage.

Detection Patterns

1. WHERE Clause Without Index

// CRITICAL: Filtering on unindexed column
$qb->select('o')
    ->from(Order::class, 'o')
    ->where('o.status = :status')          // Is 'status' indexed?
    ->andWhere('o.createdAt > :date')      // Is 'createdAt' indexed?
    ->setParameter('status', 'pending')
    ->setParameter('date', $date);

// Detection: Extract columns from WHERE, check entity for indexes
Related skills
Installs
4
GitHub Stars
71
First Seen
Mar 17, 2026