Λογότυπο Browser4 Plugin

Browser4 Plugin

ΚοινότηταΔημοφιλής
platonai
browser4-plugin

Guides the creation of Browser4 plugins from requirements gathering through deployment. Use when the user wants to create, build, scaffold, or extend Browser4 with a new plugin — whether for CAPTCHA solving, media processing, content conversion, page category detection, custom RPA actions, or new LLM agent tools.

Add to TypingMind

Επισκόπηση

Εκδότηςplatonai
ΑποθετήριοBrowser4
Όνομα δεξιότηταςbrowser4-plugin
Αστέρια
1.2K
Διακλαδώσεις
152
Συνοδευτικά αρχεία
4
Άδεια χρήσηςApache-2.0
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Συνοδευτικά αρχεία: 4

    Αρχεία script, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε στο GitHub από τον λογαριασμό platonai. Ελέγξτε τα αρχεία της δεξιότητας στο αποθετήριο πριν την εγκαταστήσετε.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Browser4 Plugin στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/platonai/Browser4/tree/main/skills/browser4-plugin
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Προσθήκη δεξιότητας → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που υποστηρίζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

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-plugin .claude/skills/browser4-plugin
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Browser4 Plugin σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Browser4 Plugin μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι οδηγίες σε απλό κείμενο Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Browser4 Plugin δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλο κατά τη διάρκεια της συνομιλίας

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

Browser4 Plugin Development

Quick Start

bash
mvn -pl browser4-pdk install          # install the PDK parent POM once
mvn archetype:generate -DarchetypeGroupId=ai.platon.pulsar \
    -DarchetypeArtifactId=browser4-plugin-archetype   # scaffold the plugin project
mvn -f <artifactId>/pom.xml package   # build the plugin JAR

Deploy the JAR to the server's plugins/ directory (or POST it to http://localhost:18182/api/plugins/install) and restart — the plugin is auto-discovered. Prerequisites: JDK 17+, Maven 3.9+, and access to the browser4-pdk parent POM.

For the full walkthrough — requirements clarification, mount-point implementation, services/config, manifest, tests, build & deploy — see Step-by-Step Workflow.

When to Use

Use this skill when the user wants to create, build, scaffold, or extend a Browser4 plugin — CAPTCHA solving, media processing, content conversion, page-category detection, custom RPA actions, or new LLM agent tools. It is the deep guide (mount points, services, tests, deployment); for plugin code scaffolding inside this repo use the browser4-coding skill.

Do NOT create a plugin for: simple data extraction from a known site (use the browser4-cli HTML snapshot / X-SQL instead), one-off browser automation (the CLI or a quick script is faster), or modifying core Browser4 behavior (that belongs in the main source tree, not a plugin).

How It Works

A plugin is a thin JAR built against the browser4-pdk parent POM: you scaffold the project from the archetype, implement the relevant PluginMount interfaces (Browse/Load/Crawl event mounts, ToolMount, PageSnifferMount), wire Spring auto-configuration, and build. The server auto-discovers the JAR from plugins/ on restart and logs the mounted beans.

Patterns

1. Event-handling plugin (BrowseEventMount)

Scaffold with mountPoints=["BrowseEventMount"], implement the browse handler, and register it via auto-configuration. The key hook is onDocumentSteady — see Step 4a for the full code.

2. Plugin with LLM agent tools (ToolMount)

Scaffold with mountPoints=["ToolMount"] and hasCustomTools=true, implement a ToolExecutor extending AbstractToolExecutor, and declare the tool in plugin.json — see Step 4d.

3. Full-featured plugin (all major patterns)

Model it on the first-party plugins — browser4-plugins/browser4-images/ implements BrowseEventMount + ToolMount + Browser4Plugin + Config + Service + BrowseEventHandler + ToolExecutor.

4. Summary algorithm plugin (PageSummaryAlgorithmMount)

Scaffold with mountPoints=["PageSummaryAlgorithmMount"], implement PageSummaryAlgorithm (id/displayName/description + generate(PageSummaryInput)), and expose it via the mount bean. The algorithm becomes selectable with browser4-cli htmlsnapshot summary --algorithm <id> and visible in browser4-cli htmlsnapshot algorithms — see Contributing a summary algorithm.

Flags

The archetype takes named parameters — there are no CLI flags:

ParameterTypeRequiredDefaultDescription
groupIdStringYes—Maven groupId for the new plugin project (e.g., com.example)
artifactIdStringYes—Maven artifactId, conventionally browser4-<feature-name>
versionStringNo1.0.0-SNAPSHOTPlugin version
pluginNameStringYes—Human-readable plugin name (e.g., "My Feature Plugin")
pluginDescriptionStringNo"A Browser4 plugin that provides custom functionality"One-line description
mountPointsString[]No["BrowseEventMount"]Which PluginMount interfaces to implement. Options: BrowseEventMount, LoadEventMount, CrawlEventMount, ToolMount, PageSnifferMount, PageSummaryAlgorithmMount
hasCustomToolsBooleanNofalseWhether the plugin registers LLM agent tool executors
hasLifecycleBooleanNofalseWhether the plugin implements the Browser4Plugin lifecycle interface
featuresString[]No—List of concrete capabilities to implement (e.g., "detect media on page", "download files", "expose LLM tool")

