Skip to content
Agentmart
Submit a tool

BiDiWave Network Interception

Network interception with bidiwave.

Skill by MathiasPaulenko

IndexedMIT★ 2
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/mathiaspaulenko-bidiwave-network-interception

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

Network interception with bidiwave. Block requests, modify requests, mock responses, auth handling, cache control, response body retrieval.

Use cases: security

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
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/bidiwave-network-interception

What's inside

Skill name
BiDiWave Network Interception
Description
Network interception with bidiwave. Block requests, modify requests, mock responses, auth handling, cache control, response body retrieval.
License
MIT
Instructions
651 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed
  • name: "BiDiWave Network Interception" does not match folder "bidiwave-network-interception"
  • body: 651 lines (spec recommends under 500)

Files (6)

  • SKILL.md
  • block-ads.py · assets/templates/
  • mock-api.py · assets/templates/
  • modify-headers.py · assets/templates/
  • bidi-network-module.md · references/
  • intercept-patterns.md · references/

SKILL.md (first lines)

# BiDiWave Network Interception

## Description

Network interception with bidiwave — block requests by pattern, modify request headers and bodies, mock responses with custom status codes, handle authentication, control cache behavior, and retrieve response bodies using the BiDi network module.

## When to Invoke

- Blocking requests by URL pattern (ads, trackers, third-party scripts)
- Modifying request headers or bodies before they reach the server
- Mocking API responses for testing
- Handling authentication headers automatically
- Controlling cache behavior for performance testing
- Retrieving response bodies for inspection
- Tracking all network requests and responses with data collectors

## Prerequisites

- `pip install bidiwave`
- Chrome or Edge with BiDi support (Chrome 112+)
- Basic familiarity with bidiwave (see `bidiwave-cross-browser` skill)
- Python 3.11+ with `asyncio`

## Network Interception

### network.add_intercept()

The BiDi network module provides `network.add_intercept()` to intercept requests at specific phases:

```python
import asyncio
from bidiwave import BiDiSession

async def basic_intercept():
    session = await BiDiSession.connect("ws://localhost:9222")

    # Add an intercept for all requests before they are sent
    intercept = await session.network.add_intercept(
        phases=["beforeRequestSent"],
        url_patterns=["*"]
    )

    # Remove the intercept when done
    await session.network.remove_intercept(intercept_id=intercept["interceptId"])

    await session.close()
```

### Interception phases

| Phase | Description | When it fires |
|-------|-------------|---------------|
| `beforeRequestSent` | Before request is sent to server | Request headers and body can be modified |
| `responseStarted` | When response headers arrive | Response headers can be modified, body can be mocked |
| `authRequired` | When authentication is required | Auth credentials can be provided |

### URL patterns

BiDi supports glob-style URL patterns:

| Pattern | Matches |
|---------|---------|
| `*` | All URLs |
| `*/api/*` | Any URL containing `/api/` |
| `https://example.com/*` | Any URL on example.com |
| `*/analytics.js` | Any URL ending in `/analytics.js` |
| `https://*.example.com/*` | Any subdomain of example.com |

## Blocking Requests

### Block by URL pattern

```python
async def block_requests(session):
    intercept = await session.network.add_intercept(
        phases=["beforeRequestSent"],
        url_patterns=[
            "*/google-analytics.com/*",
            "*/googletagmanager.com/*",
            "*/doubleclick.net/*",
            "*/facebook.net/*"
        ]
    )

    # Subscribe to network events to see blocked requests
    async for event in session.network.stream_blocked_requests():
        print(f"Blocked: {event['request']['url']}")

    await session.network.remove_intercept(intercept_id=intercept["interceptId"])
```

### Block all third-party requests

```python
async def block_third_party(session, first_party_domain: str):
    intercept = await session.network.add_intercept(
        phases=["beforeRequestSent"],
        url_patterns=["*"]
    )

    async for event in session.network.stream_intercepted_requests():
        url = event["request"]["url"]
        if first_party_domain not in url:
            # Block the request
            await session.network.continue_response(
                request_id=event["requestId"],
                status_code=403
            )
        else:
            # Allow the request to proceed
            await session.network.continue_request(
                request_id=event["requestId"]
            )

    await session.network.remove_intercept(intercept_id=intercept["interceptId"])
```

### Block by resource type

From MathiasPaulenko/ai-toolkit, MIT.

More from MathiasPaulenko/ai-toolkit

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Jul 30, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from MathiasPaulenko

Cite this page

BiDiWave Network Interception skill. Agent Mart. https://agentmart.dev/skills/mathiaspaulenko-bidiwave-network-interception (last updated 2026-10-24)