weave-browser

A security guard for browser-based AI agents that checks web navigation and downloads and looks for hidden instructions in page content.

In plain words
What is it for?
Use it with Playwright, Puppeteer, Stagehand, browser-use, or similar tools to enforce WARD.md rules, inspect pages for indirect prompt injection, and gate URLs or downloads.
Why use it?
Web pages can contain untrusted text that tries to redirect an agent's behavior, or downloads that may be unsafe.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tyox-all/weave_protocol/browser
Any agent
npx skills add Tyox-all/Weave_Protocol --skill browser
Clone the repo
git clone --depth 1 https://github.com/Tyox-all/Weave_Protocol

Made for: Claude Code, Codex.

Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,449 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00144 $0.01449
Opus 5 $0.00072 $0.00724
Sonnet 5 $0.00029 $0.00290
Haiku 4.5 $0.00014 $0.00145

Measured yesterday against content hash 5ea05567b642, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

weave-browser 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 yesterday.

The scan reads SKILL.md. This mod also ships 7 executable files (src/cli.ts, src/guard.ts, src/index.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

browser/SKILL.md · 104 lines

How it starts

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

Browser-agent security (Weave Protocol)

The @weave_protocol/browser package enforces WARD.md policies inside browser-based AI agents and detects indirect prompt injection (IPI) in page content. It's the fifth WARD enforcement surface (after MCP, Claude Code, Antigravity, and MSAF).

When to use

  • User is building a browser agent with Playwright, Puppeteer, Stagehand, browser-use, or similar
  • User's agent fetches and reasons about web content (scraping, research, automation)
  • User wants to detect indirect prompt injection (IPI) in pages before ingestion
  • User wants navigation gating (which URLs the agent may visit)
  • User wants download gating (block executables, scripts, etc.)
  • User wants to elevate scrutiny on agent actions taken after ingesting untrusted content

Primary API

import { WardBrowserGuard } from '@weave_protocol/browser';

const guard = new WardBrowserGuard({
  // wardPath: './WARD.md'        // explicit; otherwise auto-resolves
  // ipiSensitivity: 'strict' | 'standard' | 'lenient'   // default: 'standard'
  // failMode: 'open' | 'closed'  // default: 'open'
});

// Four enforcement methods:
await guard.checkNavigation(url, sessionId);         // gate URL fetch
await guard.scanForInjection(html, { url, sessionId, isHtml: true });
await guard.checkDownload({ url, filename, mimeType });
await guard.checkAction(capability, sessionId);      // gate tool calls post-ingestion

// One-line Playwright integration:
guard.wrapPlaywrightPage(page, sessionId);

What it detects

33 IPI patterns across these categories:

  • Trigger phrases (9): "ignore previous", role hijack, chat-template tokens
  • Action directives (4, critical): send email/payment/exec to X
  • Payment specifications (1, critical): recipient + amount in proximity (Atlan autonomous-fraud pattern)
  • Hidden CSS content (6): display:none, visibility:hidden, white-on-white (Brave/Comet pattern), off-screen
  • HTML injection (5): comments, noscript, aria-hidden, meta tags, alt text
  • Encoding obfuscation (3): base64, Unicode zero-width, data:text/html
  • Tool-call mimicry (2): JSON or XML resembling LLM tool calls
  • DoS / suppression (2): false copyright claims, "do not summarize"
  • SVG + script (1): XSS+IPI combination

Read the full file on GitHub · 104 lines

Files

What ships with it

12 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. yesterday First seen · 104 lines · 144 tokens per session scan A 5ea05567b642

Subscribe to this mod's changes

weave-browser is a skill published in the GitHub repository Tyox-all/Weave_Protocol (0 stars, last pushed 9d ago), licensed Apache-2.0. It adds 144 tokens to every session and 1,449 once invoked, about $0.0007 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.