laravel-tdd

laravel-tdd is a skill for Claude Code, Codex from gongyijie85/dsh-ecc. It costs 47 tokens per session (4,278 once invoked), scanned A, a copy of laravel-tdd, MIT.

Testing guidance for Laravel, a PHP framework for web applications, using PHPUnit or Pest. It covers model and HTTP tests, test data factories, authentication tests, mocks, and test-driven development, where tests are written before the code.

In plain words
What is it for?
Use it to test models, relationships, API endpoints, controllers, form requests, authentication, and integrations such as mail, queues, notifications, or external HTTP services.
Why use it?
It gives a repeatable way to check that Laravel features work and continue working after changes, including database behavior, APIs, and logged-in user flows.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to test models, relationships, API endpoints, controllers, form requests, authentication, and integrations such as mail, queues, notifications, or external HTTP services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gongyijie85/dsh-ecc/laravel-tdd
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gongyijie85/dsh-ecc --skill laravel-tdd
Clone the repo
git clone --depth 1 https://github.com/gongyijie85/dsh-ecc

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for laravel-tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-tdd/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-tdd)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-tdd"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-tdd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for laravel-tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-tdd"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,278 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.04278
Opus 5 $0.00023 $0.02139
Sonnet 5 $0.00009 $0.00856
Haiku 4.5 $0.00005 $0.00428

Measured 7d ago against content hash 505fa6c5caad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

laravel-tdd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to laravel-tdd — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/laravel-tdd/SKILL.md · 676 lines

How it starts

The opening of the file, as written. The whole thing — 676 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Laravel Testing with TDD

Test-driven development for Laravel applications using PHPUnit, Pest, Laravel factories, and testing helpers.

When to Activate

  • Writing new Laravel applications or features
  • Implementing API endpoints with Sanctum or Passport authentication
  • Testing Eloquent models, relationships, scopes, and accessors
  • Setting up testing infrastructure for Laravel projects
  • Writing feature tests for HTTP controllers and form requests
  • Mocking external services (queues, mail, notifications, HTTP)

TDD Workflow for Laravel

Red-Green-Refactor Cycle

// Step 1: RED — Write a failing test
public function test_a_product_can_be_created(): void
{
    $product = Product::factory()->create(['name' => 'Test Product']);
    $this->assertDatabaseHas('products', ['name' => 'Test Product']);
}

// Step 2: GREEN — Write the migration, model, and factory
// Step 3: REFACTOR — Improve while keeping tests green

Setup

PHPUnit Configuration

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
         bootstrap="vendor/autoload.php"
         colors="true">
    <testsuites>
        <testsuite name="Unit">
            <directory suffix="Test.php">tests/Unit</directory>
        </testsuite>
        <testsuite name="Feature">
            <directory suffix="Test.php">tests/Feature</directory>
        </testsuite>
    </testsuites>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="BCRYPT_ROUNDS" value="4"/>
        <env name="CACHE_STORE" value="array"/>
        <env name="DB_CONNECTION" value="sqlite"/>
        <env name="DB_DATABASE" value=":memory:"/>
        <env name="MAIL_MAILER" value="array"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <env name="SESSION_DRIVER" value="array"/>
    </php>
</phpunit>

Base TestCase Setup

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
    protected function setUp(): void
    {
        parent::setUp();
        // Call $this->withoutExceptionHandling() only in tests that
        // test non-HTTP exceptions; it suppresses assertStatus() etc.
    }

    // Helper: Authenticate and return user
    protected function actingAsUser(): mixed
    {
        $user = \App\Models\User::factory()->create();
        $this->actingAs($user);
        return $user;
    }

    protected function actingAsAdmin(): mixed
    {
        $admin = \App\Models\User::factory()->admin()->create();
        $this->actingAs($admin);
        return $admin;
    }
}

Read the full file on GitHub · 676 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 676 lines · 47 tokens per session scan A 505fa6c5caad

Subscribe to this mod's changes

laravel-tdd is a skill published in the GitHub repository gongyijie85/dsh-ecc (7 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 4,278 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to laravel-tdd, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

red-green-tdd

Red/green test discipline for implementation work. Use once a doublecheck spec is on record and implementation is about to start — write a test that fails for the missing behavior, run it to see it fail (red), make the change, run again to see it pass (green).

PerryLink/dsh-doublecheck · 62 tokens

tdd-zh

A test-first development guide for building features or fixing bugs. Test-driven development, or TDD, means writing a test that fails, making it pass with the smallest change, and then improving the code.

gongyijie85/mattpocock-skills-dsh-zh · 54 tokens

implement-zh

An implementation workflow for completing work described in a specification or tickets. It encourages test-first development where appropriate, runs checks during the work, and ends with review and a commit.

gongyijie85/mattpocock-skills-dsh-zh · 16 tokens

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code.

zprolab/WhaleKit · 17 tokens

tdd

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

gongyijie85/mattpocock-skills-dsh · 33 tokens

manage-taskboard

Manage work in the native DeepSeek Harness Taskboard with exact task ids and optimistic versions. Use when an Agent must inspect project work, claim an eligible todo, record progress or blockers, verify an implementation, submit it for human review, or release its own claim; also use when a human asks how to accept…

shengsheng90/DSH-taskboard · 88 tokens