From 76a0dd80be0a78ce2946534f5ff56b97a04f9e84 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 8 Feb 2026 15:59:49 +0300 Subject: [PATCH] Add mxl-info and mxl-validate skills for SpreadsheetDocument analysis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /mxl-info: extracts compact template structure (areas, parameters, column sets) from Template.xml. Supports -WithText for cell content, -Format json, and output truncation protection. - /mxl-validate: 12 structural checks (format/font/line indices, column bounds per column set, named area ranges, merge bounds, columnsID references). Exit code 1 on errors. Tested on 3 real templates: label (simple), invoice (medium), УКД (complex — 7 column sets, Rectangle areas). Co-Authored-By: Claude Opus 4.6 --- .claude/skills/mxl-info/SKILL.md | 103 +++++ .claude/skills/mxl-info/scripts/mxl-info.ps1 | 417 ++++++++++++++++++ .claude/skills/mxl-validate/SKILL.md | 85 ++++ .../mxl-validate/scripts/mxl-validate.ps1 | 395 +++++++++++++++++ README.md | 10 +- 5 files changed, 1008 insertions(+), 2 deletions(-) create mode 100644 .claude/skills/mxl-info/SKILL.md create mode 100644 .claude/skills/mxl-info/scripts/mxl-info.ps1 create mode 100644 .claude/skills/mxl-validate/SKILL.md create mode 100644 .claude/skills/mxl-validate/scripts/mxl-validate.ps1 diff --git a/.claude/skills/mxl-info/SKILL.md b/.claude/skills/mxl-info/SKILL.md new file mode 100644 index 00000000..82a777e3 --- /dev/null +++ b/.claude/skills/mxl-info/SKILL.md @@ -0,0 +1,103 @@ +--- +name: mxl-info +description: Analyze SpreadsheetDocument (MXL) template structure — areas, parameters, column sets +argument-hint: or +allowed-tools: + - Bash + - Read + - Glob +--- + +# /mxl-info — Template Structure Analyzer + +Reads a SpreadsheetDocument Template.xml and outputs a compact summary: named areas, parameters, column sets. Replaces the need to read thousands of XML lines. + +## Usage + +``` +/mxl-info +/mxl-info +``` + +## Parameters + +| Parameter | Required | Default | Description | +|---------------|:--------:|---------|------------------------------------------| +| TemplatePath | no | — | Direct path to Template.xml | +| ProcessorName | no | — | Processor name (alternative to path) | +| TemplateName | no | — | Template name (alternative to path) | +| SrcDir | no | `src` | Source directory | +| Format | no | `text` | Output format: `text` or `json` | +| WithText | no | false | Include static text and template content | +| MaxParams | no | 10 | Max parameters listed per area | +| Limit | no | 150 | Max output lines (truncation protection) | +| Offset | no | 0 | Skip N lines (for pagination) | + +Specify either `-TemplatePath` or both `-ProcessorName` and `-TemplateName`. + +## Command + +```powershell +powershell.exe -NoProfile -File .claude/skills/mxl-info/scripts/mxl-info.ps1 -TemplatePath "" +``` + +Or with processor/template names: +```powershell +powershell.exe -NoProfile -File .claude/skills/mxl-info/scripts/mxl-info.ps1 -ProcessorName "" -TemplateName "