Accepts a compact JSON layout definition and generates a correct Template.xml for a 1C spreadsheet document. Claude describes what is needed (areas, parameters, styles), the script ensures correctness of the XML (palettes, indices, merges, namespace).
Usage
/mxl-compile <JsonPath> <OutputPath>
Parameters
| Parameter | Required | Description |
|---|---|---|
| JsonPath | yes | Path to the JSON layout definition |
| OutputPath | yes | Path for generating Template.xml |
Command
powershell.exe -NoProfile -File .claude/skills/mxl-compile/scripts/mxl-compile.ps1 -JsonPath "<путь>.json" -OutputPath "<путь>/Template.xml"
Workflow
- Claude writes the JSON definition (Write tool) → file
.json - Claude calls
/mxl-compileto generate Template.xml - Claude calls
/mxl-validateto check correctness - Claude calls
/mxl-infoto verify the structure
If the layout is created from an image (screenshot, scan of a printed form) — first call /img-grid to overlay a grid, use it to determine column boundaries and proportions, then use "Nx" widths + "page" for automatic calculation of dimensions.
DSL JSON schema
Full format specification: docs/mxl-dsl-spec.md (read via the Read tool before writing JSON).
Brief structure:
{ columns, page, defaultWidth, columnWidths,
fonts: { name: { face, size, bold, italic, underline, strikeout } },
styles: { name: { font, align, valign, border, borderWidth, wrap, format } },
areas: [{ name, rows: [{ height, rowStyle, cells: [
{ col, span, rowspan, style, param, detail, text, template }
]}]}]
}
Key rules:
page— page format ("A4-landscape","A4-portrait"or a number). Automatically calculatesdefaultWidthfrom the sum of proportions"Nx"col— 1-based column positionrowStyle— auto-fill of gaps with a style (borders across the full width)- The fill type is determined automatically:
param→ Parameter,text→ Text,template→ Template rowspan— merging rows downward (rowStyle takes occupied cells into account)