Skip to main content
skill CX Codex

mxl-decompile — Claude Code skill: decompile 1C spreadsheet layouts

mxl-decompile parses a 1C spreadsheet Template.xml into compact JSON. Use it to analyze or edit existing layouts through DSL.

MIT 45 installs ★ 811 updated 2026-10-23

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add Nikolay-Shirokov/cc-1c-skills
/plugin install 1c-skills@cc-1c-skills
Open on GitHub

What mxl-decompile does

The skill takes a path to Template.xml and returns a JSON definition of the layout — the same format /mxl-compile accepts. Inside is a PowerShell script mxl-decompile.ps1 that reads the XML and outputs the structure: cells, areas, styles, merges. The reverse operation is /mxl-compile, which builds Template.xml from JSON.

The parsed JSON contains keys like apply on rowStyle or controlType: "none" on input fields — they are not in the /mxl-compile DSL description, but the compiler accepts them back. Do not delete: without them the layout will change. Editing through DSL is full regeneration, not a point fix to the XML, so the diff after a decompile → compile cycle is usually wider than the actual change.

Merges not tied to a cell, chart settings (Chart, GanttChart), and print area do not survive the round trip — compare the result with /mxl-info or a diff if you need to preserve a layout as is.

What it helps with

  • parse a 1C spreadsheet document into editable JSON
  • analyze the structure of an existing layout — areas, styles, cells
  • change a layout through DSL and rebuild with /mxl-compile
  • get a compact layout description for version control

Example prompts for the agent

  • Parse reports/Invoice/Template.xml to JSON and show the structure
  • Run /mxl-decompile on layouts/PaymentOrder/Template.xml, save to payment.json
  • Convert the OrderForm/Template.xml layout to DSL so I can fix the areas

How to install mxl-decompile

1Plugin marketplace

/plugin marketplace add Nikolay-Shirokov/cc-1c-skills
/plugin install 1c-skills@cc-1c-skills

This installs the whole 1c-skills plugin with all its skills

2Skills CLI (Vercel)

npx skills add Nikolay-Shirokov/cc-1c-skills --skill mxl-decompile -a claude-code

3Manually: put the files in place

~/.claude/skills/mxl-decompile/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mxl-decompile/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about mxl-decompile

How to install mxl-decompile in Claude Code?

Run /plugin marketplace add Nikolay-Shirokov/cc-1c-skills, then /plugin install 1c-skills@cc-1c-skills. The skill becomes available immediately.

What does mxl-decompile do?

The skill reads a 1C spreadsheet Template.xml and returns a JSON definition: cells, areas, styles, merges. This JSON can be edited and rebuilt into XML with /mxl-compile.

Why does the parsed JSON have keys not in the DSL description?

Keys like apply on rowStyle or controlType: "none" carry the source file's state. The compiler accepts them back, and without them the layout will change. Do not delete.

Source text

SKILL.md · MIT
---
name: mxl-decompile
description: Декомпиляция табличного документа (MXL) в JSON-определение. Используй когда нужно получить редактируемое описание существующего макета
argument-hint: <TemplatePath> [OutputPath]
allowed-tools:
  - Bash
  - Read
  - Write
  - Glob
---

# /mxl-decompile — Декомпилятор макета в DSL

Принимает Template.xml табличного документа 1С и генерирует компактное JSON-определение (DSL). Обратная операция к `/mxl-compile`.

## Использование

```
/mxl-decompile <TemplatePath> [OutputPath]
```

## Параметры

| Параметр     | Обязательный | Описание                                |
|--------------|:------------:|-----------------------------------------|
| TemplatePath | да           | Путь к Template.xml                     |
| OutputPath   | нет          | Путь для JSON (если не указан — stdout) |

## Команда

```powershell
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-decompile.ps1" -TemplatePath "<путь>/Template.xml" [-OutputPath "<путь>.json"]
```

## Рабочий процесс

Декомпиляция существующего макета для анализа или доработки:

1. Вызвать `/mxl-decompile` для получения JSON из Template.xml
2. Проанализировать или изменить JSON (добавить области, поменять стили)
3. Вызвать `/mxl-compile` для генерации нового Template.xml
4. Вызвать `/mxl-validate` для проверки

Формат JSON на выходе — тот же DSL, что принимает `/mxl-compile`; его описание живёт в навыке `/mxl-compile`.

## Ключи, которых нет в описании DSL

В разобранном макете попадаются ключи, которых нет в инструкции `/mxl-compile`: например,
у `rowStyle` — модификатор `apply`, у ячейки-поля ввода — `controlType: "none"`. Они несут
состояние исходного файла, которое иначе не выразить. Писать их самому не нужно; удалять
из разобранного JSON — тоже: компилятор принимает их обратно как есть, а без них макет
изменится.

## Что нужно знать о пересборке

Правка через DSL — это полная перегенерация макета, а не точечное изменение XML. Поэтому
diff после цикла «декомпиляция → компиляция» обычно шире фактической доработки, даже когда
содержание сохранено целиком.

Побайтового совпадения с исходником ждать не всегда стоит. В макетах, которые долго правили
в Конфигураторе, остаются следы прежних состояний: например, формат ячейки несёт ширину
колонки, которая с тех пор изменилась. Из итогового документа такие значения не выводятся,
и в пересобранный файл они не возвращаются.

Не переживают цикл вовсе (в JSON не попадают, в XML не возвращаются):

- объединения, не привязанные к ячейке — по всей высоте или ширине документа;
- настройки диаграмм (`Chart`, `GanttChart`) — сам рисунок сохраняется, его содержимое нет;
- область печати.

Если задача — сохранить чужой макет как есть и поправить в нём малое, сверяйте результат
`/mxl-info` или diff-ом: перечисленное выше нужно вернуть руками.

© Nikolay Shirokov · MIT · Nikolay-Shirokov/cc-1c-skills

Similar skills

Everything for 1C →

From the same set81

The whole set →

Project sponsors

Companies that keep this analytics open