browser4-dev

Scaffold and verify CLI commands, agent tools, and REST endpoints inside the Browser4 repository.

1.1k|151|Updated Mar 12, 2018
One-click install
npx skills add https://github.com/platonai/Browser4 --skill browser4-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: browser4-dev
Source: https://github.com/platonai/Browser4/tree/main/skills/browser4-dev
Command: npx skills add https://github.com/platonai/Browser4 --skill browser4-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding features to the Browser4 codebase requires touching many coordinated files (Rust command definitions, Kotlin controllers, tool executors, tests) and knowing which modules a change affects. This Skill generates multi-file skeletons from the repository's real reference implementations and verifies them with builds, so new code follows current conventions instead of stale templates.

Core Features & Use Cases

  • Multi-file scaffolding: Generate a complete browser4-cli command (commands.rs CommandDef, MCP alias, backend executor, test) or a REST endpoint (Controller + Service + test) from a single name.
  • Impact analysis: Rebuild the live module dependency graph from pom.xml files and compute which modules a file change affects before editing.
  • CDP pitfall checks: Run trap checks on browser driver code to catch known issues like mouseWheel races and cursor positioning bugs.
  • Use Case: A developer asks to add an extract-prices command to browser4-cli; the Skill scaffolds all four touchpoints, then verifies both the Rust side (cargo test) and the Kotlin side (mvnBuild).

Quick Start

Ask the agent to add a new browser4-cli command named extract-prices and verify it compiles on both the Rust and Kotlin sides.

Frequently Asked Questions about browser4-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new command to browser4-cli?

Run coding.scaffoldFlow with type b4-cli-command and your command name to generate the commands.rs CommandDef, MCP tool alias, backend executor skeleton, and test. Then verify with cargo test on the Rust side and coding.mvnBuild on the Kotlin side.

How do I add a REST endpoint to a Kotlin Spring project?

Use coding.scaffoldFlow with type rest-endpoint and a resource name to generate the Controller, Service, and ControllerTest files together. The skeletons are derived from the repository's existing reference implementations so they match current conventions.

How can I check which modules a code change affects in a Maven multi-module project?

Run coding.moduleGraph to rebuild the live dependency graph from the real pom.xml files, then coding.impact on the target file to get its owning module, transitively affected modules, and suggested test commands.

Why does scaffoldFlow reject the verify=true option?

The rejection means the type-specific build check failed after generation. Re-run without verify, inspect the generated files for conflicts with existing code, fix them, and then run the build again.

Can I clone an existing Browser4 plugin into a new one?

Yes, coding.scaffoldFromExample on a plugin directory like browser4-seo clones it with cross-file consistent renaming, so sibling classes sharing the stem (AutoConfiguration, Service) are renamed together with your new package and artifactId.

What files are protected from modification in this workflow?

Delete or replace operations on VERSION, AGENTS.md, CLAUDE.md, the root pom.xml, the BOM, and the CI workflow are blocked by design. You can add session-level protection to any other file with coding.protect.