Agent skill

Browser4 Fix Bug

by platonai in platonai/Browser4

Fix bugs in code using a compile-test-fix loop: run the build/tests, read the error, locate the faulty lines, edit, and re-verify until green.

Apache-2.0Auto-check passedDevelopment

Install Browser4 Fix Bug

skills CLI
$ npx skills add platonai/Browser4 --skill browser4-fix-bug -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install platonai/Browser4 browser4-fix-bug --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/platonai/Browser4.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/browser4-fix-bug .claude/skills/browser4-fix-bug && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
browser4-fix-bug
GitHub stars
1.2k
Token cost
~1.5k tokens
SKILL.md length
434 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fix bugs in code using a compile-test-fix loop: run the build/tests, read the error, locate the faulty lines, edit, and re-verify until green.

  • Works in 8 steps: Build/compile failure → Failing test → Runtime error in plugin/script → …
  • The user reports a build failure
  • SKILL.md covers Quick Start, When to Use, How It Works and Patterns, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Browser4 Fix Bug is an agent skill from platonai/Browser4. Fix bugs in code using a compile-test-fix loop: run the build/tests, read the error, locate the faulty lines, edit, and re-verify until green. Use when the user reports a build failure, test failure, crash, or asks to fix an error in Browser4 plugins, Kotlin, TS/JS, Python, or scripts.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging, Failing and flaky tests and Android development. It works with Kotlin and Python. The repository describes itself as: Browser4 — an AI-native browser engine for autonomous agents, intelligent extraction, and large-scale web automation. The licence is Apache-2.0.

When your agent uses it

  • The user reports a build failure
  • Asks to fix an error in Browser4 plugins

Example prompts

  • “/browser4-fix-bug”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): coding.shell, coding.read, coding.readLines, coding.replace, coding.replaceRegex, coding.editLines, coding.insertAfter, coding.diff, coding.changeSummary, coding.revert, coding.diagnostics, coding.references, coding.symbols, coding.lspServers, tab.eval, tab.console

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Build/compile failure
  2. Failing test
  3. Runtime error in plugin/script
  4. Reproduce — get the concrete error
  5. Locate — read the failing code, not the whole file
  6. Fix — smallest possible edit
  7. Verify — rerun the exact command from step 1
  8. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 0fdba82. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • coding.shell
    • coding.read
    • coding.readLines
    • coding.replace
    • coding.replaceRegex
    • coding.editLines
    • coding.insertAfter
    • coding.diff
    • coding.changeSummary
    • coding.revert

    …and 6 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Browser4 Fix Bug loads about 1.5k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 434 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from platonai/Browser4 at commit 0fdba82, republished under its Apache-2.0 licence (© platonai). 434 words, ~1,534 tokens.

