Logo vun Browser4 Dev

Browser4 Dev

CommunautéitBeléift
platonai
browser4-dev

Develop features inside the Browser4 repository itself: add CLI commands, agent tool domains, REST endpoints, tests, and skills; analyze impact, plan dev tasks, check CDP pitfalls, and verify builds. Use when the user asks to add a new browser4-cli command, new tool domain, REST endpoint, modify Browser4's own Kotlin/Rust code, or check which modules a change affects.

Iwwersiicht

Editeurplatonai
RepositoryBrowser4
Skill-Nummbrowser4-dev
Stären
1.2K
Forks
152
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum platonai op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Browser4 Dev an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/platonai/Browser4/tree/main/skills/browser4-dev
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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-dev .claude/skills/browser4-dev
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Browser4 Dev an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Browser4 Dev automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Browser4 Dev net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

browser4-dev

Quick Start

Add a new browser4-cli command with one call:

text
coding.scaffoldFlow(type="b4-cli-command", name="my-command", verify=true)

scaffoldFlow generates the whole chain — commands.rs CommandDef, backend MCP alias, tool executor, and test — from a single name; verify=true runs the type-appropriate build check. For other work (agent tool, REST endpoint, test class, skill), use the matching type and see Workflows below.

Develop features inside the Browser4 repository itself, following the repository's own conventions (AGENTS.md) — with multi-file skeletons generated from the repository's real reference implementations, so the output never goes stale.

When to Use

  • User wants to add a new browser4-cli command
  • User wants to add a new agent tool domain (plugin tool)
  • User wants to add a REST endpoint (Controller + Service)
  • User wants to add a test class or a skill
  • User wants to modify Browser4's own Kotlin/Rust code and verify it compiles
  • User wants to know which modules a change affects, or plan a whole dev task

How It Works

scaffoldFlow derives multi-file skeletons from the repository's real reference implementations, so generated code matches current conventions instead of stale templates. moduleGraph/impact rebuild the dependency picture from the live pom.xml files, and mvnBuild verifies with structured diagnostics. Follow AGENTS.md conventions at every step.

Patterns

1. Add a new CLI command

text
coding.scaffoldFlow(type="b4-cli-command", name="my-command", verify=true)
coding.mvnBuild(module="browser4-rest")

2. Add a REST endpoint

text
coding.scaffoldFlow(type="rest-endpoint", name="my-resource", verify=true)

3. Modify browser driver code

text
coding.trapCheck(path="browser4-core/browser4-browser/src/.../PulsarWebDriver.kt")
coding.impact(path=<file>)
coding.mvnBuild(module="browser4-core/browser4-browser")

Flags

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

Errors & Recovery

SymptomCauseFix
mvnBuild fails after scaffoldingGenerated code conflicts with existing codeRead diagnostics, fix the conflicting file, re-run
scaffoldFlow rejects verify=trueType-specific build check failedRun without verify, inspect, then re-run after fixing
Unknown blast radiusSkipped moduleGraph/impactRun them first — see Workflow 0

Workflows

0. Before changing anything — know the blast radius

coding.moduleGraph(module="browser4-core/browser4-browser")
  → LIVE module graph rebuilt from the real pom.xml files: direct deps,
    transitive dependents, and drift warnings vs the static snapshot

coding.impact(path="browser4-core/browser4-browser/src/.../PulsarWebDriver.kt")
  → owning module + affected modules (transitively) + suggested test commands

coding.trapCheck(path=<browser-driver file>)
  → CDP pitfall advisories (mouseWheel race, cursor positioning, insertText racing)

1. Add a new CLI command

coding.scaffoldFlow(type="b4-cli-command", name="extract-prices",
     description="Extract product prices from a page", category="Extract")
  → 4 files: commands.rs CommandDef, MCPToolController alias, backend skeleton, test

coding.write(path="cli/browser4-cli/src/commands.rs", content=<CommandDef block>)
coding.write(path="browser4-rest/.../MCPToolController.kt", content=<alias snippet>)
... write each piece ...

# Verify both sides:
coding.shell(command="cargo test --bin browser4-cli")          # Rust side
coding.mvnBuild(module="browser4-rest", goals="compile")       # Kotlin side

2. Add a new agent tool domain (plugin)

coding.scaffoldFlow(type="agent-tool", name="browser4-weather", domain="weather",
     basePackage="ai.platon.pulsar.weather", toolMethod="fetchWeather",
     description="Fetch weather for the current page")
  → 2 files: ToolExecutor + ToolMount auto-config

coding.mvnBuild(module="browser4-plugins/browser4-weather", goals="compile")
coding.validate(type="plugin", path="browser4-plugins/browser4-weather")

3. Add a REST endpoint

