Skip to content
cccskills
FreePublished on GitHub

Test Scaffold (Laravel/PHPUnit)

Generate PHP/Laravel (PHPUnit) test skeletons from specifications.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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 する

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

<What this skill does>

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

画像・ボタン・フォーム要素に適切なアクセシブルネームがあるか確認する。

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

Ensure ADRs capture context, decision, alternatives, tradeoffs, and follow-ups in a way that prevents future drift.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

敵対的分析手法を統合したレビューの entry skill。認知バイアス対策の3手法 (Pre-mortem / War Game / Logic Torturing)と、宣言・主張と実態の乖離を突く claim-vs-actual 検出3パターン(Self-Contradiction / Refactor-Claim Audit / Cross-File Leakage)へルーティングし、通常のレビューでは見えない設計の盲点・ 防御の穴・論理の弱点・宣言と実装のズレを可視化する。

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

Review changes to the Agent Skills import/export bridge for path safety, round-trip fidelity, and validation correctness.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

Checks whether AI-assisted work defines review criteria, accessible context, explicit review loop, human judgment boundary, and feedback capture before delegating to an agent.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 22, 2026

See all skills by s977043

Report a problem with this skill