Agent skill

Laravel TDD

by affaan-m in affaan-m/ECC

Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.

MITAuto-check passedBackend & APIs

Install Laravel TDD

skills CLI
$ npx skills add affaan-m/ECC --skill laravel-tdd -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC laravel-tdd --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/tr/skills/laravel-tdd .claude/skills/laravel-tdd && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
laravel-tdd
GitHub stars
277k
Used in
3 other repos
Token cost
~1.9k tokens
SKILL.md length
408 words
Files
1
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.

  • Works in 3 steps: Başarısız bir test yazın → Geçmek için minimal değişiklik uygulayın → Testleri yeşil tutarken refactor edin
  • Tasks that involve Backend development
  • SKILL.md covers Ne Zaman Kullanılır, Nasıl Çalışır and Örnekler
  • Calls php

What it does

Laravel TDD is an agent skill from affaan-m/ECC. Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Backend development and Test-driven development. It works with Laravel. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

When your agent uses it

  • Tasks that involve Backend development
  • Tasks that involve Test-driven development

Example prompts

  • “/laravel-tdd”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Başarısız bir test yazın
  2. Geçmek için minimal değişiklik uygulayın
  3. Testleri yeşil tutarken refactor edin

What it can do on your machine

Read from SKILL.md and the folder at commit 2d515e4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • php

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Laravel TDD loads about 1.9k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 408 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit 2d515e4, republished under its MIT licence (© affaan-m). 408 words, ~1,944 tokens.

