/form-edit - Редактирование формы

SkillAI & models

This skill teaches your AI to edit managed forms in 1C that already exist. Once it is added, your AI can insert new elements, attributes, and commands into a finished form, so small changes no longer require rebuilding the form. It is meant for cases where only specific parts of a ready-made form need adjusting.

Available today. Use it from your connected AI after setup.

Add the skill, then tell your AI which 1C form you want to change and what elements, attributes, or commands to add to it.

Then ask your AI: use the /form-edit - Редактирование формы skill

What your AI can do with it

  • Add new elements to an existing 1C managed form
  • Add attributes to an existing form
  • Add commands to an existing form
  • Make targeted edits to a finished form instead of recreating it

What this skill tells your AI

The instructions your AI receives, as published by desko77/claude-code-skills-1c in skills/1c-form-edit/SKILL.md and read by ahel’s review.

Добавляет элементы, реквизиты и/или команды в существующий Form.xml. Автоматически выделяет ID из правильного пула, генерирует companion-элементы (ContextMenu, ExtendedTooltip, и др.) и обработчики событий.

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

/form-edit <FormPath> <JsonPath>

Параметры

ПараметрОбязательныйОписание
FormPathдаПуть к существующему Form.xml
JsonPathдаПуть к JSON с описанием добавлений

Команда

powershell.exe -NoProfile -File skills/1c-form-edit/scripts/form-edit.ps1 -FormPath "<путь>" -JsonPath "<путь>"

JSON формат

{
  "into": "ГруппаШапка",
  "after": "Контрагент",
  "elements": [
    { "input": "Склад", "path": "Объект.Склад", "on": ["OnChange"] }
  ],
  "attributes": [
    { "name": "СуммаИтого", "type": "decimal(15,2)" }
  ],
  "commands": [
    { "name": "Рассчитать", "action": "РассчитатьОбработка" }
  ]
}

Расширения (extension-формы)

Для заимствованных форм (с <BaseForm>) автоматически активируется extension-режим: ID начинаются с 1000000+. Доступны дополнительные секции:

{
  "formEvents": [
    { "name": "OnCreateAtServer", "handler": "Расш1_ПриСозданииПосле", "callType": "After" },
    { "name": "OnOpen", "handler": "Расш1_ПриОткрытии", "callType": "Before" }
  ],
  "elementEvents": [
    { "element": "Банк", "name": "OnChange", "handler": "Расш1_БанкПриИзменении", "callType": "Before" }
  ],
  "commands": [
    { "name": "Подбор", "action": "Расш1_ПодборПосле", "callType": "After" },
    { "name": "Запрос", "actions": [
      { "callType": "Before", "handler": "Расш1_ЗапросПеред" },
      { "callType": "After", "handler": "Расш1_ЗапросПосле" }
    ]}
  ],
  "elements": [
    { "input": "Поле", "path": "Объект.Поле", "on": [{ "event": "OnChange", "callType": "After" }] }
  ]
}

Позиционирование элементов

КлючПо умолчаниюОписание
intoкорневой ChildItemsИмя группы/таблицы/страницы, куда вставлять
afterв конецИмя элемента, после которого вставлять

Типы элементов

Те же DSL-ключи, что в /form-compile:

КлючXML тегCompanions
inputInputFieldContextMenu, ExtendedTooltip
checkCheckBoxFieldContextMenu, ExtendedTooltip
labelLabelDecorationContextMenu, ExtendedTooltip
labelFieldLabelFieldContextMenu, ExtendedTooltip
groupUsualGroupExtendedTooltip
tableTableContextMenu, AutoCommandBar, Search*, ViewStatus*
pagesPagesExtendedTooltip
pagePageExtendedTooltip
buttonButtonExtendedTooltip

Группы и таблицы поддерживают children/columns для вложенных элементов.

Кнопки: command и stdCommand

  • "command": "ИмяКоманды"Form.Command.ИмяКоманды
  • "stdCommand": "Close"Form.StandardCommand.Close
  • "stdCommand": "Товары.Add"Form.Item.Товары.StandardCommand.Add (стандартная команда элемента)

Допустимые события (on)

Компилятор предупреждает об ошибках в именах событий. Основные:

  • input: OnChange, StartChoice, ChoiceProcessing, Clearing, AutoComplete, TextEditEnd
  • check: OnChange
  • table: OnStartEdit, OnEditEnd, OnChange, Selection, BeforeAddRow, BeforeDeleteRow, OnActivateRow
  • label/picture: Click, URLProcessing
  • pages: OnCurrentPageChange
  • button: Click

Система типов (для attributes)

string, string(100), decimal(15,2), boolean, date, dateTime, CatalogRef.XXX, DocumentObject.XXX, ValueTable, DynamicList, Type1 | Type2 (составной).

Секции расширений

СекцияНазначение
formEventsСобытия уровня формы с callType (Before/After/Override)
elementEventsСобытия на существующих элементах заимствованной формы
callType на commandscallType на Action команды
callType на oncallType на событиях новых элементов (объектный формат)

Все extension-секции опциональны - без них навык работает как с обычными формами.

Workflow

  1. /form-info - посмотреть текущую структуру формы
  2. Создать JSON с описанием добавлений
  3. /form-edit - добавить в форму
  4. /form-validate - проверить корректность
  5. /form-info - убедиться что добавилось правильно

Signals

GitHub stars
61
Forks
14
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
x-1c-form-edit
Source
github.com/desko77/claude-code-skills-1c