Skip to content
Back to skills

Generate E2e

ASecurity

security-scan結果からPlaywright E2Eテストを自動生成。

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 11, 2026
testingphpbashsecurity

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add morodomi/redteam-skills --skill generate-e2e --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generate E2e?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Generate E2e
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/morodomi-generate-e2e/badge)](https://www.skillsdirectory.com/skills/morodomi-generate-e2e)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: generate-e2e
description: security-scan結果からPlaywright E2Eテストを自動生成。
---

# Generate E2E

security-scan結果からPlaywright E2Eテストコードを自動生成するスキル。

## Usage

```bash
/generate-e2e                    # 直前のscan結果からテスト生成
/generate-e2e ./scan-result.json # 指定JSONから生成
/generate-e2e --force            # 既存ファイル上書き
```

## Options

| Option | Description | Required |
|--------|-------------|----------|
| [path] | security-scan JSON file | No (uses last scan) |
| --force | 既存ファイルを上書き | No |

## Input Format

security-scan が出力するJSON形式を入力として受け取る。

```json
{
  "metadata": {
    "scan_id": "<uuid>",
    "scanned_at": "<timestamp>",
    "target_directory": "<path>"
  },
  "summary": {
    "total": 3,
    "critical": 1,
    "high": 1,
    "medium": 1,
    "low": 0
  },
  "vulnerabilities": [
    {
      "id": "XSS-001",
      "vulnerability_class": "xss",
      "severity": "high",
      "file": "app/Controllers/UserController.php",
      "line": 45,
      "endpoint": "/users/{id}"
    }
  ]
}
```

## Output

生成されるファイルは `tests/security/` ディレクトリに出力される。

```
<target-project>/
└── tests/
    └── security/
        ├── playwright.config.ts  # Playwright設定
        └── <vuln-type>.spec.ts   # 脆弱性別テストファイル
```

## Behavior

### Empty Vulnerabilities (0件)

脆弱性が0件の場合、`playwright.config.ts` のみ生成される。テストファイルは生成されない。

### File Overwrite

- **デフォルト**: 既存ファイルがある場合は警告して中断
- **--force**: 既存ファイルを強制的に上書き

## Workflow

```
1. security-scan JSON読み込み
2. 脆弱性タイプ別にグループ化
3. テンプレートから設定ファイル生成
4. 各脆弱性タイプのテストファイル生成
5. tests/security/ に出力
```

## Reference

詳細は [reference.md](reference.md) を参照。

Files in this skill

  • SKILL.md2.1 KB
  • reference.md7.2 KB
  • templates/auth.spec.ts.tmpl4.9 KB
  • templates/base-test.ts.tmpl622 B
  • templates/csrf.spec.ts.tmpl5.5 KB
  • templates/playwright.config.ts.tmpl661 B
  • templates/sqli.spec.ts.tmpl6.6 KB
  • templates/ssrf.spec.ts.tmpl2.8 KB
  • templates/ssti.spec.ts.tmpl5.5 KB
  • templates/xss.spec.ts.tmpl3.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.