coding.scaffoldFlow(type="rest-endpoint", name="analysis",
     description="Run an analysis task")
  → 3 files: AnalysisController + AnalysisService + AnalysisControllerTest

4. Add a test class / skill

coding.scaffoldFlow(type="test-class", name="my-tool",
     basePackage="ai.platon.pulsar.agentic.tools")
coding.scaffoldFlow(type="skill", name="browser4-myflow",
     description="A custom Browser4 flow")

5. Clone an existing implementation (anti-staleness)

# Single file:
coding.scaffoldFromExample(path="browser4-plugins/browser4-seo/.../SeoToolExecutor.kt")
  → discovery: shows parameters (basePackage, className, domain, toolMethod)
coding.scaffoldFromExample(path=<same>, basePackage="ai.platon.pulsar.weather",
     className="WeatherToolExecutor", domain="weather", toolMethod="fetchWeather")

# Whole plugin directory (cross-file consistent + stem-derived siblings):
coding.scaffoldFromExample(path="browser4-plugins/browser4-seo",
     className="WeatherToolExecutor", basePackage="ai.platon.pulsar.weather",
     domain="weather", artifactId="browser4-weather")
  → renames the executor AND sibling classes sharing the stem
    (SeoAutoConfiguration→WeatherAutoConfiguration, SeoService→WeatherService, ...)

6. Plan a whole dev task in one call

coding.devTask(task="fix the mouseWheel race in PulsarWebDriver.kt under
     browser4-core/browser4-browser/src/main/kotlin, add a regression test",
     verify=true)
  → AGENTS.md dev-flow plan (read → impact → mvnBuild → tests → trapCheck →
    repo-consistency → commit), with the fast checks already RUN:
    compile of the inferred module, CDP trap check, repo-consistency.
    Add runTests=true to also execute the module's test suite.

Rules

  1. Prefer scaffoldFlow over hand-writing — multi-file consistency (same identifier in commands.rs + alias + test) is automatic.
  2. Verify both sides for CLI changes: cargo test --bin browser4-cli for Rust, coding.mvnBuild for Kotlin.
  3. Kotlin diagnostics: use coding.mvnBuild (fast compiler passthrough) — no JDTLS server is configured.
  4. AGENTS.md is the contract — when the repo's conventions change, regenerate skeletons from the updated reference implementations rather than editing stale output.
  5. Keep changes small: one command/domain/endpoint per cycle; coding.revert undoes a bad edit.
  6. Governance files are protected: delete/replace on VERSION, AGENTS.md, CLAUDE.md, root pom.xml, the BOM, and the CI workflow are blocked by design — ask the user for explicit intent instead of working around it. Add session-level protections for any other file with coding.protect(path, on).
  7. Module topology is live: coding.moduleGraph/coding.impact rebuild from the real poms; the static ModuleMap snapshot is guarded by E2E tests against drift — sync it when adding a module. Use coding.ktReferences(scope="module") and coding.ktInheritance before refactoring shared Kotlin symbols.

Examples

User: 给 browser4-cli 加一个 extract-prices 命令
Agent: 1. coding.scaffoldFlow(type="b4-cli-command", name="extract-prices", ...)
       2. 写 commands.rs CommandDef、MCPToolController alias、后端骨架、测试
       3. coding.shell(command="cargo test --bin browser4-cli")
       4. coding.mvnBuild(module="browser4-rest", goals="compile")
       5. 报告:6 处触点全部就位,双端编译通过

User: 克隆 browser4-seo 插件成天气插件
Agent: 1. coding.scaffoldFromExample(path="browser4-plugins/browser4-seo",
          className="WeatherToolExecutor", basePackage="ai.platon.pulsar.weather",
          domain="weather", artifactId="browser4-weather")
       2. 逐文件 coding.write
       3. coding.mvnBuild(module="browser4-plugins/browser4-weather")
       4. coding.validate(type="plugin", path="browser4-plugins/browser4-weather")

Heefeg gestallte Froen

Wat mécht de KI-Skill Browser4 Dev?

Develop features inside the Browser4 repository itself: add CLI commands, agent tool domains, REST endpoints, tests, and skills; analyze impact, plan dev tasks, check CDP pitfalls, and verify builds. Use when the user asks to add a new browser4-cli command, new tool domain, REST endpoint, modify Browser4's own Kotlin/Rust code, or check which modules a change affects.

Firwat Browser4 Dev op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Browser4 Dev besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Browser4 Dev an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/platonai/Browser4/tree/main/skills/browser4-dev an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Browser4 Dev benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Browser4 Dev benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Browser4 Dev domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Browser4 Dev gratis?

Jo. De Skill gëtt vum platonai ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