Download SKILL.mdSave it as .claude/skills/browser4-fix-bug/SKILL.md (or your agent's skills folder).
name
browser4-fix-bug
description
Fix bugs in code using a compile-test-fix loop: run the build/tests, read the error, locate the faulty lines, edit, and re-verify until green. Use when the user reports a build failure, test failure, crash, or asks to fix an error in Browser4 plugins, Kotlin, TS/JS, Python, or scripts.
allowed-tools
coding.shell, coding.read, coding.readLines, coding.replace, coding.replaceRegex, coding.editLines, coding.insertAfter, coding.diff, coding.changeSummary, coding.revert, coding.diagnostics, coding.references, coding.symbols, coding.lspServers, tab.eval, tab.console
title
browser4-fix-bug
tier
procedure

browser4-fix-bug

Quick Start

text
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
text
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
text
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
text
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

SymptomCauseFix
Build still fails after an editEdit didn't address the real errorRe-read the error output; check the exact line numbers
Edit had no effectWrong file or pathVerify the path with coding.readLines before editing
Loop never goes greenFix introduced a new errorRevert (coding.revert), then make a smaller edit

Workflow

1. Reproduce — get the concrete error
coding.shell(command="mvn -pl <module> -am compile -DskipTests")   # Kotlin/Maven
coding.shell(command="tsc --noEmit")                               # TS
coding.shell(command="python -m py_compile <file>.py")             # Python
coding.shell(command="bash -n <file>.sh")                          # Bash
tab.eval(expression=<read the JS file>)  +  tab.console()          # Browser JS

If LSP servers are available, prefer instant pre-checks first: coding.diagnostics(path=<file>) — structured errors with line numbers.

2. Locate — read the failing code, not the whole file
coding.readLines(path=<file>, startLine=<line-8>, endLine=<line+8>)
coding.references(path=<file>, symbol=<suspected-symbol>)   # impact check before edits
coding.diff(path=<file>)                                     # what changed recently
3. Fix — smallest possible edit
SymptomTool
Wrong stringcoding.replace(path, oldStr, newStr)
Pattern-basedcoding.replaceRegex(path, regex, replacement)
Whole blockcoding.editLines(path, startLine, endLine, content)
Add a linecoding.insertAfter(path, anchor, content)
Edit went wrongcoding.revert(path) then redo
Show full SKILL.md (171 more words)Show less
4. Verify — rerun the exact command from step 1

Loop 1→4 until green. Do not make multiple unrelated edits between verifications — one fix, one check, so you always know which edit worked.

5. Report

Summarize: root cause (one line), fix (file:line), verification result (build/test output tail). If the fix took more than 3 attempts, re-read the error output carefully before continuing — do not fire-and-forget edits.

Rules

  1. Read before you write. Never edit a line you have not seen.
  2. One change per verify cycle. Batch edits only after each is proven.
  3. Use diagnostics when available. coding.lspServers tells you which language servers are installed; prefer coding.diagnostics over a full build for TS/JS/Python.
  4. Prefer editLines/insertAfter over replace for block edits — less chance of matching the wrong occurrence.
  5. Revert is cheap. If an edit makes things worse, coding.revert restores the pre-edit snapshot, then retry with a different approach.
  6. Stop and escalate after 5 failed attempts — report the exact error and your attempted fixes rather than degrading the code.

Examples

User: 编译报错了,browser4-seo 插件 mvn compile 失败
Agent: 1. coding.shell(command="mvn -pl browser4-plugins/browser4-seo -am compile -DskipTests")
       2. → error: SeoToolExecutor.kt:42 Unresolved reference 'foo'
       3. coding.readLines(path="browser4-plugins/browser4-seo/src/main/kotlin/ai/platon/pulsar/seo/tools/SeoToolExecutor.kt",
                           startLine=34, endLine=50)
       4. coding.replace(path=..., oldStr="foo", newStr="bar")
       5. coding.shell(command="mvn -pl browser4-plugins/browser4-seo -am compile -DskipTests") → BUILD SUCCESS
       6. 报告:根因 import 拼写;修复 SeoToolExecutor.kt:42;mvn compile 通过

© platonai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/browser4-fix-bug of platonai/Browser4.

Open the folder on GitHubat commit 0fdba82

Compare with similar skills

Browser4 Fix Bug next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Browser4 Fix Bug compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Browser4 Fix Bug this skillplatonai/Browser41.2k—~1.5kAutomated safety check: PassApache-2.0
Dbgtheodo-group/debug-that158—~1.9kAutomated safety check: PassMIT
Code Revieweralirezarezvani/claude-skills28k1 repos~1.6kAutomated safety check: PassMIT
Code Reviewerborghei/Claude-Skills874—~1.7kAutomated safety check: PassMIT
Failure Oriented InstrumentationArabelaTso/Skills-4-SE253—~2.1kAutomated safety check: PassApache-2.0
Exposed Bug Fix WorkflowJetBrains/Exposed9.3k—~3.8kAutomated safety check: PassApache-2.0

Similar skills

  • Dbg

    theodo-group/debug-that

    Debug applications using the dbg CLI debugger. An agent skill from theodo-group/debug-that.

    158 GitHub stars~1.9k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Code Reviewer

    alirezarezvani/claude-skills

    Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin, C, .NET, Java, C, C++, Rust, Ruby, PHP, and Dart/Flutter.

    28k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Code Reviewer

    borghei/Claude-Skills

    Code review automation for TypeScript, JavaScript, Python, Go, Swift, and Kotlin.

    874 GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Failure Oriented Instrumentation

    ArabelaTso/Skills-4-SE

    Selectively instruments code to capture runtime data for debugging failures and bugs.

    253 GitHub stars~2.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Exposed Bug Fix Workflow

    JetBrains/Exposed

    Official

    Takes a GitHub or YouTrack issue for the Exposed project through reproduction, a failing test, a fix, validation and a pull request.

    9.3k GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Reviewer

    jewbetcha/opentrace

    Comprehensive code review skill for TypeScript, JavaScript, Python, Swift, Kotlin, Go.

    116 GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check: notes

More from platonai/Browser4

All 17 skills in this repo
  • Data Validation

    platonai/Browser4

    Validates data against common and custom rules (required fields, formats, ranges).

    1.2k GitHub stars~896 tokensUpdated today
    Auto-check passed
  • Form Filling

    platonai/Browser4

    Automatically fills web forms using provided field data and can optionally submit the form.

    1.2k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Web Scraping

    platonai/Browser4

    Extracts data from web pages using browser automation and CSS/JavaScript selectors.

    1.2k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Organize Task Files

    platonai/Browser4

    Lists, pairs, deduplicates, and moves task files across the Coworker task state machine (0draft → 6git-pushed).

    1.2k GitHub stars~801 tokensUpdated today
    Auto-check passed
  • Task Token Usage

    platonai/Browser4

    Analyzes Claude Code session traces (JSONL) and draft task files to report token usage per task.

    1.2k GitHub stars~701 tokensUpdated today
    Auto-check passed
  • Weather

    platonai/Browser4

    Fetches current weather conditions and a 7-day forecast for a requested location using Open-Meteo geocoding and forecast APIs.

    1.2k GitHub stars~1k tokensUpdated today
    Auto-check passed

Works with

Questions about Browser4 Fix Bug

What does Browser4 Fix Bug do?

Fix bugs in code using a compile-test-fix loop: run the build/tests, read the error, locate the faulty lines, edit, and re-verify until green. Browser4 Fix Bug is an agent skill from platonai/Browser4. Fix bugs in code using a compile-test-fix loop: run the build/tests, read the error, locate the faulty lines, edit, and re-verify until green.

When should I use Browser4 Fix Bug?

Browser4 Fix Bug fits situations like: the user reports a build failure; asks to fix an error in Browser4 plugins.

How do I install Browser4 Fix Bug in Claude Code?

Run `npx skills add platonai/Browser4 --skill browser4-fix-bug -a claude-code`. Or copy the skill folder (skills/browser4-fix-bug in platonai/Browser4) into .claude/skills/browser4-fix-bug in your project. Claude Code loads it when a task matches its description.

How do I install Browser4 Fix Bug in Codex?

Run `npx skills add platonai/Browser4 --skill browser4-fix-bug -a codex`. Or copy the skill folder (skills/browser4-fix-bug in platonai/Browser4) into .agents/skills/browser4-fix-bug in your project. Codex loads it when a task matches its description.

Can I use Browser4 Fix Bug in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add platonai/Browser4 --skill browser4-fix-bug -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/browser4-fix-bug, .gemini/skills/browser4-fix-bug, .github/skills/browser4-fix-bug and .opencode/skills/browser4-fix-bug in your project.

What does Browser4 Fix Bug need to run?

SKILL.md names no scripts, command-line tools or credentials: Browser4 Fix Bug is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: coding.shell, coding.read, coding.readLines, coding.replace, coding.replaceRegex, coding.editLines, coding.insertAfter, coding.diff, coding.changeSummary, coding.revert, coding.diagnostics, coding.references, coding.symbols, coding.lspServers, tab.eval, tab.console.

Does Browser4 Fix Bug access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Browser4 Fix Bug safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Browser4 Fix Bug use?

Browser4 Fix Bug is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Browser4 Fix Bug use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Browser4 Fix Bug?

Skills that share tags, products or a category with Browser4 Fix Bug: Dbg (theodo-group/debug-that, 158 stars), Code Reviewer (alirezarezvani/claude-skills, 28k stars), Code Reviewer (borghei/Claude-Skills, 874 stars) and Failure Oriented Instrumentation (ArabelaTso/Skills-4-SE, 253 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Browser4 Fix Bug?

platonai (a GitHub user) maintains it in platonai/Browser4, which has 1,152 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 7, 2026.

Source: platonai/Browser4 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.