SuperAPI AI Directory

meta-edit

General & other

View repository

Updated 10-15 17:18

About this skill

/meta-edit — precise editing of 1C metadata

Atomic operations for modifying existing XML metadata objects.

Command

Inline mode (simple operations)

powershell.exe -NoProfile -File .claude/skills/meta-edit/scripts/meta-edit.ps1 -ObjectPath "<path>" -Operation <op> -Value "<val>"

JSON mode (complex/combined)

powershell.exe -NoProfile -File .claude/skills/meta-edit/scripts/meta-edit.ps1 -DefinitionFile "<json>" -ObjectPath "<path>"
Parameter Description
ObjectPath XML file or object directory (required, auto-resolve <dirName>.xml)
Operation Inline operation (alternative to DefinitionFile)
Value Value for the inline operation
DefinitionFile JSON file with operations (alternative to Operation)
NoValidate Do not run meta-validate after editing

Operations — summary table

Batch via ;; in all operations. Detailed syntax — in the files at the links.

Child elements — child-operations.md

Operation Value format Example
add-attribute Имя: Тип | флаги "Сумма: Число(15,2) | req, index"
add-ts ТЧ: Рекв1: Тип1, Рекв2: Тип2 "Товары: Ном: CatalogRef.Ном, Кол: Число(15,3)"
add-dimension Имя: Тип | флаги "Организация: CatalogRef.Организации | master"
add-resource Имя: Тип "Сумма: Число(15,2)"
add-enumValue Имя "Значение1 ;; Значение2"
add-column Имя: Тип "Тип: EnumRef.ТипыДокументов"
add-form / add-template / add-command Имя "ФормаЭлемента"
add-ts-attribute ТЧ.Имя: Тип "Товары.Скидка: Число(15,2)"
remove-* Имя "СтарыйРеквизит ;; ЕщёОдин"
remove-ts-attribute ТЧ.Имя "Товары.УстаревшийРекв"
modify-attribute Имя: ключ=значение "СтароеИмя: name=НовоеИмя, type=Строка(500)"
modify-ts-attribute ТЧ.Имя: ключ=значение "Товары.Рекв: name=НовоеИмя"
modify-ts ТЧ: ключ=значение "Товары: synonym=Товарный состав"

Positional insertion: "Склад: CatalogRef.Склады >> after Организация".

Object properties — properties-reference.md

Operation Value format Example
modify-property Ключ=Значение "CodeLength=11 ;; DescriptionLength=150"
add-owner MetaType.Name "Catalog.Контрагенты ;; Catalog.Организации"
add-registerRecord MetaType.Name "AccumulationRegister.ОстаткиТоваров"
add-basedOn MetaType.Name "Document.ЗаказКлиента"
add-inputByString Путь поля "StandardAttribute.Description"
set-owners / set-registerRecords / set-basedOn / set-inputByString Replacing the entire list "Catalog.Орг ;; Catalog.Контр"
remove-owner / remove-registerRecord / ... Removing from the list "Catalog.Контрагенты"

JSON DSL — json-dsl.md

For combined operations (add + remove + modify in one file), synonyms of keys/types, table of supported objects.

Quick examples

# Добавить реквизиты
-Operation add-attribute -Value "Комментарий: Строка(200) ;; Сумма: Число(15,2) | index"

# Добавить ТЧ с реквизитами
-Operation add-ts -Value "Товары: Ном: CatalogRef.Ном | req, Кол: Число(15,3), Цена: Число(15,2)"

# Удалить реквизит
-Operation remove-attribute -Value "УстаревшийРеквизит"

# Переименовать + сменить тип
-Operation modify-attribute -Value "СтароеИмя: name=НовоеИмя, type=Строка(500)"

# Изменить свойства объекта
-Operation modify-property -Value "CodeLength=11 ;; DescriptionLength=150"

# Владельцы справочника
-Operation set-owners -Value "Catalog.Контрагенты ;; Catalog.Организации"

Verification

/meta-validate <ObjectPath>    — валидация после редактирования
/meta-info <ObjectPath>        — визуальная сводка