Form Compile logo

Form Compile

Community
Nikolay-Shirokov
form-compile

Компиляция управляемой формы 1С из JSON-определения или из метаданных объекта. Используй когда нужно создать форму с нуля по описанию элементов или сгенерировать типовую форму

Overview

PublisherNikolay-Shirokov
Repositorycc-1c-skills
Skill nameform-compile
Stars
681
Forks
131
Bundled files
22
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 22 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Nikolay-Shirokov on GitHub. Read the source before you install it.

Installation

Install the Form Compile AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/main/.claude/skills/form-compile
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Nikolay-Shirokov/cc-1c-skills.git /tmp/cc-1c-skills
mkdir -p .claude/skills
cp -r /tmp/cc-1c-skills/.claude/skills/form-compile .claude/skills/form-compile
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Form Compile in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Form Compile on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Form Compile is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/form-compile — Генерация Form.xml

Два режима:

  1. JSON DSL — из JSON-определения формы
  2. From object (-FromObject) — автоматически из метаданных объекта 1С по пресету ERP

При проектировании формы с нуля (5+ элементов или нечёткие требования) — вызовите /form-patterns для загрузки справочника. Для простых форм (1–3 поля) — не нужно.

Параметры

ПараметрОбязательныйОписание
JsonPathрежим 1Путь к JSON-определению формы
OutputPathдаПуть к выходному Form.xml
FromObjectрежим 2Флаг (без значения) — генерация по метаданным объекта

Команда

powershell
# Режим JSON DSL
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-compile.ps1" -JsonPath "<json>" -OutputPath "<Form.xml>"

# Режим from-object (объект и purpose выводятся из OutputPath; Document и Catalog)
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-compile.ps1" -FromObject -OutputPath "<.../TypePlural/ObjectName/Forms/FormName/Ext/Form.xml>"

JSON DSL

Структура

json
{
  "title": "Заголовок формы",
  "properties": { "windowOpeningMode": "LockOwnerWindow" },
  "events": { "OnCreateAtServer": "ПриСозданииНаСервере" },
  "elements": [ ... ],
  "attributes": [ ... ],
  "commands": [ ... ],
  "parameters": [ ... ]
}
  • title — заголовок формы (строка или {ru, en})
  • properties — свойства формы: windowOpeningMode, commandBarLocation, width, height и др. (полный список — references/form-properties.md)
  • events — обработчики событий формы: { "ИмяСобытия": "ИмяПроцедуры" }
  • excludedCommands — убрать стандартные команды формы: ["Reread", "Copy"]

Элементы (ключ определяет тип)

КлючЭлементЗначение ключа
groupОбычная группаориентация: vertical / horizontalIfPossible / alwaysHorizontal
inputПоле вводаимя
checkФлажокимя
radioПереключательимя
labelНадписьимя (текст — в title)
labelFieldПоле-надпись (значение без редактирования)имя
tableТаблицаимя
columnGroupГруппа колонок (внутри columns таблицы)horizontal / vertical / inCell
pages / pageСтраницы / страницаимя
buttonКнопкаимя
buttonGroupГруппа кнопок (в командной панели или подменю)имя
popupПодменюимя
cmdBarКомандная панель в раскладке формыимя
autoCmdBarКомандная панель самой формыимя (обычно ФормаКоманднаяПанель)
pictureКартинкаимя
picFieldПоле-картинкаимя

Табличный документ, HTML, календарь, диаграммы и другие особые поля — по индексу ниже.

Общие свойства элементов

КлючОписание
nameИмя элемента, если отличается от значения ключа типа. Имена в форме уникальны
titleЗаголовок (строка или {ru, en}); "" — без заголовка
tooltipВсплывающая подсказка
visible: false / enabled: false / readOnly: trueСкрыть / сделать недоступным / только чтение
titleLocationnone / left / right / top / bottom / auto
width / heightРазмер
horizontalStretch / verticalStretchРастягивать
autoMaxWidth: falseСнять предел ширины (поле тянется на всю доступную ширину)
eventsОбработчики: { "OnChange": "ИмяОбработчика" }; null вместо имени — имя по шаблону <Элемент><Событие>

События

Имена регистрозависимы.

Форма: OnCreateAtServer, OnOpen, BeforeClose, OnClose, NotificationProcessing, ChoiceProcessing, OnReadAtServer, BeforeWriteAtServer, OnWriteAtServer, AfterWriteAtServer, BeforeWrite, AfterWrite, FillCheckProcessingAtServer, BeforeLoadDataFromSettingsAtServer, OnLoadDataFromSettingsAtServer, ExternalEvent, Opening

