bunwv: Instructions file for Claude Code

CLAUDE.md

bunwv CLAUDE.md is an instructions file for Claude Code from NatiCha/bunwv. It costs 2,125 tokens per session, scanned B, original, MIT.

Project instructions for bunwv, a command-line tool that controls a browser window through Bun.WebView. It uses a background process and separate named sessions.

In plain words
What is it for?
Use them when developing or testing bunwv commands, its browser daemon, session handling, Unix-socket communication, or automatic idle shutdown.
Why use it?
They explain the project’s Bun-only setup, file structure, commands, and how the command-line tool communicates with the browser process.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions .claude-plugin; mentions CLAUDE.md; mentions Claude Code.

This is NatiCha/bunwv's own configuration. It tells Claude Code how to work on bunwv itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bunwv configures →

Reuse

Borrowing it

Nothing to install: this file belongs to NatiCha/bunwv. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/NatiCha/bunwv/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/NatiCha/bunwv

Made for: Claude Code.

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 bunwv CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/naticha/bunwv/claude-md/github.svg)](https://agentmods.dev/instructions/naticha/bunwv/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/naticha/bunwv/claude-md"><img src="https://agentmods.dev/badge/instructions/naticha/bunwv/claude-md/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 bunwv CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/naticha/bunwv/claude-md"><img src="https://agentmods.dev/badge/instructions/naticha/bunwv/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,125 This file is loaded in full into every session.
When invoked 2,125 The same file — it is already loaded in full.
Security scan B 1 finding. 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.02125 $0.02125
Opus 5.5 $0.00850 $0.00850
Sonnet 5.5 $0.00425 $0.00425
Haiku 4.5 $0.00213 $0.00213

Measured 2mo ago against content hash 5be5a8ad1d6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

bunwv CLAUDE.md scanned grade B with 1 finding 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 2mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Socket + PID files `chmod 0600` on daemon start — other local users can't connect to this session
CLAUDE.md · 113 lines

How it starts

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

CLAUDE.md

This is bunwv — a headless browser automation CLI built on Bun.WebView (Bun v1.3.12+). Cross-platform: WebKit on macOS (default), Chrome on Linux/Windows (auto-detected).

Project Structure

bunwv.ts          # CLI entry point (shebang, arg parsing, commands)
lib/daemon.ts     # WebView daemon (Bun.serve on Unix socket, all routes)
skills/bunwv/     # Claude Code skill file (SKILL.md)
.claude-plugin/   # Marketplace plugin config
docs/             # Bun.WebView API reference notes

Development

bun bunwv.ts help                    # run locally during dev
bun bunwv.ts start                   # test the daemon
bun bunwv.ts close                   # stop it

Default to Bun for everything — no Node, no npm scripts, no external dependencies.

Architecture

  • CLI (bunwv.ts) parses args into flags/positional, sends HTTP requests to the daemon via Unix socket
  • Daemon (lib/daemon.ts) owns a Bun.WebView instance, exposes all WebView methods as HTTP routes on /tmp/bunwv-<session>.sock
  • Sessions are isolated by name — each gets its own socket, PID file, and WebView instance
  • Auto-shutdown after 30min idle (configurable via --idle-timeout)

Design principles (agent-first)

bunwv is designed for AI coding agents driving it via discrete tool calls. Humans are a secondary user. When the two conflict, agent UX wins.

  • Statelessness over streams. Every command is one request, one response, exit. No long-lived connections, no background processes for the agent to manage. "Tail" patterns use snapshot + cursor (--since <seq>), never streaming.
  • Token efficiency in the happy path. Successful verbs print only what's needed to continue. click, type, navigate, press, scroll, resize, back/forward/reload: empty stdout, exit 0. Don't spend tokens confirming success.
  • Structure only where it earns its tokens. JSON is ~30–50% heavier than prose for small outputs. Use plain text for simple success; use JSON for (a) errors, (b) genuinely structured data (events, console buffer, multi-field status under --json), (c) anywhere the agent must distinguish types — evaluate prints JSON-literal values so strings keep their quotes and numbers don't.
  • Reliability on the unhappy path. Errors are always JSON on stderr with nonzero exit. Exit codes are stable and documented. Agents branch on exit code, not on stderr parsing. (0 ok, 1 generic, 2 usage, 3 timeout, 4 element-not-found, 5 daemon-unreachable.)
  • Error-level console auto-surfaces; everything else is pull. If console.error or console.warn fires during a verb, the daemon attaches X-Console-Errors to the HTTP response and the CLI forwards it to process stderr as {console:[…]}. Normal logs, CDP events, and navigation events stay in ring buffers, fetched on demand via bunwv console --since / bunwv events --since.
  • File paths for binary outputs. Screenshots default to a file path on disk; the agent's file-reading tools handle the image. --encoding base64 and --out - (stdout) exist but are not the default.
  • --json for opt-in uniformity. Agents that prefer one shape over terseness can force an envelope {ok, data?, error?, exitCode} on any command.
  • 1:1 with Bun.WebView. Every capability of the Bun.WebView type is reachable from the CLI. No JS-API-only escape hatches.

Read the full file on GitHub · 113 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. 2mo ago First seen · 113 lines · 2,125 tokens per session scan B 5be5a8ad1d6f

Subscribe to this mod's changes

bunwv CLAUDE.md is an instructions file published in the GitHub repository NatiCha/bunwv (219 stars, last pushed 5mo ago), licensed MIT. It adds 2,125 tokens to every session, about $0.0085 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

bunwv CLAUDE.md compared with instructions from other repositories

bunwv CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bunwv CLAUDE.mdNatiCha/bunwvInstructions file2195mo agoMITB2,125Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot