Live survey304 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Laravel Tdd

skill · affaan-m/ECCMIT licenceAudited 21 Sep 2026 · source 649b2d7452eb

★ 263,919pushed today
✓SAFEGrade B · 89/100 · 21 Sep 2026 · 649b2d7
263,919repo stars · whole affaan-m/ECC

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 649b2d7452eb and found no filesystem, network or shell access and no hard-coded secrets. What it does: Laravel での TDD:PHPUnit と Pest、ファクトリー、データベーステスト、フェイク、カバレッジターゲット

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Laravel Tdd (affaan-m/ECC)”. Retrieved 21 Sep 2026. https://modelsatlas.com/skills/affaan-m/laravel-tdd

Trust audit

Audit 0.4.1 · source read 21 Sep 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 649b2d7452eb · 21 Sep 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • Publisheraffaan-m GitHub userOwner of the repository this skill is read from
  • Source folderaffaan-m/ECC/docs/ja-JP/skills/laravel-tddThe exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdict649b2d7452ebA new audit runs when the source changes
  • Repository statusNot archivedPushed today
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: Laravel での TDD:PHPUnit と Pest、ファクトリー、データベーステスト、フェイク、カバレッジターゲット

---
name: laravel-tdd
description: Laravel での TDD:PHPUnit と Pest、ファクトリー、データベーステスト、フェイク、カバレッジターゲット
origin: ECC
---

# Laravel TDD ワークフロー

PHPUnit と Pest を使用した Laravel アプリケーション用のテスト駆動開発。80%+ カバレッジ(ユニット + フィーチャー)。

## 使用時機

- Laravel の新機能またはエンドポイント
- バグ修正またはリファクタリング
- Eloquent モデル、ポリシー、ジョブ、通知のテスト
- プロジェクトが PHPUnit を標準化していない限り、新しいテストには Pest を優先

## 仕組み

### RED-GREEN-REFACTOR サイクル

1) テスト失敗を書く
2) 最小限の変更を実装して合格させる
3) テストを緑に保ちながらリファクタリング

### テスト層

- **ユニット**:純粋な PHP クラス、値オブジェクト、サービス
- **フィーチャー**:HTTP エンドポイント、認証、バリデーション、ポリシー
- **統合**:データベース + キュー + 外部バウンダリー

スコープに基づいて層を選択:

- **ユニット**テストを純粋なビジネスロジックとサービスに使用。
- **フィーチャー**テストを HTTP、認証、バリデーション、レスポンス形状に使用。
- **統合**テストを DB/キュー/外部サービスを一緒に検証するときに使用。

### データベース戦略

- `RefreshDatabase` ほとんどのフィーチャー/統合テスト用(テスト実行ごとにマイグレーションを 1 回実行し、次に各テストをトランザクション内でラップ;メモリ内データベースは各テストごとに再マイグレーションする可能性がある)
- `DatabaseTransactions` スキーマがすでにマイグレーションされており、テストごとのロールバックのみが必要なとき
- `DatabaseMigrations` すべてのテストで完全な migrate/fresh が必要なとき、またはコストを負担できるとき

`RefreshDatabase` をデータベースに触れるテストのデフォルトとして使用:トランザクション サポート付きデータベースの場合、マイグレーション ステップ フラグを使用して テスト実行ごとに 1 回実行し、次に各テストをトランザクション内でラップします;`:memory:` SQLite または非トランザクションの接続では、各テストの前にマイグレーションします。スキーマがすでにマイグレーションされており、テストごとのロールバックのみが必要なときは `DatabaseTransactions` を使用します。

### テストフレームワーク選択

- **新しいテストの場合は Pest をデフォルト**で使用。
- **PHPUnit** はプロジェクトがすでにそれを標準化している、またはPHPUnit 固有のツールが必要なときのみ使用。

## 例

### PHPUnit 例

```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']);
    }
}
```

### フィーチャーテスト例(HTTP レイヤー)