input: OnChange, StartChoice, ChoiceProcessing, AutoComplete, TextEditEnd, Clearing, Creating, EditTextChange picField: OnChange, StartChoice, ChoiceProcessing, Click, Clearing check / radio: OnChange table: OnStartEdit, OnEditEnd, OnChange, Selection, ValueChoice, BeforeAddRow, BeforeDeleteRow, AfterDeleteRow, BeforeRowChange, BeforeEditEnd, OnActivateRow, OnActivateCell, Drag, DragStart, DragCheck, DragEnd label: Click, URLProcessing picture: Click labelField: OnChange, StartChoice, ChoiceProcessing, Click, URLProcessing, Clearing button: Click pages: OnCurrentPageChange

Поле ввода (input)

КлючОписание
pathПуть к данным: "Объект.Организация", "ИмяРеквизита"
multiLine: trueМногострочное (комментарий)
choiceButton / clearButton / dropListButtonКнопки выбора, очистки, выпадающего списка
markIncomplete: trueПодсвечивать незаполненное
inputHintПодсказка в пустом поле
skipOnInput: trueПропускать при переходе по Enter/Tab
maxWidthПредел ширины

Список выбора, маска, формат, пароль и другие кнопки — references/input-fields.md.

Флажок (check) и переключатель (radio)

check: path, titleLocation (по умолчанию заголовок справа). Вид «выключатель» или «тумблер» — references/input-fields.md.

radio: path, radioButtonType (Auto / RadioButtons / Tumbler), columnsCount, choiceList:

json
{ "radio": "СпособКурса", "path": "Объект.СпособУстановкиКурса", "radioButtonType": "Tumbler",
  "choiceList": [
    { "value": "Enum.СпособыКурса.EnumValue.Авто",   "presentation": "Автоматически" },
    { "value": "Enum.СпособыКурса.EnumValue.Ручной", "presentation": { "ru": "Вручную", "en": "Manual" } }
  ] }

value — строка, число, булево или значение перечисления "Enum.Тип.EnumValue.Значение"; presentation — текст варианта.

Надпись (label) и поле-надпись (labelField)

label: title — текст (поддерживает разметку, см. references/tooltips-text.md), hyperlink: true — ссылка. labelField: path, hyperlink: true — значение как ссылка.

Группа (group)

КлючОписание
behaviorcollapsible — сворачиваемая, popup — всплывающая; не указан — обычная
showTitle: trueПоказывать заголовок
representationnone / normal / weak / strong — рамка группы
united: falseВыравнивать поля только внутри группы, а не вместе с соседними
childrenВложенные элементы

Свёрнутая при открытии группа, интервалы, заголовок из данных — references/groups-pages.md.

Таблица (table)

Таблица привязывается к реквизиту-таблице (ValueTable, табличная часть объекта, динамический список) — см. «Связка элемент + реквизит».

КлючОписание
pathПуть к реквизиту-таблице
columnsКолонки — элементы (input, check, labelField, picField, columnGroup); путь колонки — путь таблицы плюс имя колонки: Объект.Товары.Сумма, Данные.Сумма
changeRowSet: true / changeRowOrder: trueРазрешить добавлять/удалять / перемещать строки
header: falseБез шапки
heightInTableRowsВысота в строках
commandBarLocationNone / Top / Bottom / Auto
searchStringLocationNone / Top / Bottom / CommandBar / Auto
choiceMode: trueТаблица выбора (форма выбора)

Подвал с итогами, дерево, выделение, закрепление колонок, перетаскивание — references/table-advanced.md.

columnGroup группирует колонки: title, showInHeader, children; inCell — несколько колонок в одной ячейке:

json
{ "table": "Список", "path": "Список", "columns": [
    { "columnGroup": "horizontal", "name": "ГруппаСрок", "title": "Срок", "children": [
        { "input": "ДатаНачала", "path": "Список.ДатаНачала" },
        { "input": "ДатаОкончания", "path": "Список.ДатаОкончания" } ] },
    { "input": "Комментарий", "path": "Список.Комментарий" }
] }

Страницы (pages + page)

pages: pagesRepresentation (TabsOnTop / TabsOnBottom / None — без закладок), children — массив page. page: title, group (ориентация содержимого), children.

Кнопки и командные панели

Ключ (button)Описание
commandКоманда формы → Form.Command.Имя
stdCommandСтандартная: "Close"; с точкой — команда элемента: "Товары.Add"
defaultButton: trueКнопка по умолчанию
typeusual / hyperlink
representationAuto / Text / Picture / PictureAndText
locationInCommandBarInCommandBar / InAdditionalSubmenu

autoCmdBar — командная панель формы, сюда помещают основные действия:

