find-resource-leaks

Installation
SKILL.md

Resource Leak Detection

Analyze PHP code for resource leak issues.

Detection Patterns

1. Unclosed File Handles

// BUG: File handle not closed
$file = fopen('data.txt', 'r');
$content = fread($file, filesize('data.txt'));
// Missing: fclose($file);

// BUG: Early return without close
$file = fopen($path, 'w');
if (!$valid) {
    return false; // File handle leaked
}
Related skills
Installs
4
GitHub Stars
71
First Seen
Mar 17, 2026