Test Scaffold (Laravel/PHPUnit)

Test Scaffold (Laravel/PHPUnit) is a skill for Claude Code from s977043/river-review. It costs 23 tokens per session (785 once invoked), scanned A, original, MIT.

A generator for Laravel and PHP unit or feature-test skeletons using PHPUnit, the standard PHP testing framework. It creates test methods and TODO steps from specifications.

In plain words
What is it for?
Use it to outline Laravel tests for application behavior, including setup, calls, expected results, and database-related checks where specified. It is for unit and feature-test scaffolding.
Why use it?
It helps turn Laravel requirements into a clear test structure without prescribing the application's implementation or attempting full end-to-end coverage.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the river-review plugin — 139 skills, 18 commands, 5 agents, 3 hooks shipped together

Good fit Use it to outline Laravel tests for application behavior, including setup, calls, expected results, and database-related checks where specified. It is for unit and feature-test scaffolding.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/code-php-laravel
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 s977043/river-review --skill code-php-laravel
Clone the repo
git clone --depth 1 https://github.com/s977043/river-review

Made for: Claude Code.

Or install river-review, the plugin that ships this one along with the rest of its 139 skills, 18 commands, 5 agents, 3 hooks.

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 Test Scaffold (Laravel/PHPUnit)

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/code-php-laravel/github.svg)](https://agentmods.dev/skills/s977043/river-review/code-php-laravel)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/code-php-laravel"><img src="https://agentmods.dev/badge/skills/s977043/river-review/code-php-laravel/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 Test Scaffold (Laravel/PHPUnit)

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/river-review/code-php-laravel"><img src="https://agentmods.dev/badge/skills/s977043/river-review/code-php-laravel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 785 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 original No closer match found 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.00023 $0.00785
Opus 5.5 $0.00009 $0.00314
Sonnet 5.5 $0.00005 $0.00157
Haiku 4.5 $0.00002 $0.00078

Measured 1mo ago against content hash df238a618c23, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Test Scaffold (Laravel/PHPUnit) 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 1mo 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.

skills/upstream/code-php-laravel/SKILL.md · 90 lines

What it actually says

Pattern declaration

Primary pattern: Generator Secondary patterns: Inversion Why: 仕様書からPHPUnit形式のテスト足場を生成するジェネレーターであり、仕様の抜けをテスト観点から逆照射する。

Role

あなたは熟練したLaravel開発者です。 仕様書の内容を満たすための「PHPUnit形式のテストコード(足場)」を作成してください。

Non-goals / 扱わないこと

  • アプリケーションロジックの実装や最適化方針は示さない。
  • E2E や統合テストの網羅は対象外で、PHPUnit の単体/機能テストの足場に限定する。

Pre-execution Gate / 実行前ゲート

このスキルは以下の条件がすべて満たされない限りNO_REVIEWを返す。

  • 差分に仕様書(docs/**/*.md または specs/**/*.md)が含まれている
  • 仕様書にPHP/Laravelアプリケーションに関する記述がある
  • inputContextにfullFileが含まれている

ゲート不成立時の出力: NO_REVIEW: code-php-laravel — 対象となるLaravel仕様が差分に含まれていない

False-positive guards / 抑制条件

  • 仕様に記載のない要件を推測で追加しない。
  • 既に対象外と明示された領域(例: 外部サービス連携の実装詳細)への指摘は行わない。

Output Format

PHP (PHPUnit) のコードブロック。 Tests\TestCase を継承したクラスを作成し、public function test_... で始まるメソッドを定義します。 各テストメソッドの中に、検証すべき内容をコメントで // TODO: ... として記述してください。

Example

<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class UserRegistrationTest extends TestCase
{
    use RefreshDatabase;

    public function test_user_can_register_with_valid_data(): void
    {
        // TODO: Arrange user data
        // TODO: Act call registration route
        // TODO: Assert database has user
        // TODO: Assert response status
    }

    public function test_email_is_required(): void
    {
        // TODO: Arrange data without email
        // TODO: Act & Assert validation error
    }
}

Constraints

  • Pest形式ではなく、クラスベースのPHPUnit標準構文を使用する
  • メソッド名はスネークケース(例: test_user_can_login)を推奨する
  • Laravelの機能(RefreshDatabase トレイトや Factory など)が想定される場合は、適切に use する
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. 1mo ago First seen · 90 lines · 23 tokens per session scan A df238a618c23

Subscribe to this mod's changes

Test Scaffold (Laravel/PHPUnit) is a skill published in the GitHub repository s977043/river-review (7 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 785 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

php-quality

A PHP quality-check workflow using PHPStan, Pint, PHPUnit, Pest, or Laravel's test command. It checks code behavior, types, style, and formatting.

morodomi/dev-crew · 56 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 175 tokens

php-testing

Use when writing/configuring tests on a non-Laravel PHP project — PHPUnit vs Pest. Do NOT use for Laravel test helpers or quality tooling (php-quality-tooling).

fusengine/agents · 38 tokens

laravel-testing

Test strategy for a layered Laravel application — which test style fits each layer, hand-written fakes over mocks, real-database tests for Query Classes and Repositories, pure tests for Value Objects, and feature tests that assert authorization, payload shape and query counts. Use when writing or reviewing Laravel…

Foysal50x/skills · 83 tokens

js-quality

A JavaScript quality-check workflow using ESLint, Prettier, Jest, or Vitest. It checks code for common problems, consistent formatting, and passing automated tests.

morodomi/dev-crew · 48 tokens

python-quality

A Python quality-check workflow using tests, type checking, linting, formatting, and import sorting. Type checking verifies that values are used with the expected kinds, while linting finds common code problems.

morodomi/dev-crew · 47 tokens