playwright-network-mocking

playwright-network-mocking is a skill for Claude Code, Codex from hzijad/playwright-agent-skills. It costs 18 tokens per session (496 once invoked), scanned A, original, MIT.

A Playwright testing workflow that replaces selected network responses with fixed data. Playwright is a tool for testing web pages in a browser.

In plain words
What is it for?
Use it to test billing, email, authentication, analytics, or similar flows with predictable responses. Do not use it when the real provider integration itself is being tested.
Why use it?
It keeps tests from depending on slow or unreliable third-party services. The rest of the application can remain real while the selected external service is isolated.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to test billing, email, authentication, analytics, or similar flows with predictable responses. Do not use it when the real provider integration itself is being tested.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hzijad/playwright-agent-skills/playwright-network-mocking
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 hzijad/playwright-agent-skills --skill playwright-network-mocking
Clone the repo
git clone --depth 1 https://github.com/hzijad/playwright-agent-skills

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 playwright-network-mocking

README.md
[![agentmods](https://agentmods.dev/badge/skills/hzijad/playwright-agent-skills/playwright-network-mocking/github.svg)](https://agentmods.dev/skills/hzijad/playwright-agent-skills/playwright-network-mocking)
Your own site
<a href="https://agentmods.dev/skills/hzijad/playwright-agent-skills/playwright-network-mocking"><img src="https://agentmods.dev/badge/skills/hzijad/playwright-agent-skills/playwright-network-mocking/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 playwright-network-mocking

Your own site · 80×15
<a href="https://agentmods.dev/skills/hzijad/playwright-agent-skills/playwright-network-mocking"><img src="https://agentmods.dev/badge/skills/hzijad/playwright-agent-skills/playwright-network-mocking.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 496 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.
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.00018 $0.00496
Opus 5 $0.00009 $0.00248
Sonnet 5 $0.00004 $0.00099
Haiku 4.5 $0.00002 $0.00050

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

Security

Grade A, and why

playwright-network-mocking 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 10d 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.

skills/playwright-network-mocking/SKILL.md · 64 lines

How it starts

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

Playwright Network Mocking

Overview

Use this skill when a test depends on a slow, unreliable, or external service and you need deterministic responses without hitting the real provider. It lets you isolate the boundary that matters while keeping the rest of the application real.

Do not use this skill when the real third-party integration is the feature under test, or when the app is already local and deterministic without request interception.

When to Use

  • When a test depends on an unreliable or slow external API.
  • When you need deterministic responses for billing, email, auth, analytics, or similar services.
  • When you want to mock the minimum necessary surface area and leave the rest of the app untouched.

When Not to Use

  • When the test must validate a real provider integration end to end.
  • When the login UI is the feature under test.
  • When you are diagnosing a flaky test and should start with playwright-debugging instead.

Network Interception

Use page.route() to replace external responses with deterministic data before the page makes the request.

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

test('shows premium dashboard when billing is active', async ({ page }) => {
  await page.route('**/api/v1/billing/status', async route => {
    await route.fulfill({
      status: 200,
      json: {
        subscription: 'active',
        plan: 'premium',
      },
    });
  });

  await page.goto('/dashboard');

  await expect(page.getByRole('heading', { name: 'Welcome to Premium' })).toBeVisible();
});

Intercept only the unstable boundary and leave the rest of the application real. If the code under test makes several external calls, mock the minimum necessary surface area.

Prefer page.route() when the response is part of the behavior under test and must be controlled from the browser context. If you need broader, suite-wide control, consider a fixture or a backend test double instead of scattering route handlers through individual tests.

Read the full file on GitHub · 64 lines

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. 10d ago First seen · 64 lines · 18 tokens per session scan A 944d236e5749

Subscribe to this mod's changes

playwright-network-mocking is a skill published in the GitHub repository hzijad/playwright-agent-skills (9 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 496 once invoked, about $0.0001 per session on Opus 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-31.

Related

Other skills, from other repositories

playwright

Provides comprehensive guidance for Playwright testing including browser automation, test writing, page objects, and cross-browser testing. Use when the user asks about Playwright, needs to write E2E tests, automate browsers, or test web applications across browsers.

Zephyrex21/claude-skills-vetted · 52 tokens

smoke

Run the clawback end-to-end smoke test. Starts a mock upstream, spawns the proxy against it, exercises path-mode and hash-mode requests, walks the admin API, and prints the persisted state. Use when verifying the proxy still works after changes.

zapgun-ai/clawback · 54 tokens

vibe-e2e

Generates and runs full end-to-end UI tests using Playwright against a live URL. Auto-installs Playwright and Chromium if not present — isolated in e2e/ folder, never pollutes app dependencies. Reads SPEC.md and FEATURES.md to automatically generate test flows covering every critical user journey. Runs tests with…

aakashdhar/vibe-skill · 163 tokens

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction using playwright-cli. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, extract information from web pages, mock network requests, manage browser…

zebbern/claude-code-guide · 67 tokens

test-site

Tests a deployed, activated Power Pages site at runtime using browser-based navigation, page crawling, and API request verification via Playwright. Use when the user wants to test, verify, or smoke-test their deployed site.

microsoft/power-platform-skills · 46 tokens

playwright-skill

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, fixtures, POM, network mocking, auth flows, debugging, CI/CD (GitHub Actions, GitLab, CircleCI, Azure, Jenkins), framework recipes (React, Next.js, Vue, Angular), and migration guides from…

zebbern/claude-code-guide · 87 tokens