```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 例

```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']);
});
```

### フィーチャーテスト Pest 例(HTTP レイヤー)

```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']);
});
```

### ファクトリーと状態

- テストデータにはファクトリーを使用
- エッジケース(アーカイブ済み、管理者、トライアル)の状態を定義

```php
$user = User::factory()->state(['role' => 'admin'])->create();
```

### データベーステスト

- クリーンな状態には `RefreshDatabase` を使用
- テストを隔離して決定論的に保つ
- 手動クエリより `assertDatabaseHas` を優先

### 永続性テスト例

```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);
    }
}
```

### 副作用のためのフェイク

- `Bus::fake()` ジョブ用
- `Queue::fake()` キュー作業用
- `Mail::fake()` と `Notification::fake()` 通知用
- `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);
```

### 認証テスト(Sanctum)

```php
use Laravel\Sanctum\Sanctum;

Sanctum::actingAs($user);

$response = $this->getJson('/api/projects');
$response->assertOk();
```

### HTTP と外部サービス

- `Http::fake()` を使用して外部 API を隔離
- `Http::assertSent()` で送信ペイロードをアサート

### カバレッジターゲット

- ユニット + フィーチャーテストで 80%+ カバレッジを実施
- CI では `pcov` または `XDEBUG_MODE=coverage` を使用

### テストコマンド

- `php artisan test`
- `vendor/bin/phpunit`
- `vendor/bin/pest`

### テスト設定

- `phpunit.xml` を使用して `DB_CONNECTION=sqlite` と `DB_DATABASE=:memory:` を設定して高速テスト
- テストは dev/prod データに触れないように別の env を保つ

### 認可テスト

```php
use Illuminate\Support\Facades\Gate;

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

### Inertia フィーチャーテスト

Inertia.js 使用時、Inertia テスティングヘルパーでコンポーネント名とプロップをアサート。

```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

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 649b2d7

Download folder ↗
git clone https://github.com/affaan-m/ECC
git -C ECC checkout 649b2d7452eb

The author documents no install command, so this uses the repository directly. Our verdict covers commit 649b2d7452eb only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 649b2d7452eb

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/affaan-m/laravel-tdd/badge.svg)](https://modelsatlas.com/skills/affaan-m/laravel-tdd/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

eval-harness✓SAFE

affaan-m/everything-claude-code

Eval-driven development (EDD) framework for AI coding sessions — define capability and regression evals before coding, grade with code-based, model-based, rule, or human graders, and track pass@k and pass^k reliability.…

★ 303kGrade B
ecc-recipes✓SAFE

affaan-m/everything-claude-code

Map a described workflow to the right ECC command group with run-order and stop condition, or browse all command-group recipe families read live from the commands directory. Advisory only — never executes. Use when…

★ 302kGrade B
dynamic-workflow-mode✓SAFE

affaan-m/everything-claude-code

Design task-local harnesses, eval gates, and reusable skill extraction for Claude dynamic workflow mode and other adaptive agent harnesses. Use when building a task-local harness, adding eval gates, or extracting a…

★ 302kGrade B
django-verification!CAUTION

affaan-m/everything-claude-code

Run the full Django verification loop — environment check, mypy/ruff/black linting, migration safety, pytest with coverage targets, pip-audit and bandit security scans, settings and logging review, and diff review —…

★ 294kGrade B
django-patterns✓SAFE

affaan-m/everything-claude-code

Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps. Use when building or reviewing Django apps, DRF APIs, ORM queries, or caching.

★ 294kGrade B
django-security✓SAFE

affaan-m/everything-claude-code

Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations. Use when reviewing Django authentication, authorization,…

★ 294kGrade B

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/affaan-m/laravel-tdd/badge.svg)](https://modelsatlas.com/skills/affaan-m/laravel-tdd/)

Questions about Laravel Tdd

What does the Laravel Tdd skill do?
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Is Laravel Tdd safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Laravel Tdd access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (649b2d7452eb), read on 2026-09-21. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.