Automated summary
This skill generates a complete 1C Form.xml from a compact JSON definition using a custom DSL.
Strengths
- Automates creation of complex Form.xml files from concise JSON input.
- Supports many element types and form properties.
- Auto-generates companion elements and sequential IDs.
- Reduces manual XML coding significantly.
Limitations
- Requires understanding of the proprietary JSON DSL.
- Not suitable for editing existing forms (creation only).
- Depends on PowerShell execution and a Windows-based 1C environment.
Use this skill when you need to create a new 1C form with multiple elements (5+ fields or groups) and want to avoid writing XML manually.
Do not use it for very simple forms (1-3 fields) or when you need to modify an existing form instead of creating a new one.
Security analysis
SafeThe skill transforms a local JSON file into an XML file using a PowerShell script, with no network access, execution of arbitrary code, or handling of secrets. It operates solely on user-provided input and writes to a specified output path.
No concerns found
How this analysis is madeExamples
/form-compile ./form.json ./output/Form.xmlGenerate a form XML for a client list with a table for contacts and a command bar. Use /form-compile with JSON definition at ./clientForm.json to ./output/Form.xmlCreate a form using /form-compile from ./collapsible.json to ./output/Form.xml. The JSON defines a vertical collapsible group with two input fields.name: form-compile description: Компиляция управляемой формы 1С из компактного JSON-определения. Используй когда нужно создать форму с нуля по описанию элементов argument-hint: <JsonPath> <OutputPath> allowed-tools:
- Bash
- Read
- Write
- Glob
/form-compile — Генерация Form.xml из JSON DSL
Принимает компактное JSON-определение формы (20–50 строк) и генерирует полный корректный Form.xml (100–500+ строк) с namespace-декларациями, автогенерированными companion-элементами, последовательными ID.
При проектировании формы с нуля (5+ элементов или нечёткие требования) — вызовите
/form-patternsдля загрузки справочника: архетипы, конвенции именования, продвинутые паттерны. Для простых форм (1–3 поля, пользователь описал что нужно) — не нужно.
Использование
/form-compile <JsonPath> <OutputPath>
Параметры
| Параметр | Обязательный | Описание | |------------|:------------:|-----------------------------------| | JsonPath | да | Путь к JSON-определению формы | | OutputPath | да | Путь к выходному файлу Form.xml |
Команда
powershell.exe -NoProfile -File .claude/skills/form-compile/scripts/form-compile.ps1 -JsonPath "<json>" -OutputPath "<xml>"
JSON DSL — справка
Структура верхнего уровня
{
"title": "Заголовок формы",
"properties": { "autoTitle": false, ... },
"events": { "OnCreateAtServer": "ПриСозданииНаСервере" },
"excludedCommands": ["Reread"],
"elements": [ ... ],
"attributes": [ ... ],
"commands": [ ... ],
"parameters": [ ... ]
}
title— заголовок формы (multilingual). Можно указать и вproperties, но лучше на верхнем уровнеproperties— свойства формы:autoTitle,windowOpeningMode,commandBarLocation,saveDataInSettings,width,heightи др.events— обработчики событий формы (ключ: имя события 1С, значение: имя процедуры)excludedCommands— исключённые стандартные команды
Элементы (ключ определяет тип)
| DSL ключ | XML элемент | Значение ключа |
|--------------|-------------------|---------------------------------------------------|
| "group" | UsualGroup | "horizontal" / "vertical" / "alwaysHorizontal" / "alwaysVertical" / "collapsible" |
| "input" | InputField | имя элемента |
| "check" | CheckBoxField | имя |
| "label" | LabelDecoration | имя (текст задаётся через title) |
| "labelField" | LabelField | имя |
| "table" | Table | имя |
| "pages" | Pages | имя |
| "page" | Page | имя |
| "button" | Button | имя |
| "picture" | PictureDecoration | имя |
| "picField" | PictureField | имя |
| "calendar" | CalendarField | имя |
| "cmdBar" | CommandBar | имя |
| "popup" | Popup | имя |
Общие свойства (все типы элементов)
| Ключ | Описание |
|------|----------|
| name | Переопределить имя (по умолчанию = значение ключа типа) |
| title | Заголовок элемента |
| visible: false | Скрыть (синоним: hidden: true) |
| enabled: false | Сделать недоступным (синоним: disabled: true) |
| readOnly: true | Только чтение |
| on: [...] | События с автоименованием обработчиков |
| handlers: {...} | Явное задание имён обработчиков: {"OnChange": "МоёИмя"} |
Допустимые имена событий (on)
Компилятор предупреждает о неизвестных событиях. Имена регистрозависимы — используйте точно как указано.
Форма (events): OnCreateAtServer, OnOpen, BeforeClose, OnClose, NotificationProcessing, ChoiceProcessing, OnReadAtServer, BeforeWriteAtServer, OnWriteAtServer, AfterWriteAtServer, BeforeWrite, AfterWrite, FillCheckProcessingAtServer, BeforeLoadDataFromSettingsAtServer, OnLoadDataFromSettingsAtServer, ExternalEvent, Opening
input / picField: OnChange, StartChoice, ChoiceProcessing, AutoComplete, TextEditEnd, Clearing, Creating, EditTextChange
check: OnChange
table: OnStartEdit, OnEditEnd, OnChange, Selection, ValueChoice, BeforeAddRow, BeforeDeleteRow, AfterDeleteRow, BeforeRowChange, BeforeEditEnd, OnActivateRow, OnActivateCell, Drag, DragStart, DragCheck, DragEnd
label / picture: Click, URLProcessing
labelField: OnChange, StartChoice, ChoiceProcessing, Click, URLProcessing, Clearing
button: Click
pages: OnCurrentPageChange
Поле ввода (input)
| Ключ | Описание | Пример |
|------|----------|--------|
| path | DataPath — привязка к данным | "Объект.Организация" |
| titleLocation | Размещение заголовка | "none", "left", "top" |
| multiLine: true | Многострочное поле | текстовое поле, комментарий |
| passwordMode: true | Режим пароля (звёздочки) | поле ввода пароля |
| choiceButton: true | Кнопка выбора ("...") | ссылочное поле |
| clearButton: true | Кнопка очистки ("X") | |
| spinButton: true | Кнопка прокрутки | числовые поля |
| dropListButton: true | Кнопка выпадающего списка | |
| markIncomplete: true | Пометка незаполненного | обязательные поля |
| skipOnInput: true | Пропускать при обходе Tab | |
| inputHint | Подсказка в пустом поле | "Введите наименование..." |
| width / height | Размер | числа |
| autoMaxWidth: false | Отключить авто-ширину | для фиксированных полей |
| horizontalStretch: true | Растягивать по ширине | |
Чекбокс (check)
| Ключ | Описание |
|------|----------|
| path | DataPath |
| titleLocation | Размещение заголовка |
Надпись-декорация (label)
| Ключ | Описание |
|------|----------|
| title | Текст надписи (обязательно) |
| hyperlink: true | Сделать ссылкой |
| width / height | Размер |
Группа (group)
Значение ключа задаёт ориентацию: "horizontal", "vertical", "alwaysHorizontal", "alwaysVertical", "collapsible".
| Ключ | Описание |
|------|----------|
| showTitle: true | Показывать заголовок группы |
| united: false | Не объединять рамку |
| representation | "none", "normal", "weak", "strong" |
| children: [...] | Вложенные элементы |
Таблица (table)
Важно: таблица требует связанный реквизит формы типа ValueTable с колонками (см. раздел "Связки").
| Ключ | Описание |
|------|----------|
| path | DataPath (привязка к реквизиту-таблице) |
| columns: [...] | Колонки — массив элементов (обычно input) |
| changeRowSet: true | Разрешить добавление/удаление строк |
| changeRowOrder: true | Разрешить перемещение строк |
| height | Высота в строках таблицы |
| header: false | Скрыть шапку |
| footer: true | Показать подвал |
| commandBarLocation | "None", "Top", "Auto" |
| searchStringLocation | "None", "Top", "Auto" |
Страницы (pages + page)
| Ключ (pages) | Описание |
|------|----------|
| pagesRepresentation | "None", "TabsOnTop", "TabsOnBottom" и др. |
| children: [...] | Массив page |
| Ключ (page) | Описание |
|------|----------|
| title | Заголовок вкладки |
| group | Ориентация внутри страницы |
| children: [...] | Содержимое страницы |
Кнопка (button)
| Ключ | Описание |
|------|----------|
| command | Имя команды формы → Form.Command.Имя |
| stdCommand | Стандартная команда: "Close" → Form.StandardCommand.Close; с точкой: "Товары.Add" → Form.Item.Товары.StandardCommand.Add |
| defaultButton: true | Кнопка по умолчанию |
| type | "usual", "hyperlink", "commandBar" |
| picture | Картинка кнопки |
| representation | "Auto", "Text", "Picture", "PictureAndText" |
| locationInCommandBar | "Auto", "InCommandBar", "InAdditionalSubmenu" |
Командная панель (cmdBar)
| Ключ | Описание |
|------|----------|
| autofill: true | Автозаполнение стандартными командами |
| children: [...] | Кнопки панели |
Выпадающее меню (popup)
| Ключ | Описание |
|------|----------|
| title | Заголовок подменю |
| children: [...] | Кнопки подменю |
Используется внутри cmdBar для группировки кнопок в подменю:
{ "cmdBar": "Панель", "children": [
{ "popup": "Добавить", "title": "Добавить", "children": [
{ "button": "ДобавитьСтроку", "stdCommand": "Товары.Add" },
{ "button": "ДобавитьИзДокумента", "command": "ДобавитьИзДокумента", "title": "Из документа" }
]}
]}
Реквизиты (attributes)
{ "name": "Объект", "type": "DataProcessorObject.Загрузка", "main": true }
{ "name": "Итого", "type": "decimal(15,2)" }
{ "name": "Таблица", "type": "ValueTable", "columns": [
{ "name": "Номенклатура", "type": "CatalogRef.Номенклатура" },
{ "name": "Количество", "type": "decimal(10,3)" }
]}
savedData: true— сохраняемые данные
Команды (commands)
{ "name": "Загрузить", "action": "ЗагрузитьОбработка", "shortcut": "Ctrl+Enter" }
title— заголовок (если отличается от name)picture— картинка команды
Система типов
| DSL | XML |
|------------------------|----------------------------------------|
| "string" / "string(100)" | xs:string + StringQualifiers |
| "decimal(15,2)" | xs:decimal + NumberQualifiers |
| "decimal(10,0,nonneg)" | с AllowedSign=Nonnegative |
| "boolean" | xs:boolean |
| "date" / "dateTime" / "time" | xs:dateTime + DateFractions |
| "CatalogRef.XXX" | cfg:CatalogRef.XXX |
| "DocumentRef.XXX" | cfg:DocumentRef.XXX |
| "ValueTable" | v8:ValueTable |
| "ValueList" | v8:ValueListType |
| "Type1 \| Type2" | составной тип |
Связки: элемент + реквизит
Таблица и некоторые поля требуют связанный реквизит. Элемент ссылается на реквизит через path.
Таблица — элемент table + реквизит ValueTable:
{
"elements": [
{ "table": "Товары", "path": "Объект.Товары", "columns": [
{ "input": "Номенклатура", "path": "Объект.Товары.Номенклатура" }
]}
],
"attributes": [
{ "name": "Объект", "type": "DataProcessorObject.Загрузка", "main": true,
"columns": [
{ "name": "Товары", "type": "ValueTable", "columns": [
{ "name": "Номенклатура", "type": "CatalogRef.Номенклатура" }
]}
]
}
]
}
Или, если таблица привязана к реквизиту формы (не к Объект):
{
"elements": [
{ "table": "ТаблицаДанных", "path": "ТаблицаДанных", "columns": [
{ "input": "Наименование", "path": "ТаблицаДанных.Наименование" }
]}
],
"attributes": [
{ "name": "ТаблицаДанных", "type": "ValueTable", "columns": [
{ "name": "Наименование", "type": "string(150)" }
]}
]
}
Паттерны
Диалог загрузки файла
{
"title": "Загрузка из файла",
"properties": { "autoTitle": false },
"events": { "OnCreateAtServer": "ПриСозданииНаСервере" },
"elements": [
{ "group": "horizontal", "name": "ГруппаФайл", "children": [
{ "input": "ИмяФайла", "path": "ИмяФайла", "title": "Файл", "inputHint": "Выберите файл...", "choiceButton": true, "on": ["StartChoice"] },
{ "check": "ПерваяСтрокаЗаголовок", "path": "ПерваяСтрокаЗаголовок" }
]},
{ "input": "Результат", "path": "Результат", "multiLine": true, "height": 8, "readOnly": true, "title": "Лог" },
{ "group": "horizontal", "name": "ГруппаКнопок", "children": [
{ "button": "Загрузить", "command": "Загрузить", "defaultButton": true },
{ "button": "Закрыть", "stdCommand": "Close" }
]}
],
"attributes": [
{ "name": "Объект", "type": "ExternalDataProcessorObject.ЗагрузкаИзФайла", "main": true },
{ "name": "ИмяФайла", "type": "string" },
{ "name": "ПерваяСтрокаЗаголовок", "type": "boolean" },
{ "name": "Результат", "type": "string" }
],
"commands": [
{ "name": "Загрузить", "action": "ЗагрузитьОбработка", "shortcut": "Ctrl+Enter" }
]
}
Мастер (wizard) с шагами
{
"title": "Мастер настройки",
"properties": { "autoTitle": false },
"elements": [
{ "pages": "СтраницыМастера", "pagesRepresentation": "None", "children": [
{ "page": "Шаг1", "title": "Параметры", "children": [
{ "input": "Параметр1", "path": "Параметр1" }
]},
{ "page": "Шаг2", "title": "Результат", "children": [
{ "input": "Итог", "path": "Итог", "readOnly": true }
]}
]},
{ "group": "horizontal", "name": "Навигация", "children": [
{ "button": "Назад", "command": "Назад", "title": "< Назад" },
{ "button": "Далее", "command": "Далее", "title": "Далее >" }
]}
],
"attributes": [
{ "name": "Объект", "type": "ExternalDataProcessorObject.Мастер", "main": true },
{ "name": "Параметр1", "type": "string" },
{ "name": "Итог", "type": "string" }
],
"commands": [
{ "name": "Назад", "action": "НазадОбработка" },
{ "name": "Далее", "action": "ДалееОбработка" }
]
}
Список с фильтром и таблицей
{
"title": "Просмотр данных",
"elements": [
{ "group": "horizontal", "name": "Фильтр", "children": [
{ "input": "Период", "path": "Период", "on": ["OnChange"] },
{ "input": "Организация", "path": "Организация", "on": ["OnChange"] }
]},
{ "table": "Данные", "path": "Данные", "changeRowSet": true, "columns": [
{ "input": "Дата", "path": "Данные.Дата" },
{ "input": "Сумма", "path": "Данные.Сумма" },
{ "input": "Комментарий", "path": "Данные.Комментарий" }
]}
],
"attributes": [
{ "name": "Объект", "type": "ExternalDataProcessorObject.Просмотр", "main": true },
{ "name": "Период", "type": "date" },
{ "name": "Организация", "type": "string" },
{ "name": "Данные", "type": "ValueTable", "columns": [
{ "name": "Дата", "type": "date" },
{ "name": "Сумма", "type": "decimal(15,2)" },
{ "name": "Комментарий", "type": "string(200)" }
]}
]
}
Автогенерация
- Companion-элементы: ContextMenu, ExtendedTooltip и др. создаются автоматически
- Обработчики событий:
"on": ["OnChange"]→ОрганизацияПриИзменении - Namespace: все 17 namespace-деклараций
- ID: последовательная нумерация, AutoCommandBar = id="-1"
- Unknown keys: выводится предупреждение о нераспознанных ключах
Верификация
/form-validate <OutputPath> — проверка корректности XML
/form-info <OutputPath> — визуальная сводка структуры
Особенности для внешних обработок (EPF)
- Тип главного реквизита:
ExternalDataProcessorObject.ИмяОбработки(неDataProcessorObject) - DataPath: используйте реквизиты формы (
ИмяРеквизита), а неОбъект.ИмяРеквизита— у внешних обработок нет реквизитов объекта в метаданных - Ссылочные типы:
CatalogRef.XXX,DocumentRef.XXXдопустимы в XML, но для сборки EPF потребуется база с целевой конфигурацией (см./epf-build)
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/1c-form-compilation-from-json-dsl-mm78nnjy/download' --output '.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy/SKILL.md.part' && mv '.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy/SKILL.md.part' '.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy/SKILL.md' && test -s '.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/form-compile' && cp -R '.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy' '.claude/skills/form-compile'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy'openskills read '1c-form-compilation-from-json-dsl-mm78nnjy'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/1c-form-compilation-from-json-dsl-mm78nnjy/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.