/laraclaude:lc:test-coverage [analyze | directory]from laraclaude
Scans PHP application classes (Models, Controllers, Actions, etc.) and matches them against test files to identify untested or partially tested code, reporting coverage gaps without running tests.
Ships in laraclaude. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze which application classes have corresponding tests and which are untested. Provides a coverage map without requiring actual test execution.
| Subcommand | Description |
|---|---|
| (no argument) | Analyze the full project for test coverage gaps. Read-only report. |
[directory] | Analyze a specific directory (e.g., app/Models, app/Actions). |
This is an analysis-only skill. It does not modify files. Use lc:generate-test to create missing tests.
Use Glob to find all testable classes:
app/Models/*.phpapp/Http/Controllers/**/*.phpapp/Actions/**/*.phpapp/Services/*.phpapp/Jobs/*.phpapp/Observers/*.phpresources/views/livewire/**/*.blade.php (only those with PHP class blocks)If a [directory] argument is provided, limit scanning to that directory.
Use Glob to find all test files:
tests/Feature/**/*.phptests/Unit/**/*.phpFor each application class, check if a corresponding test exists:
App\Models\Property -> tests/Feature/Models/PropertyTest.php or tests/Unit/Models/PropertyTest.phpGrep to search test files for references to the class (e.g., use App\Models\Property, Property::factory(), Property::create()Classify each class as:
For untested classes, estimate testing priority based on:
Score each untested class:
TEST COVERAGE ANALYSIS
=======================
SUMMARY
--------
Total application classes: 85
With dedicated tests: 23 (27%)
Partially tested: 12 (14%)
Untested: 50 (59%)
BY CATEGORY
------------
Category | Total | Tested | Partial | Untested | Coverage
-----------------|-------|--------|---------|----------|--------
Models | 18 | 5 | 8 | 5 | 72%
Controllers | 22 | 8 | 2 | 12 | 45%
Actions | 15 | 3 | 1 | 11 | 27%
Services | 8 | 2 | 0 | 6 | 25%
Jobs | 12 | 3 | 0 | 9 | 25%
Observers | 5 | 1 | 1 | 3 | 40%
Volt Components | 5 | 1 | 0 | 4 | 20%
HIGH PRIORITY UNTESTED CLASSES
-------------------------------
These classes have the most impact and should be tested first:
1. App\Http\Controllers\PropertyController (8 public methods, DB mutations)
2. App\Actions\Property\ValidateToPublish (complex business logic)
3. App\Services\IdealistaService (external API integration)
4. App\Jobs\SyncPropertyToFotocasa (external service, queued)
5. App\Http\Controllers\OrganizationStripeWebhookController (payment handling)
FULLY TESTED CLASSES
---------------------
App\Models\User -> tests/Unit/Models/UserTest.php (12 tests)
App\Http\Controllers\AuthController -> tests/Feature/AuthTest.php (8 tests)
...
UNTESTED CLASSES (by category)
-------------------------------
Models:
- App\Models\Showcase (5 public methods)
- App\Models\ShowcaseLogger (3 public methods)
...
Controllers:
- App\Http\Controllers\DashboardController (4 methods)
...
End with actionable recommendations:
RECOMMENDATIONS
================
1. Start with high-priority untested classes (listed above)
2. Use lc:generate-test to scaffold test files quickly
3. Focus on controllers with validation rules -- they catch the most bugs
4. Actions with business logic are the most valuable unit tests
5. Consider adding tests before refactoring any existing code
php artisan test --coverage (requires Xdebug or PCOV).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
php-testing, test-coverage, coverage-gap, laravel-testing, untested-code
32 skills in this plugin
/lc:analyze-errorPaste a Laravel stacktrace and get root cause analysis with suggested fix./lc:analyze-modelDeep analysis of a Laravel Eloquent model - relationships, scopes, casts, fillable, observers, keepers, actions./lc:api-docsGenerate API documentation from routes, controllers, and form requests./lc:blade-auditDetect hardcoded text without @text(), duplicate CSS classes, unused Blade components, and accessibility issues./lc:boost-inspectRuntime-verified Laravel inspection using the Laravel Boost MCP server (Tinker, Database Query/Schema, Last Error) instead of static grep. Falls back to Docker/Tinker if Boost is not installed./lc:cache-opportunitiesDetect repeated queries and computations that should be cached.npx claudepluginhub edulazaro/laraclaude --plugin laraclaudeOther plugins' skills for the same job