json
{ "autoCmdBar": "ФормаКоманднаяПанель", "children": [
    { "button": "Загрузить", "command": "Загрузить", "defaultButton": true },
    { "popup": "Печать", "title": "Печать", "children": [
        { "button": "ПечатьСчета", "command": "ПечатьСчета" } ] },
    { "buttonGroup": "ГруппаПеремещение", "children": [
        { "button": "Вверх", "command": "Вверх" },
        { "button": "Вниз", "command": "Вниз" } ] }
] }
  • popup — подменю: title, children.
  • buttonGroup — кнопки, объединённые в группу: title, children.
  • cmdBar — отдельная панель в раскладке формы: autofill, children.
  • autoCmdBar: autofill: false — без стандартных команд, horizontalAlign — выравнивание.

Картинки кнопок, кнопки-переключатели, команды таблицы в группе кнопок, своё контекстное меню у элемента — references/buttons-commands.md.

Картинка (picture) и поле-картинка (picField)

picture: src — "StdPicture.X" / "CommonPicture.X", width, height. picField: path; для булева или числа — valuesPicture (иначе значок не рисуется). Подробнее — references/pictures.md.

Реквизиты (attributes)

json
{ "name": "Объект", "type": "DataProcessorObject.Загрузка", "main": true }
{ "name": "Итого", "type": "decimal(15,2)", "title": "Итого" }
{ "name": "Таблица", "type": "ValueTable", "columns": [
    { "name": "Номенклатура", "type": "CatalogRef.Номенклатура" },
    { "name": "Количество", "type": "decimal(10,3)" } ] }
{ "name": "Список", "type": "DynamicList", "main": true,
  "settings": { "mainTable": "Catalog.Номенклатура" } }
  • main: true — основной реквизит формы (объект, набор записей, динамический список)
  • savedData: true — сохраняемые данные (у основного реквизита-объекта ставится само)
  • columns — колонки ValueTable / ValueTree
  • settings — настройки динамического списка (references/dynamic-list.md)

Сохранение в настройках, проверка заполнения, функциональные опции — references/attributes-advanced.md.

Команды (commands) и параметры (parameters)

json
"commands": [ { "name": "Загрузить", "action": "ЗагрузитьОбработка", "title": "Загрузить", "shortcut": "Ctrl+Enter", "picture": "StdPicture.Refresh" } ]
"parameters": [ { "name": "Основание", "type": "DocumentRef.Заказ" } ]

Команды: name, action (процедура-обработчик), title, shortcut, picture. Параметры: name, type, key: true — ключевой.

Система типов

DSLТип
string / string(100)Строка (неограниченная / длины 100)
decimal(15,2) / decimal(10,0,nonneg)Число / неотрицательное
booleanБулево
date / dateTime / timeДата / дата и время / время
CatalogRef.X / DocumentRef.X / EnumRef.X / …Ссылки
CatalogObject.X / DocumentObject.X / DataProcessorObject.X / ReportObject.XОбъекты (основной реквизит)
InformationRegisterRecordSet.X / AccumulationRegisterRecordSet.XНаборы записей
ValueTable / ValueTree / ValueListТаблица / дерево / список значений
DynamicListДинамический список
TypeDescription, UUID, FormattedString, Picture, Color, Font, DataCompositionSettings, StandardPeriod, mxl:SpreadsheetDocumentПлатформенные
Тип1 | Тип2Составной

Также ChartOfAccountsRef/Object, ChartOfCharacteristicTypesRef/Object, ChartOfCalculationTypesRef/Object, ExchangePlanRef/Object, BusinessProcessRef/Object, TaskRef/Object, AccountingRegisterRecordSet, InformationRegisterRecordManager, ConstantsSet. Наборы типов — references/type-system-advanced.md.

FormDataStructure, FormDataCollection, FormDataTree — не типы реквизита (ошибка при загрузке). Вместо них — объектный тип (DocumentObject.X…), ValueTable, ValueTree.

Связка элемент + реквизит

Элемент показывает данные реквизита через path.

Табличная часть основного реквизита — путь Объект.<ТЧ>, колонки — Объект.<ТЧ>.<Реквизит>:

json
{ "table": "Товары", "path": "Объект.Товары", "columns": [
    { "input": "ТоварыНоменклатура", "path": "Объект.Товары.Номенклатура" },
    { "input": "ТоварыКоличество", "path": "Объект.Товары.Количество" } ] }

Таблица на реквизите формы — реквизит ValueTable с колонками:

