Skip to content
Development
Command

/install-agent-browser

Install agent-browser (token-efficient headless browser CLI + MCP) for 1C web UI testing

From plugin
ai-rules-1c
55045 skills13 agents45 commands
> /plugin marketplace add comol/ai_rules_1c
> /plugin install 1c-rules@1c-rules

Command definition

install-agent-browser.md
description: Install agent-browser (token-efficient headless browser CLI + MCP) for 1C web UI testing
userOnly: true

/install-agent-browser — install token-efficient browser automation

Installs [agent-browser](https://github.com/vercel-labs/agent-browser) (Vercel Labs): a headless Chromium CLI with accessibility-tree snapshots. Preferred tool for 1C **web** UI testing — snapshots cost far fewer tokens than screenshot / vision loops (`cursor-ide-browser`, Playwright MCP, custom screenshot+OCR).

Policy and fallback order — `content/rules/ui-testing-tools.md`. Shell on Windows — `powershell-windows` skill.

This command does **not** install 1C MCP servers (use `/installmcp`) and does **not** enable UI testing by itself (`UI_TESTING` / `INFOBASE_PUBLISH_URL` stay as in `.dev.env`).

Steps

1. Prerequisites

1. Confirm Node.js / npm are on `PATH`:

   node --version
   npm --version

If either fails — stop and ask the user to install Node.js LTS (https://nodejs.org/), then re-run. Do not invent a Node path.

2. Prefer a global install (shared across projects). If the user asks for a project-local pin — use `npm install agent-browser` in the project root instead of `-g`, then invoke via `npx agent-browser`.

2. Install the CLI and Chrome for Testing

npm install -g agent-browser
if ($LASTEXITCODE -ne 0) { throw "npm install -g agent-browser failed" }
agent-browser install
if ($LASTEXITCODE -ne 0) { throw "agent-browser install (Chrome for Testing) failed" }
agent-browser --version
agent-browser doctor

On Linux only, if `doctor` reports missing system libraries:

agent-browser install --with-deps

3. Optional — coding-assistant skill stub

Offer once (default = yes if the user does not care):

npx skills add vercel-labs/agent-browser

This adds a thin discovery stub that loads live skill content via `agent-browser skills get …` (stays in sync with the CLI). Skip if `npx` is unavailable or the user declines. Do **not** copy `SKILL.md` from `node_modules`.

4. Register the MCP server in the active client

Merge an `agent-browser` stdio entry into the active tool's MCP config. **Do not overwrite** existing servers (especially 1C catalog entries). Detect the client the same way `/doctor` / `/installmcp` Step 7 do.

| Client | Config path | Shape | |---|---|---| | Cursor | `.cursor/mcp.json` (prefer project) or `%USERPROFILE%\.cursor\mcp.json` | `mcpServers` | | Claude Code | `.mcp.json` (project) or `~/.claude/mcp.json` | `mcpServers` | | Command Code | `.mcp.json` (project) | `mcpServers` | | Codex CLI | `.codex/config.toml` or `~/.codex/config.toml` | `[mcp_servers.<id>]` | | OpenCode | `opencode.json` (project root) | top-level `mcp` | | Qwen Code | `.qwen/settings.json` | `mcpServers` | | Kimi Code CLI | `.kimi-code/mcp.json` | `mcpServers` | | Cline | global Cline MCP settings only | `mcpServers` | | Kilo Code | `.kilo/kilo.json` → top-level `mcp` | local stdio per Kilo docs; merge **only** the `mcp` key | | Pi | — | no built-in MCP; CLI-only via Shell |

Canonical Cursor / Claude / Qwen / Cline fragment (`mcpServers`):

{
  "mcpServers": {
    "agent-browser": {
      "command": "agent-browser",
      "args": ["mcp"]
    }
  }
}

Default tools profile is `core` (small context). Full CLI parity only if the user asks:

"args": ["mcp", "--tools", "all"]

Codex (`config.toml`):

[mcp_servers.agent-browser]
command = "agent-browser"
args = ["mcp"]

OpenCode (`opencode.json` — merge only `mcp.agent-browser`; key must start with a letter):

{
  "mcp": {
    "agent-browser": {
      "type": "local",
      "command": ["agent-browser", "mcp"],
      "enabled": true
    }
  }
}

If `agent-browser` is not on the client's `PATH` after install (common on Windows when the IDE was started before `npm`), resolve the absolute path and use it as `command`:

(Get-Command agent-browser).Source

5. Verify

1. CLI: `agent-browser --version` succeeds; `agent-browser doctor` reports a usable Chrome. 2. Smoke (optional, ~5 s):

   agent-browser open about:blank
   agent-browser snapshot
   agent-browser close

3. Ask the user to **restart the AI client** so the MCP session reloads. 4. After restart, confirm `agent-browser` tools appear (e.g. `agent_browser_open`, `agent_browser_snapshot`). If missing — re-check the config path/shape from Step 4.

6. Final report (Russian, short)

Tell the user:

  • CLI version and that Chrome for Testing is installed;
  • which MCP config file was updated (path) and that other servers were preserved;
  • that web UI tests should prefer `agent-browser` (see `ui-testing-tools.md`);
  • that `UI_TESTING` / `INFOBASE_PUBLISH_URL` were not changed;
  • next step: restart the client, then run a UI test via `/deploy-and-test` when ready.

Limits

  • Do **not** remove or replace `cursor-ide-browser` / other browser MCPs — leave them; policy prefers `agent-browser` when both are present.
  • Do **not** commit secrets, profiles, or saved auth state.
  • Do **not** run UI tests as part of this command.
  • On failure of `npm` / `agent-browser install` — stop, show the error, do not half-write MCP config.
Read more
@comol
Ships withai-rules-1c

Rules\skills\subagens for vibecoding in 1C(bsl)

55032 skills13 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
550
Star history of comol/ai_rules_1c on GitHub, a chart by star-history.com

Other commands on ai-rules-1c.

build-release

build-release

Command

Build release artifacts from committed sources — .cf for the main configuration and .cfe per extension, with optional version…

@comol@comolInstall Command
caveman

caveman

Command

Toggle the caveman communication style — set CAVEMAN (on|auto|off) in .dev.env for the whole project; on|off|auto persist,…

@comol@comolInstall Command
check-uuid

check-uuid

Command

Check a 1C XML configuration dump for duplicate UUIDs, and optionally regenerate them

@comol@comolInstall Command
checkmcp

checkmcp

Command

Check availability of 1C MCP servers and install/start the missing ones

@comol@comolInstall Command
checkupdates

checkupdates

Command

Read-only check for available updates of the 1C MCP server images and of the 1c-rules ruleset, without pulling or installing…

@comol@comolInstall Command
deploy-and-test

deploy-and-test

Command

Load the configuration into the test infobase from .dev.env and check the result in the 1C interface — QA MCP first, the web…

@comol@comolInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command