browser4-fix-bug

A bug-fixing workflow for Browser4 code and its plugins, including Kotlin, TypeScript, JavaScript, Python, and shell scripts. It repeatedly builds or tests the code, reads the actual error, makes a small edit, and checks again.

In plain words
What is it for?
Use it to fix compilation errors, failing tests, crashes, runtime errors, and reported code diagnostics.
Why use it?
Build and test failures can have causes that are easy to guess incorrectly. The workflow keeps each fix tied to the reported error and verifies whether it worked.

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/platonai/browser4/browser4-fix-bug
Any agent
npx skills add platonai/Browser4 --skill browser4-fix-bug
Clone the repo
git clone --depth 1 https://github.com/platonai/Browser4

Made for: Claude Code, Codex.

Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,568 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.00078 $0.01568
Opus 5 $0.00039 $0.00784
Sonnet 5 $0.00016 $0.00314
Haiku 4.5 $0.00008 $0.00157

Measured 3d ago against content hash 34f7088d7f07, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

browser4-fix-bug 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 3d 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/browser4-fix-bug/SKILL.md · 143 lines

How it starts

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

browser4-fix-bug

Quick Start

coding.shell(command="mvn -pl <module> -am compile -DskipTests")     # 1. reproduce the error
coding.readLines(path=<file>, startLine=<line-8>, endLine=<line+8>)  # 2. read the failing code
coding.replace(path=<file>, old="...", new="...")                    # 3. smallest possible edit
coding.shell(command="mvn -pl <module> -am compile -DskipTests")     # 4. re-verify until green

Drive a bug from "it fails" to "it passes" with a disciplined compile-test-fix loop. Never guess — read the actual error, make the smallest edit, and re-verify.

When to Use

  • User reports a build/compile failure or a failing test
  • A plugin, skill script, JS, or shell script errors at runtime
  • User says "fix this error", "the build is broken", "tests fail", "it crashes"
  • LSP diagnostics (coding.diagnostics) report errors in a file

How It Works

The compile-test-fix loop is error-driven: reproduce the failure, read the exact error, locate the faulty lines with minimal context, make the smallest possible edit, and re-verify. Never guess — every iteration starts from the actual error output.

Patterns

1. Build/compile failure

coding.shell(command="mvn -pl <module> -am compile -DskipTests")
coding.readLines(path=<file>, startLine=<line-8>, endLine=<line+8>)
coding.replace(path=<file>, old="...", new="...")
coding.shell(command="mvn -pl <module> -am compile -DskipTests")

2. Failing test

coding.shell(command="mvn test -pl <module> -Dtest=<TestClass>")
coding.readLines(path=<test-file>, startLine=<line-8>, endLine=<line+8>)
coding.replace(path=<file>, old="...", new="...")

3. Runtime error in plugin/script

coding.diagnostics(path=<file>)
coding.readLines(path=<file>, startLine=<line-8>, endLine=<line+8>)
coding.replace(path=<file>, old="...", new="...")

Flags

coding tools take structured arguments, not CLI flags — see Workflow below for each tool's parameters.

Errors & Recovery

Read the full file on GitHub · 143 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. 3d ago First seen · 143 lines · 78 tokens per session scan A 34f7088d7f07

Subscribe to this mod's changes

browser4-fix-bug is a skill published in the GitHub repository platonai/Browser4 (1,114 stars, last pushed 4d ago), licensed Apache-2.0. It adds 78 tokens to every session and 1,568 once invoked, about $0.0004 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-30.