When to Create a Plugin

Create a plugin when you need to:

  • Hook into the browse lifecycle — execute custom logic on page-navigation events (before navigation, after DOM is steady, before tab close). Examples: CAPTCHA detection and solving, ad blocking, custom RPA workflows.
  • Hook into the load lifecycle — intercept or transform page content during loading. Examples: URL normalization and stripping tracking parameters, content extraction, HTML post-processing.
  • Hook into the crawl lifecycle — accept or reject URLs during crawling. Examples: domain allowlists, duplicate URL filtering, paywall detection and skip.
  • Register custom tools for LLM agents — expose new capabilities as callable functions. Examples: image download, PPTX generation, database queries, API integrations.
  • Add page category sniffers — teach Browser4 to recognize new page types so it can adapt its behavior. Examples: CAPTCHA pages, login pages, paywalls, shopping carts.
  • Contribute page summary algorithms — add alternative htmlsnapshot summary generators (domain-specific, readability-focused, LLM-based) selected via --algorithm <id>.

Errors & Recovery

SymptomLikely causeFix
Plugin not loaded at startup; no "registered plugin" logbrowser4-plugin.json missing, malformed, or JAR not in the plugins directoryVerify JAR is in the configured plugins directory; verify JSON is valid; verify autoConfigurationClasses FQN matches
Plugin skipped as "default-disabled (opt-in)"Manifest has defaultEnabled: false and no explicit enable overrideEnable with browser4.plugins.enable=<name> or browser4.plugins.enable-all=true, or set defaultEnabled: true
ClassNotFoundException for Browser4 API classesDependency scope is compile instead of providedChange all browser4-* and Spring Boot deps to <scope>provided</scope>
Mount point handlers never fireAuto-configuration class doesn't implement the correct PluginMount interface, or AutoConfiguration.imports file is missing/wrongVerify AutoConfiguration.imports contains the exact FQN; verify the auto-config class implements the mount interface
BeanCreationException at startupA bean dependency is missing or circularCheck bean constructor args; ensure @Lazy on the auto-config class
Tool executor not available to agentsgetToolExecutors() returns empty list, or executor not exposed as a Spring beanVerify the list contains beans from applicationContext; verify executor has @Bean in auto-config
Archetype generation failsMaven can't resolve browser4-plugin-archetypeBuild the PDK locally first: mvn -pl browser4-pdk install
onDocumentSteady handler throws silentlyMissing try-catch in handler bodyAlways wrap handler body in try-catch; log errors via a logger
Config properties have no effectConfig class not reading from Config or property prefix mismatchVerify fromConfig() method reads all keys with correct prefix; verify property names in application config
NoSuchMethodError at runtimePlugin compiled against a different Browser4 version than the hostRebuild with matching browser4-pdk version; or reinstall the matching Browser4 version
JAR contains embedded dependenciesFat JAR instead of thin JAR — spring-boot-maven-plugin with repackage goalRemove or skip the repackage goal; ensure only maven-jar-plugin is active
NoClassDefFoundError for third-party librariesThird-party dependency not bundled in the plugin JARUse compile scope for third-party deps (not provided) so they are included in the JAR

Critical Warnings

Warning: All browser4-* and Spring Boot dependencies must use <scope>provided</scope>. Using compile scope causes ClassNotFoundException at runtime because the host application provides these classes. The plugin JAR should only bundle your own code and true third-party libraries (use compile scope for those).

Warning: Always annotate the auto-configuration class with @Lazy. Plugin beans depend on services that may not be available until the application context is fully initialized. Without @Lazy, startup may fail with BeanCreationException.

Warning: The browser4-plugin.json manifest and the Browser4Plugin.manifest property must stay in sync. The JSON file is always required for JAR discovery; the Browser4Plugin interface is optional. If both are present, the JSON manifest is authoritative for the plugin registry.

Warning: Event handlers run on the browser event loop. Never perform blocking I/O (HTTP calls, file writes) directly in a handler — use coroutines. For ToolMount executors, the framework handles coroutine dispatch automatically.

Warning: An uncaught exception in one event handler can break the entire handler chain. Always wrap handler bodies in try-catch and log failures.

Note: For lightweight plugin development without cloning the full Browser4 repo, the browser4-pdk parent POM extends pulsar-parent from Maven Central. Third-party developers only need the archetype and a Maven installation.

Tip: Build and test incrementally. After scaffolding, immediately run mvn package to verify the build works before writing any custom code. Then implement one mount point at a time, rebuilding and testing after each.

Tip: Read the browser4-pdk-test-plugin source before writing complex handlers. It demonstrates every mount point and serves as the compatibility canary.

