Browser4 Fix Bug logo

Browser4 Fix Bug

CommunityPopular
platonai
browser4-fix-bug

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.

Overview

Publisherplatonai
RepositoryBrowser4
Skill namebrowser4-fix-bug
Stars
1.2K
Forks
152
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by platonai on GitHub. Read the source before you install it.

Installation

Install the Browser4 Fix Bug AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/platonai/Browser4/tree/main/skills/browser4-fix-bug
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/platonai/Browser4.git /tmp/Browser4
mkdir -p .claude/skills
cp -r /tmp/Browser4/skills/browser4-fix-bug .claude/skills/browser4-fix-bug
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Browser4 Fix Bug in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Browser4 Fix Bug on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Browser4 Fix Bug is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

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 通过

Frequently asked questions

What does the Browser4 Fix Bug AI skill 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. 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.

Why use Browser4 Fix Bug on TypingMind?

Because you install it once and use it with any model. Browser4 Fix Bug is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Browser4 Fix Bug in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/platonai/Browser4/tree/main/skills/browser4-fix-bug. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Browser4 Fix Bug?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Browser4 Fix Bug?

As many as you like. As long as a model supports skills, you can use Browser4 Fix Bug with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Browser4 Fix Bug AI skill free?

Yes. It is published on GitHub by platonai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