Download SKILL.mdSave it as .claude/skills/laravel-tdd/SKILL.md (or your agent's skills folder).
name
laravel-tdd
description
Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.
origin
ECC

Laravel TDD İş Akışı

80%+ kapsam (unit + feature) ile Laravel uygulamaları için test-driven development.

Ne Zaman Kullanılır

  • Laravel'de yeni özellikler veya endpoint'ler
  • Bug düzeltmeleri veya refactoring'ler
  • Eloquent model'leri, policy'leri, job'ları ve notification'ları test etme
  • Proje zaten PHPUnit'te standartlaşmamışsa yeni testler için Pest'i tercih edin

Nasıl Çalışır

Red-Green-Refactor Döngüsü
  1. Başarısız bir test yazın
  2. Geçmek için minimal değişiklik uygulayın
  3. Testleri yeşil tutarken refactor edin
Test Katmanları
  • Unit: saf PHP sınıfları, value object'leri, servisler
  • Feature: HTTP endpoint'leri, auth, validation, policy'ler
  • Integration: database + kuyruk + harici sınırlar

Kapsama göre katmanları seçin:

  • Saf iş mantığı ve servisler için Unit testleri kullanın.
  • HTTP, auth, validation ve yanıt şekli için Feature testleri kullanın.
  • DB/kuyruklar/harici servisleri birlikte doğrularken Integration testleri kullanın.
Database Stratejisi
  • Çoğu feature/integration testi için RefreshDatabase (test run'ı başına bir kez migration'ları çalıştırır, ardından desteklendiğinde her testi bir transaction'a sarar; in-memory veritabanları test başına yeniden migrate edebilir)
  • Şema zaten migrate edilmişse ve sadece test başına rollback'e ihtiyacınız varsa DatabaseTransactions
  • Her test için tam bir migrate/fresh'e ihtiyacınız varsa ve maliyetini karşılayabiliyorsanız DatabaseMigrations

Veritabanına dokunan testler için varsayılan olarak RefreshDatabase kullanın: transaction desteği olan veritabanları için, test run'ı başına bir kez (static bir bayrak aracılığıyla) migration'ları çalıştırır ve her testi bir transaction'a sarar; :memory: SQLite veya transaction'sız bağlantılar için her testten önce migrate eder. Şema zaten migrate edilmişse ve sadece test başına rollback'lere ihtiyacınız varsa DatabaseTransactions kullanın.

Test Framework Seçimi
  • Mevcut olduğunda yeni testler için varsayılan olarak Pest kullanın.
  • Proje zaten PHPUnit'te standartlaşmışsa veya PHPUnit'e özgü araçlar gerektiriyorsa sadece PHPUnit kullanın.
Show full SKILL.md (163 more words)Show less

Örnekler

PHPUnit Örneği
php
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

final class ProjectControllerTest extends TestCase
{
    use RefreshDatabase;

    public function test_owner_can_create_project(): void
    {
        $user = User::factory()->create();

        $response = $this->actingAs($user)->postJson('/api/projects', [
            'name' => 'New Project',
        ]);

        $response->assertCreated();
        $this->assertDatabaseHas('projects', ['name' => 'New Project']);
    }
}
Feature Test Örneği (HTTP Katmanı)
php
use App\Models\Project;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

final class ProjectIndexTest extends TestCase
{
    use RefreshDatabase;

    public function test_projects_index_returns_paginated_results(): void
    {
        $user = User::factory()->create();
        Project::factory()->count(3)->for($user)->create();

        $response = $this->actingAs($user)->getJson('/api/projects');

        $response->assertOk();
        $response->assertJsonStructure(['success', 'data', 'error', 'meta']);
    }
}
Pest Örneği
php
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;

use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseHas;

uses(RefreshDatabase::class);

test('owner can create project', function () {
    $user = User::factory()->create();

    $response = actingAs($user)->postJson('/api/projects', [
        'name' => 'New Project',
    ]);

    $response->assertCreated();
    assertDatabaseHas('projects', ['name' => 'New Project']);
});
Feature Test Pest Örneği (HTTP Katmanı)
php
use App\Models\Project;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;

use function Pest\Laravel\actingAs;

uses(RefreshDatabase::class);

test('projects index returns paginated results', function () {
    $user = User::factory()->create();
    Project::factory()->count(3)->for($user)->create();

    $response = actingAs($user)->getJson('/api/projects');

    $response->assertOk();
    $response->assertJsonStructure(['success', 'data', 'error', 'meta']);
});
Factory'ler ve State'ler
  • Test verileri için factory'leri kullanın
  • Uç durumlar için state'leri tanımlayın (archived, admin, trial)
php
$user = User::factory()->state(['role' => 'admin'])->create();
Database Testi
  • Temiz durum için RefreshDatabase kullanın
  • Testleri izole ve deterministik tutun
  • Manuel sorgular yerine assertDatabaseHas tercih edin
Persistence Test Örneği
php
use App\Models\Project;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

final class ProjectRepositoryTest extends TestCase
{
    use RefreshDatabase;

    public function test_project_can_be_retrieved_by_slug(): void
    {
        $project = Project::factory()->create(['slug' => 'alpha']);

        $found = Project::query()->where('slug', 'alpha')->firstOrFail();

        $this->assertSame($project->id, $found->id);
    }
}
Yan Etkiler için Fake'ler
  • Job'lar için Bus::fake()
  • Kuyruğa alınmış işler için Queue::fake()
  • Bildirimler için Mail::fake() ve Notification::fake()
  • Domain event'leri için Event::fake()
php
use Illuminate\Support\Facades\Queue;

Queue::fake();

dispatch(new SendOrderConfirmation($order->id));

Queue::assertPushed(SendOrderConfirmation::class);
php
use Illuminate\Support\Facades\Notification;

Notification::fake();

$user->notify(new InvoiceReady($invoice));

Notification::assertSentTo($user, InvoiceReady::class);
Auth Testi (Sanctum)
php
use Laravel\Sanctum\Sanctum;

Sanctum::actingAs($user);

$response = $this->getJson('/api/projects');
$response->assertOk();
HTTP ve Harici Servisler
  • Harici API'leri izole etmek için Http::fake() kullanın
  • Giden payload'ları Http::assertSent() ile doğrulayın
Kapsam Hedefleri
  • Unit + feature testleri için 80%+ kapsam zorlayın
  • CI'da pcov veya XDEBUG_MODE=coverage kullanın
Test Komutları
  • php artisan test
  • vendor/bin/phpunit
  • vendor/bin/pest
Test Yapılandırması
  • Hızlı testler için phpunit.xml'de DB_CONNECTION=sqlite ve DB_DATABASE=:memory: ayarlayın
  • Dev/prod verilerine dokunmaktan kaçınmak için testler için ayrı env tutun
Yetkilendirme Testleri
php
use Illuminate\Support\Facades\Gate;

$this->assertTrue(Gate::forUser($user)->allows('update', $project));
$this->assertFalse(Gate::forUser($otherUser)->allows('update', $project));
Inertia Feature Testleri

Inertia.js kullanırken, Inertia test yardımcıları ile component ismi ve prop'ları doğrulayın.

php
use App\Models\User;
use Inertia\Testing\AssertableInertia;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

final class DashboardInertiaTest extends TestCase
{
    use RefreshDatabase;

    public function test_dashboard_inertia_props(): void
    {
        $user = User::factory()->create();

        $response = $this->actingAs($user)->get('/dashboard');

        $response->assertOk();
        $response->assertInertia(fn (AssertableInertia $page) => $page
            ->component('Dashboard')
            ->where('user.id', $user->id)
            ->has('projects')
        );
    }
}

Testleri Inertia yanıtlarıyla uyumlu tutmak için ham JSON assertion'ları yerine assertInertia tercih edin.

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/tr/skills/laravel-tdd of affaan-m/ECC.

Open the folder on GitHubat commit 2d515e4

Used in 3 other repositories

We found 8 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in affaan-m/ECC, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Laravel TDD next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Laravel TDD compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Laravel TDD this skillaffaan-m/ECC277k3 repos~1.9kAutomated safety check: PassMIT
Pest Testingliberusoftware/real-estate-laravel1121 repos~1.8kAutomated safety check: PassMIT
Pest TestingMineTrax/minetrax116—~787Automated safety check: PassMIT
Pest Testingluadotsh/lua3431 repos~1.2kAutomated safety check: PassMIT
Pest Testingmnapoli/vibephp158—~1.4kAutomated safety check: PassMIT
Laraveldaily Testing AuditLaravelDaily/AI-Workflows-For-Laravel136—~4.6kAutomated safety check: NotesNone

Similar skills

  • Pest Testing

    liberusoftware/real-estate-laravel

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    112 GitHub starsUsed in 1 repo~1.8k tokens
    Testing & QAAuto-check passed
  • Pest Testing

    MineTrax/minetrax

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    116 GitHub stars~787 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Pest Testing

    luadotsh/lua

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    343 GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Pest Testing

    mnapoli/vibephp

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    158 GitHub stars~1.4k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Laraveldaily Testing Audit

    LaravelDaily/AI-Workflows-For-Laravel

    This skill should be used when the user asks to "audit Laravel tests", "review test coverage", "check testing practices", "find missing tests", "testing review", "improve tests", or wants to analyze…

    136 GitHub stars~4.6k tokensUpdated 5 mo ago
    Backend & APIsAuto-check: notes
  • Rails Concern

    ThibautBaissac/rails_ai_agents

    Creates Rails concerns for shared behavior across models or controllers with TDD.

    665 GitHub stars~1.7k tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    affaan-m/ECC

    Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    277k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Works with

Questions about Laravel TDD

What does Laravel TDD do?

Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets. Laravel TDD is an agent skill from affaan-m/ECC. Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.

When should I use Laravel TDD?

Laravel TDD fits situations like: tasks that involve Backend development; tasks that involve Test-driven development.

How do I install Laravel TDD in Claude Code?

Run `npx skills add affaan-m/ECC --skill laravel-tdd -a claude-code`. Or copy the skill folder (docs/tr/skills/laravel-tdd in affaan-m/ECC) into .claude/skills/laravel-tdd in your project. Claude Code loads it when a task matches its description.

How do I install Laravel TDD in Codex?

Run `npx skills add affaan-m/ECC --skill laravel-tdd -a codex`. Or copy the skill folder (docs/tr/skills/laravel-tdd in affaan-m/ECC) into .agents/skills/laravel-tdd in your project. Codex loads it when a task matches its description.

Can I use Laravel TDD in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill laravel-tdd -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/laravel-tdd, .gemini/skills/laravel-tdd, .github/skills/laravel-tdd and .opencode/skills/laravel-tdd in your project.

What does Laravel TDD need to run?

Going by SKILL.md and its folder, Laravel TDD needs the command-line tools its instructions call (php).

Does Laravel TDD access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Laravel TDD safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Laravel TDD use?

Laravel TDD is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Laravel TDD use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Laravel TDD?

Skills that share tags, products or a category with Laravel TDD: Pest Testing (liberusoftware/real-estate-laravel, 112 stars), Pest Testing (MineTrax/minetrax, 116 stars), Pest Testing (luadotsh/lua, 343 stars) and Pest Testing (mnapoli/vibephp, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Laravel TDD?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,673 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 11, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.