Tip: When using @ConditionalOnProperty, prefer matchIfMissing = true so the plugin is enabled by default unless explicitly disabled. This matches the convention used by all first-party plugins.

Tip: The browser4-plugins/browser4-images/ plugin is the best all-around reference — it implements BrowseEventMount + ToolMount + Browser4Plugin with a config data class, service layer, browse event handler, and tool executor.

Reference Map

I want to...Read
Walk through the full plugin lifecycle (requirements → scaffold → deploy)Step-by-Step Workflow
Know which files a plugin project contains and what each is forFile Reference
Understand default vs opt-in loading and enable overridesPlugin Loading

Key source files to read for patterns and examples:

ResourcePathWhat it demonstrates
Canonical test pluginbrowser4-pdk/browser4-pdk-test-plugin/All three event-phase mount points (BrowseEventMount, LoadEventMount, CrawlEventMount) — the compatibility canary
Plugin archetypebrowser4-pdk/browser4-plugin-archetype/src/main/resources/archetype-resources/Scaffolded project structure, templates for all required files
PluginMount interfacesbrowser4-core/browser4-skeleton/src/main/kotlin/ai/platon/pulsar/skeleton/plugin/MountPoints.ktPluginMount, BrowseEventMount, LoadEventMount, CrawlEventMount, PageSummaryAlgorithmMount interface definitions
Summary algorithm SPIbrowser4-core/browser4-skeleton/src/main/kotlin/ai/platon/pulsar/skeleton/workflow/parse/html/ (PageSummaryAlgorithm.kt, PageSummaryAlgorithmRegistry.kt)Algorithm interface, input type, registry; walkthrough: summary-algorithm.md
Event lifecyclebrowser4-core/browser4-skeleton/src/main/kotlin/ai/platon/pulsar/skeleton/event/PageEvents.ktLoadEventHandlers, BrowseEventHandlers, CrawlEventHandlers — all 28 hooks
Event handler typesbrowser4-core/browser4-skeleton/src/main/kotlin/ai/platon/pulsar/skeleton/event/EventHandlers.ktChainable handler function types (WebPageWebDriverEventHandler, etc.)
Plugin manifestbrowser4-core/browser4-skeleton/src/main/kotlin/ai/platon/pulsar/skeleton/plugin/PluginManifest.ktPluginManifest data class schema
ToolMount + registrybrowser4-agentic/src/main/kotlin/ai/platon/pulsar/agentic/tools/ToolMount.ktToolMount interface + CustomToolRegistry singleton
ToolExecutor basebrowser4-agentic/src/main/kotlin/ai/platon/pulsar/agentic/tools/builtin/AbstractToolExecutor.ktToolExecutor interface and AbstractToolExecutor base class
PDK parent POMbrowser4-pdk/pom.xmlParent POM for plugin projects (standalone — inherits from pulsar-parent on Maven Central)
Plugin dev docsdocs/plugin-development.mdFull plugin development guide with API reference
Most complete reference pluginbrowser4-plugins/browser4-images/Implements BrowseEventMount + ToolMount + Browser4Plugin + Config + Service + BrowseEventHandler + ToolExecutor — all major patterns
CAPTCHA pluginbrowser4-plugins/browser4-captcha/Reference for PageSnifferMount + multi-tool executor
PDK test plugin sourcebrowser4-pdk/browser4-pdk-test-plugin/src/main/kotlin/ai/platon/pulsar/pdk/testplugin/config/TestPluginAutoConfiguration.ktMinimal mount-point wiring for all three event phases

See Also

  • Plugin Development Guide — Official plugin development documentation
  • AGENTS.md — Project architecture, build commands, code style, and testing conventions
  • PDK Test Plugin — Minimal reference plugin implementing all mount points
  • Built-in Plugins — Five first-party plugin implementations (captcha, images, media, pptx, markdown)

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Browser4 Plugin;

Guides the creation of Browser4 plugins from requirements gathering through deployment. Use when the user wants to create, build, scaffold, or extend Browser4 with a new plugin — whether for CAPTCHA solving, media processing, content conversion, page category detection, custom RPA actions, or new LLM agent tools.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Browser4 Plugin στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Browser4 Plugin είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη δεξιότητα Browser4 Plugin στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε τη διεύθυνση https://github.com/platonai/Browser4/tree/main/skills/browser4-plugin. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Browser4 Plugin;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη δεξιότητα Browser4 Plugin;

Με όσα θέλετε. Στο TypingMind μπορείτε να χρησιμοποιήσετε τη δεξιότητα Browser4 Plugin με οποιοδήποτε μοντέλο υποστηρίζει δεξιότητες, όπως τα GPT, Claude, Gemini, Grok, DeepSeek, Mistral και Llama, χρησιμοποιώντας τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Browser4 Plugin;

Ναι. Δημοσιεύεται στο GitHub από τον λογαριασμό platonai με την άδεια χρήσης Apache-2.0. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Δημιουργήστε τώρα τον δικό σας χώρο εργασίας AI

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