api-testing

api-testing is a skill for Claude Code, Codex from idavidov13/agentic-playwright. It costs 69 tokens per session (1,001 once invoked), scanned A, original, MIT.

A set of rules for writing API tests with Playwright, a browser-testing tool that can also send HTTP requests. It covers response checks with Zod, request validation, reusable test fixtures, and handling path parameters.

In plain words
What is it for?
Use it when creating or updating Playwright API tests. It helps test response shapes, missing or wrongly typed fields, invalid URL parameters, shared setup, and API failures that need tracking.
Why use it?
It prevents tests from hiding invalid responses, hardcoded environment details, incomplete request validation, or undocumented API behavior. It also makes multi-request tests easier to follow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when creating or updating Playwright API tests. It helps test response shapes, missing or wrongly typed fields, invalid URL parameters, shared setup, and API failures that need tracking.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/idavidov13/agentic-playwright/api-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add idavidov13/agentic-playwright --skill api-testing
Clone the repo
git clone --depth 1 https://github.com/idavidov13/agentic-playwright

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/api-testing/github.svg)](https://agentmods.dev/skills/idavidov13/agentic-playwright/api-testing)
Your own site
<a href="https://agentmods.dev/skills/idavidov13/agentic-playwright/api-testing"><img src="https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/api-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/idavidov13/agentic-playwright/api-testing"><img src="https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/api-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,001 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 13
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Tool Misuse · line 223
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01001
Opus 5.5 $0.00028 $0.00400
Sonnet 5.5 $0.00014 $0.00200
Haiku 4.5 $0.00007 $0.00100

Measured 14d ago against content hash da0d2d1fa84f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/api-testing/SKILL.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Testing

Critical

  • Never hardcode API URLs, access tokens, emails, passwords or endpoint paths: only process.env.API_URL, process.env.ACCESS_TOKEN, process.env.APP_EMAIL, APP_PASSWORD and ApiEndpoints from enums/{area}/*.

  • Schemas and tests come from the documented contract (OpenAPI/Swagger), never from a request made first; none found: ask before live capture.

  • Assert every response body with expect(SchemaName.parse(body)).toBeTruthy();, not a generic or a bare parse; in fixture code, with no test, const x = SchemaName.parse(body);. Never as-cast.

    // CORRECT
    expect(UserResponseSchema.parse(body)).toBeTruthy();
    // WRONG
    const user = body as UserResponse;
    
  • A test with more than one API call wraps each call in its own test.step(), assertions inside.

  • Never change an expected status, loosen a schema or drop a test: keep it as the contract says, in test.skip with // FIXME: <ticket-url>. 422 where the spec says 400 is a mismatch; only a human confirming a stale spec changes it. Example: references/negative-testing.md → "Contract mismatch".

  • Every request-body endpoint gets an empty-body test, a per-field omission loop and a per-field invalid-type for...of loop over the INVALID_* arrays; never empty-body-only.

  • Always fuzz path parameters with the invalid-format loop, documented or not.

  • Only a human-set // SCOPE line cuts a row or loop.

  • Call apiRequest directly in tests and hooks; promote to a helper fixture in fixtures/helper/helper-fixture.ts only when 3+ test files copy-paste the same setup/teardown.

Procedure

  1. Locate the contract: a spec file in the repo, the API host's documentation route, or a document from the human. Nothing found: ask. Partial or absent: references/contract-sourcing.md.
  2. Write the response schema in fixtures/api/schemas/{area}/ per type-safety (ls fixtures/api/schemas/ resolves {area}); error bodies use fixtures/api/schemas/util/errorResponseSchema.ts.
  3. Add a new path to ApiEndpoints per enums.
  4. Write the happy path: apiRequest<SchemaType>({ method, url: ApiEndpoints.X, baseUrl: process.env.API_URL, headers: process.env.ACCESS_TOKEN, body }) in a test.describe per method + path, tag @api, payload from a factory per data-strategy.
  5. List every status code the contract documents plus the baseline rows in references/coverage-matrix.md; present the plan before writing those tests. Only a scenario list from the human, or a priority list with a cut-off, narrows it: each row they cut is recorded as a // SCOPE line (same reference, Scope), not dropped. No list, a priority list with no cut-off, or a vague hint such as "keep it short": every row.
  6. Add the negative loops from references/negative-testing.md; a test with several calls follows references/multi-call-steps.md.
  7. Setup or teardown past the threshold goes to references/helper-fixtures.md; below it, beforeAll/afterAll in the spec with apiRequest.
  8. Run npx playwright test <file> and npm run lint. A response that disagrees with the contract: test.skip + // FIXME; red for another reason: debugging. Report every // SCOPE row and who cut it.

Read the full file on GitHub · 47 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago Changed · -7 lines da0d2d1fa84f
  2. 16d ago Changed 28c08e7b067e
  3. 27d ago Changed · -319 lines · -63 tokens per session 6fba4e58427b
  4. 3mo ago First seen · 373 lines · 132 tokens per session scan A 8682a35635d2

Subscribe to this mod's changes

api-testing is a skill published in the GitHub repository idavidov13/agentic-playwright (313 stars, last pushed 13d ago), licensed MIT. It adds 69 tokens to every session and 1,001 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

api-testing compared with skills from other repositories

api-testing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-testingidavidov13/agentic-playwrightSkill31313d agoMITA69Claude Code, Codex
vindicateOpenEvident/vindicateSkill452mo agoApache-2.0A77Claude Code, Codex
E2E Testing PatternsPramodDutta/qaskillsSkill25328d agoMITA35Claude Code, Codex
Laravel Dusk TestingPramodDutta/qaskillsSkill25328d agoMITA44Claude Code, Codex
JMeter Load TestingPramodDutta/qaskillsSkill25328d agoMITA32Claude Code, Codex
k6-load-testingtmolavi/mcp-agent-skills-hubSkill114d agoMITB35Claude Code, Codex
aif-testainative-build/skillsSkill101mo agoMITA28Claude Code