agentsclimarketplace

Test

Skill AI-Driven-School/aiki/.claude/skills/test

Generate E2E and unit test code from requirements using Playwright, delegated to Codex. Use when writing tests, checking acceptance criteria coverage, or running /test.From its SKILL.md

Install
npx -y skills add AI-Driven-School/aiki --skill test

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.1 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

/test スキル

実装コードと要件定義からテストコードを自動生成します。

使用方法

/test
/test auth
/test --e2e
/test --unit

実行フロー

[1] 要件定義の読み込み
    └─ docs/requirements/*.md(受入条件)

[2] 実装コードの確認
    └─ src/**/*

[3] Codexに委譲
    └─ codex exec "..." --full-auto

[4] テストファイル生成
    └─ tests/**/*.spec.ts

Codex委譲コマンド

codex exec "
以下の受入条件を全てカバーするE2Eテストを生成してください。

【受入条件】
$(cat docs/requirements/{feature}.md | grep -A 100 '## 受入条件')

【テスト要件】
- Playwright使用
- 各受入条件に対応するテストケース
- Happy path + Edge case
- 適切なセレクタ(data-testid推奨)
- 日本語でテスト名を記述

【テンプレート】
import { test, expect } from '@playwright/test';

test.describe('{機能名}', () => {
  test('{受入条件1}', async ({ page }) => {
    // Arrange
    // Act
    // Assert
  });
});
" --full-auto

生成されるテスト構成

tests/
├── {feature}.spec.ts       # E2Eテスト
├── {feature}.unit.spec.ts  # ユニットテスト(オプション)
└── fixtures/
    └── {feature}.json      # テストデータ

テストテンプレート

import { test, expect } from '@playwright/test';

test.describe('ユーザー認証', () => {
  test.beforeEach(async ({ page }) => {
    await page.goto('/login');
  });

  test('メールとパスワードでログインできる', async ({ page }) => {
    // Arrange
    await page.fill('[data-testid="email-input"]', '[email protected]');
    await page.fill('[data-testid="password-input"]', 'password123');

    // Act
    await page.click('[data-testid="login-button"]');

    // Assert
    await expect(page).toHaveURL('/dashboard');
    await expect(page.locator('[data-testid="welcome-message"]')).toBeVisible();
  });

  test('無効なパスワードでエラーが表示される', async ({ page }) => {
    // Arrange
    await page.fill('[data-testid="email-input"]', '[email protected]');
    await page.fill('[data-testid="password-input"]', 'wrong');

    // Act
    await page.click('[data-testid="login-button"]');

    // Assert
    await expect(page.locator('[data-testid="error-message"]')).toHaveText(
      'メールアドレスまたはパスワードが正しくありません'
    );
  });
});

出力例

> /test auth

🧪 テストを生成します... (Codex)

要件定義を読み込み中...
  ✓ docs/requirements/auth.md(受入条件: 5件)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Codex (full-auto) でテスト生成中...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[Codex] tests/auth.spec.ts を作成中...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ テスト生成完了!

生成ファイル:
  → tests/auth.spec.ts

テストケース: 6件
  ✓ メールとパスワードでログインできる
  ✓ 認証成功時、ダッシュボードにリダイレクトされる
  ✓ 認証失敗時、エラーメッセージが表示される
  ✓ 空のフィールドでバリデーションエラー
  ✓ ログアウトでセッション終了
  ✓ セッション切れでログイン画面にリダイレクト
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

テスト実行: npx playwright test tests/auth.spec.ts

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.