1c-web-session

A Claude Code skill for driving the 1C web client through Playwright MCP: sessions, navigation, catalogs, documents and test data

SkillHigh riskRussian stack

roolee10/1c-web-session

Install

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest", "--timeout", "500"]
    }
  }
}

The skill needs Playwright MCP to control the browser.

This is third-party code. Review the repository files before installing.

What it does

The skill teaches the agent to operate a published 1C infobase in the browser through Playwright MCP. It starts and ends sessions, handles login and license dialogs, navigates sections and caches menu item IDs for a specific infobase in .claude/1c-nav.json. The agent creates catalog items, fills and posts documents with tabular sections, generates test data and runs JS scenarios for scenario testing. It bundles techniques that plain Playwright needs in the 1C web client: clipboard paste input and selectors for choice buttons.

Who it is for. For 1C developers and testers who want the agent to walk through user scenarios in the web client.

Good fit when

  • You need to fill a test infobase with catalogs and documents through the UI
  • You need to run a user scenario after a form change
  • You need to reproduce a bug that shows up only in the web client

Not a fit when

  • The infobase is not published on a web server
  • It is a live infobase with real data: the agent posts documents

Example request

Start the infobase, create a product catalog item for a family ticket and post a sales document for client Petrova

Limitations

Requires Claude Code, Playwright MCP and a published 1C web infobase whose URL goes into the project CLAUDE.md. Some techniques, such as loading a scenario via the clipboard, assume PowerShell. UI-driven work is slower and more sensitive to form changes than code-level tests.

How to disable. Delete the .claude/skills/1c-web-session folder from the project and, if needed, the playwright server from .mcp.json.

Security check

  • Creates and posts documents in the infobase through the UI
  • Runs arbitrary JS scenario code in the browser

README in short

The README lists what the skill does and explains 1C web client techniques: clipboard paste, choice button selectors, a navigation cache and long action chains in one call. Requirements are Claude Code, Playwright MCP and a published infobase, with a sample .mcp.json. Installation means copying the .claude folder into the project, and a demo video shows scenario testing. MIT licensed.

SKILL.md

---
name: 1c-web-session
description: >
  Взаимодействие с 1С:Предприятие в веб-клиенте через Playwright.
  Использовать для ЛЮБОЙ работы в браузере с 1С-базой: запуск/перезапуск/
  завершение сеанса; навигация по разделам интерфейса; создание и
  редактирование справочников и документов; заполнение форм и табличных
  частей; генерация тестовых данных через UI. Содержит паттерны: clipboard
  paste, DLB-кнопки, пикеры, навигационный кеш, обработка диалогов 1С,
  оптимизация browser_run_code. Триггеры: открой/запусти/перезапусти/
  заверши базу; создай/добавь/измени элемент справочника или документа;
  проведи документ; сгенерируй тестовые данные; любое browser_* действие
  в 1С-базе.
---

# Управление сеансом 1С в веб-клиенте

## Запуск базы

Прочитать `CLAUDE.md` проекта (Read tool) и найти URL базы. Формат обычно: `http://localhost/<имя-базы>/ru_RU/`

Использовать `browser_navigate` для перехода по URL. Если сеанс уже запущен — сначала завершить (см. ниже).

## Запуск JS-сценариев по пути

Команда пользователя вида `запусти сценарий <путь-к-файлу>.js` означает: выполнить код этого файла в текущем сеансе 1С через `browser_run_code`.

Формат сценария: JS-выражение функции `async (page) => { ... }` (пример: `.claude/scenarios/*.js`).

Не искать отдельный npm/ps1-раннер как первый шаг. Не запускать файл как обычный Node.js-скрипт.

Алгоритм:
1. Проверить существование файла сценария по указанному пути.
2. Запустить или восстановить сеанс 1С (URL из `CLAUDE.md`, обработать лицензию и форму входа по правилам этого скилла).
3. Выполнить сценарий способом A (по умолчанию). При недоступном clipboard переключиться на способ B.

### Способ A (рекомендуемый по скорости): clipboard loader

Использовать по умолчанию. Это самый быстрый способ для длинных сценариев: в `browser_run_code` передаётся короткий загрузчик, а не весь файл.

1. Скопировать файл сценария в буфер обмена:
```powershell
Get-Content -LiteralPath <путь-к-сценарию> -Raw | Set-Clipboard
```

FAQ

Why not just use Playwright without the skill?

1C web client fields handle standard Playwright input poorly, and menu IDs differ per infobase. The skill documents workarounds and a navigation cache.

How do I run my own scenario?

Write an async (page) JS function and ask the agent to run the scenario by file path; it executes it in the current session.

Playwright CLI

playwright-cli

Editors’ pick

Microsoft's official Playwright CLI with an agent skill: drive a browser through short commands without heavy MCP schemas

CLIMedium risk13.3K
Editors’ pick

The official MCP server debugger: web UI, automation CLI and terminal UI in one package

CLIMedium risk10.9K
Editors’ pick

SonarSource's official MCP server: quality and security issues, quality gates and code analysis from SonarQube Server and Cloud

MCP serverMedium risk648

Open-source AI agent for pull request review: descriptions, feedback and improvement suggestions on GitHub, GitLab and more

CLIMedium risk13K