Skip to content
Agentmart
Submit a tool

api-test-generation

Generate Playwright API tests from an OpenAPI spec through the INGEST→PLAN→GENERATE→REVIEW pipeline.

Skill by moaidmoatasem

IndexedApache-2.0★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/moaidmoatasem-api-test-generation

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Generate Playwright API tests from an OpenAPI spec through the INGEST→PLAN→GENERATE→REVIEW pipeline.

Use cases: backend, testing, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/api-test-generation

What's inside

Skill name
api-test-generation
Description
Generate Playwright API tests from an OpenAPI spec through the INGEST→PLAN→GENERATE→REVIEW pipeline.
License
Apache-2.0
Instructions
55 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# API Test Generation Skill

## Purpose
Generate Playwright API tests from an OpenAPI spec using a local LLM. The pipeline is INGEST → PLAN → GENERATE → REVIEW. Each stage is deterministic or LLM-guided per design.

## When to Use
- You have an OpenAPI 3.x spec (JSON or YAML).
- You want typed Playwright API tests with zero lock-in.
- You need to catch spec-vs-server conformance drift (e.g., 422 vs 400).

## Workflow

### 1. INGEST (`cherenkov/stages/ingest.py`)
- Reads the OpenAPI spec file
- Performs depth-1 reference resolution on component schemas
- Generates a mutation menu per endpoint: happy_path, validation errors, edge cases, auth, security (DAST opt-in)
- Output: `EndpointSlice[]` with mutations + expected status codes derived FROM the spec

### 2. PLAN (`cherenkov/stages/plan.py`)
- Deterministic mapping (NO LLM involved)
- Prioritizes scenarios: P1 = happy_path + auth, P2 = validation + security
- Output: `Scenario[]` ready for generation

### 3. GENERATE (`cherenkov/stages/generate.py`)
- Invokes `qwen2.5-coder:7b` via Ollama (or configured LLM provider)
- Uses recency-anchored prompt: instruction rules placed at the absolute end
- Uses static system prompt from `prompts/generator_system.txt` (prefix-cache optimized)
- Enforces `openapi-fetch` client usage (no fetch/axios)
- Output: TypeScript test code per scenario

### 4. REVIEW (`cherenkov/stages/review.py`)
- Enforces 6 quality gates:
  1. **Syntax** — TS well-formed, no markdown fences
  2. **Structure** — correct imports (`@playwright/test`, `openapi-fetch` client)
  3. **AST** — only direct `openapi-fetch` client calls (no `fetch`/`axios`)
  4. **Assertions** — `expect()` statements present and meaningful
  5. **tsc --noEmit** — compiles without errors
  6. **Prism dry-run** — runs against Prism mock, checks expected status codes
- Produces a verdict: `auto_approve` (>0.9), `hitl` (0.7-0.9), `regenerate` (<0.7)
- Dry-run failure triggers D2 loop back to PLAN (circuit-break at 2 fails)

## D7 Invariant
The REVIEW stage **never auto-edits test code**. Recommendations are suggest-only. Test files are only written by explicit user action or the initial `generate` command.

## References
- `cherenkov/stages/ingest.py` — spec parsing + slicing
- `cherenkov/stages/plan.py` — deterministic scenario planning
- `cherenkov/stages/generate.py` — LLM test generation
- `cherenkov/stages/review.py` — 6-gate quality review
- `cherenkov/execution/prism_mock.py` — Prism mock server for dry-run
- `cherenkov/ai/ollama_client.py` — Ollama LLM client with retry ladder
- `prompts/generator_system.txt` — tuned system prompt
- `smoke_test_generate_live.py` — opt-in live LLM smoke test

From moaidmoatasem/cherenkov-qa, Apache-2.0.

More from moaidmoatasem/cherenkov-qa

Signals

Stars
1
Forks
0
Open issues
24
Last commit (this folder)
Jul 1, 2026 (4 months ago)
Last release
Aug 2, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from moaidmoatasem

Cite this page

api-test-generation skill. Agent Mart. https://agentmart.dev/skills/moaidmoatasem-api-test-generation (last updated 2026-10-24)