No description
Find a file
Alexander Emelyanov cf9382942e Add browser automation skills spec for OpenCode
Defines the browser, workflow-manager, and browser-agent skills plus
the Markdown workflow storage format and safety constraints.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-09 15:29:05 +03:00
.opencode/skill Add browser automation skills spec for OpenCode 2026-10-09 15:29:05 +03:00
.gitignore Add browser automation skills spec for OpenCode 2026-10-09 15:29:05 +03:00
README.md Add browser automation skills spec for OpenCode 2026-10-09 15:29:05 +03:00

auto-browser

Browser automation system for OpenCode, built as a set of three cooperating skills plus persistent, file-based workflow storage.

This repository is a specification and reference implementation of the skills themselves (the SKILL.md files OpenCode loads). It does not include any application code to run — it's the instructions OpenCode's agent follows when the skills are invoked.

Architecture

Three skills divide the responsibilities:

  1. browser — user-facing entry point. Shows saved workflows, lets the user run one, create a new one, edit one, or run a one-off task.
  2. workflow-manager — creates, reads, edits, lists, and deletes saved workflows, persisted as Markdown files.
  3. browser-agent — drives the actual browser session through the official Chrome DevTools MCP (navigation, DOM/accessibility inspection, clicking, typing, form filling, data extraction).

Saved workflows live in individual Markdown files, so they persist across OpenCode sessions.

User runs `browser`
        |
        v
  Read saved workflows
        |
        v
    Show menu
   /    |     \
  v     v      v
 Run   Create  One-off
 saved workflow task
  |      |      |
  v      v      |
workflow-manager|
  |      v      |
  |   Save it   |
  |      |      |
  +------+------+
         |
         v
    browser-agent
         |
         v
  Chrome DevTools MCP
         |
         v
   Verify the result
         |
         v
   Concise report

Directory structure

.opencode/
└── skill/
    ├── browser/
    │   └── SKILL.md
    ├── browser-agent/
    │   └── SKILL.md
    └── workflow-manager/
        ├── SKILL.md
        └── workflows/
            ├── README.md      # format reference, no example files checked in
            └── *.md           # saved workflows, created on demand

The exact path OpenCode expects for custom skills (and how it discovers them) depends on the installed OpenCode version's configuration — see opencode.ai/docs/skills and check the skills.paths setting in your opencode.json before relying on this layout as-is.

How it works in practice

Run a saved workflow — the user launches browser, picks a saved workflow (e.g. check-orders), supplies any missing inputs, and browser-agent executes it, verifies the result, and reports back.

Create a new workflow — the user launches browser, chooses to create a workflow, describes the desired outcome in plain language, workflow-manager clarifies essential details and saves a new Markdown file, then verifies the file exists before confirming success.

One-off task — the user launches browser, chooses a one-time task, describes what they want, and browser-agent performs it without saving anything unless explicitly asked to.

Edit an existing workflow — the user picks a saved workflow to edit, describes the change, and workflow-manager updates only the relevant parts, preserving everything else, then verifies the save.

Workflow file format

Each saved workflow is a Markdown file with YAML frontmatter under .opencode/skill/workflow-manager/workflows/. See workflows/README.md for the full format and authoring guidelines.

Safety model

All three skills share the same constraints:

  • Only the official Chrome DevTools MCP is used for browser control — no Playwright MCP, custom MCP servers, vision models, RDP, or VNC.
  • Routine, reversible actions proceed autonomously within the user's request.
  • Purchases, payments, publishing, sending messages, destructive changes, consequential submissions, and security-setting changes require explicit confirmation first.
  • Authentication, CAPTCHA, and other access controls are never bypassed.
  • No skill may claim a workflow was saved, or a task succeeded, without verifying it (reading back the file, re-inspecting the page, etc.).
  • No passwords, cookies, tokens, or other secrets are stored in workflow files or exposed in reports.

Before using this in a real OpenCode setup

These SKILL.md files describe intended behavior; they do not by themselves guarantee that OpenCode will auto-chain the three skills together. Before relying on this setup, confirm:

  1. The installed OpenCode version supports this path/convention for custom skills.
  2. How OpenCode discovers and loads skills in that version.
  3. The agent has read/write access to the workflow directory.
  4. How a specific skill is actually invoked from the OpenCode UI/CLI.
  5. The Chrome DevTools MCP server is connected and exposes the tools browser-agent expects.

If one skill cannot directly invoke another in the installed version, the top-level skill (browser) must either follow the delegated skill's instructions itself, or use whatever delegation mechanism OpenCode actually supports.

Note also that saving a workflow persists instructions, not the current browser state, an active session, or authentication.

References