json
{
  "elements": [
    { "table": "Данные", "path": "Данные", "changeRowSet": true, "columns": [
        { "input": "ДанныеДата", "path": "Данные.Дата" },
        { "input": "ДанныеСумма", "path": "Данные.Сумма" } ] }
  ],
  "attributes": [
    { "name": "Данные", "type": "ValueTable", "columns": [
        { "name": "Дата", "type": "date" },
        { "name": "Сумма", "type": "decimal(15,2)" } ] }
  ]
}

Пример: диалог загрузки

json
{
  "title": "Загрузка из файла",
  "events": { "OnCreateAtServer": "ПриСозданииНаСервере" },
  "elements": [
    { "group": "horizontal", "name": "ГруппаФайл", "children": [
      { "input": "ИмяФайла", "path": "ИмяФайла", "title": "Файл", "inputHint": "Выберите файл...",
        "choiceButton": true, "events": { "StartChoice": "ИмяФайлаНачалоВыбора" } },
      { "check": "ПерваяСтрокаЗаголовок", "path": "ПерваяСтрокаЗаголовок" }
    ]},
    { "input": "Результат", "path": "Результат", "multiLine": true, "height": 8, "readOnly": true, "title": "Лог" },
    { "autoCmdBar": "ФормаКоманднаяПанель", "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" }
  ]
}

Служебные узлы элементов (контекстное меню, расширенная подсказка, панели таблицы) и идентификаторы создаются сами. Неизвестный ключ — предупреждение в выводе.

Задача → справочник

Описанного выше хватает для большинства форм. Под задачу подгрузите файл из references/:

ЗадачаСправочник
Список выбора, быстрый выбор, своя форма выбора, маска, формат числа, пароль, выключатель/тумблер, кнопки открытия и создания, поле составного типаinput-fields.md
Ограничить выбор отбором, связать поле с другим полем, связь по типуchoice-params.md
Свёрнутая группа, интервалы и ширины колонок в группе, заголовок группы или страницы из данных, значок закладки, мастер по шагам (страницы без закладок)groups-pages.md
Итоги в подвале таблицы, дерево, выделение нескольких строк, закрепление колонок, поиск, перетаскивание, убрать стандартные команды таблицыtable-advanced.md
Форма списка: источник данных, запрос, отбор, сортировка, группировка, иерархияdynamic-list.md
Кнопка с картинкой, переключатель в панели, команды таблицы в группе кнопок, своё контекстное меню или панель у поля, команда для текущей строки таблицыbuttons-commands.md
Подсветить цветом, шрифт, рамка, условное оформление (в форме списка — dynamic-list.md)appearance.md
Расширенная подсказка под полем, текст с выделением или ссылкойtooltips-text.md
Картинка, значок в колонке, иконка по значениюpictures.md
Печатная форма или отчёт на форме (табличный документ)spreadsheet.md
HTML, текстовый документ, индикатор, ползунок, календарь, периодspecial-fields.md
Диаграмма, диаграмма Ганта, планировщикcharts.md
Модальность, размер, прокрутка, Enter, свойства формы документа (время, проведение)form-properties.md
Форма отчёта (СКД)report-form.md
Сохранить значение в настройках, проверка заполнения, функциональные опции, тип элементов списка значенийattributes-advanced.md
Видимость и доступ по ролямroles-access.md
Командный интерфейс формы (переходы, важные команды)command-interface.md
Выравнивание, предел размера, фокус по умолчанию, узкие экраныlayout-advanced.md
Наборы и составные типыtype-system-advanced.md

Workflow

  1. Каркас: /form-add создаёт метаданные формы, Module.bsl и регистрирует форму у объекта.
  2. Компиляция: /form-compile наполняет Form.xml.
  3. Проверка: /form-validate, /form-info.

Внешние обработки (EPF)

  • Основной реквизит: ExternalDataProcessorObject.ИмяОбработки (не DataProcessorObject)
  • Пути данных: реквизиты формы (ИмяРеквизита), а не Объект.ИмяРеквизита — у внешней обработки нет реквизитов объекта в метаданных
  • Ссылочные типы (CatalogRef.XXX и т.п.) допустимы, но для сборки EPF нужна база с целевой конфигурацией (см. /epf-build)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Form Compile AI skill do?

Компиляция управляемой формы 1С из JSON-определения или из метаданных объекта. Используй когда нужно создать форму с нуля по описанию элементов или сгенерировать типовую форму

Why use Form Compile on TypingMind?

Because you install it once and use it with any model. Form Compile is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Form Compile in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/main/.claude/skills/form-compile. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Form Compile?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Form Compile?

As many as you like. As long as a model supports skills, you can use Form Compile with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Form Compile AI skill free?

Yes. It is published on GitHub by Nikolay-Shirokov under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