# Laravel Quality

> Laravel品質チェック。Pest/Larastan/Pint実行時に使用。「Laravelの品質チェック」「Laravel テスト」で起動。

- **Type:** Skill
- **Install:** `agentstack add skill-morodomi-tdd-skills-laravel-quality`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [morodomi](https://agentstack.voostack.com/s/morodomi)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [morodomi](https://github.com/morodomi)
- **Source:** https://github.com/morodomi/tdd-skills/tree/main/plugins/tdd-laravel/skills/laravel-quality

## Install

```sh
agentstack add skill-morodomi-tdd-skills-laravel-quality
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Laravel Quality Check

Laravel プロジェクト固有の品質チェックツール。

汎用PHPツールは tdd-php 参照。

## Commands

| ツール | コマンド | 用途 |
|--------|---------|------|
| Pest | `php artisan test` | テスト実行 |
| PHPStan | `./vendor/bin/phpstan analyse` | 静的解析（Larastan） |
| Pint | `./vendor/bin/pint` | コードフォーマット |

## Pest Laravel Helpers

| ヘルパー | 用途 |
|---------|------|
| `actingAs($user)` | 認証ユーザーとして実行 |
| `assertDatabaseHas()` | DB レコード存在確認 |
| `assertDatabaseMissing()` | DB レコード不在確認 |
| `assertRedirect()` | リダイレクト確認 |
| `assertStatus()` | HTTPステータス確認 |

## Test Categories

### Feature vs Unit

| カテゴリ | 対象 | 例 |
|---------|------|-----|
| Feature | HTTPリクエスト、統合 | Controller, API |
| Unit | 単一クラス | Model, Service |

### テスト配置

```
tests/
├── Feature/        # HTTP, 統合テスト
│   ├── Auth/
│   └── Api/
└── Unit/           # 単体テスト
    ├── Models/
    └── Services/
```

## HTTP Tests

```php
it('can list users', function () {
    $user = User::factory()->create();

    $this->actingAs($user)
        ->get('/api/users')
        ->assertStatus(200)
        ->assertJsonStructure(['data' => [['id', 'name']]]);
});
```

## Database Tests

```php
it('can create user', function () {
    $this->post('/api/users', [
        'name' => 'Test',
        'email' => 'test@example.com',
    ])->assertStatus(201);

    $this->assertDatabaseHas('users', [
        'email' => 'test@example.com',
    ]);
});
```

## Quality Standards

| 項目 | 目標 |
|------|------|
| PHPStan Level | 8（Larastan） |
| カバレッジ | 90%+ |
| Pint | エラー0 |

## Reference

- 詳細: [reference.md](reference.md)
- 汎用PHP: tdd-php プラグイン

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [morodomi](https://github.com/morodomi)
- **Source:** [morodomi/tdd-skills](https://github.com/morodomi/tdd-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-morodomi-tdd-skills-laravel-quality
- Seller: https://agentstack.voostack.com/s/morodomi
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
