Atomic operations for modifying existing XML metadata objects.
Command
Inline mode (simple operations)
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-edit.ps1" -ObjectPath "<path>" -Operation <op> -Value "<val>"
JSON mode (complex/combined)
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/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 inline operation |
| DefinitionFile | JSON file with operations (alternative to Operation) |
| NoValidate | Do not run validation after editing |
Common operations
Batch via ;; in all operations.
| Operation | Value format | Example |
|---|---|---|
add-attribute |
Имя: Тип | флаги |
"Сумма: Число(15,2) | req, index" |
add-dimension |
Имя: Тип | флаги |
"Организация: CatalogRef.Организации | master" |
add-resource |
Имя: Тип |
"Сумма: Число(15,2)" |
add-column |
Имя: Тип |
"Тип: EnumRef.ТипыДокументов" |
add-ts |
ТЧ: Рекв1: Тип1, Рекв2: Тип2 |
"Товары: Ном: CatalogRef.Ном, Кол: Число(15,3)" |
add-ts-attribute |
ТЧ.Имя: Тип |
"Товары.Скидка: Число(15,2)" |
remove-* |
Имя |
"СтарыйРеквизит ;; ЕщёОдин" |
remove-ts-attribute |
ТЧ.Имя |
"Товары.УстаревшийРекв" |
modify-attribute |
Имя: ключ=значение |
"СтароеИмя: name=НовоеИмя, type=Строка(500)" |
modify-ts-attribute |
ТЧ.Имя: ключ=значение |
"Товары.Рекв: name=НовоеИмя" |
modify-ts |
ТЧ: ключ=значение |
"Товары: synonym=Товарный состав" |
modify-property |
Ключ=Значение |
"CodeLength=11 ;; DescriptionLength=150" |
Positional insertion: "Склад: CatalogRef.Склады >> after Организация".
Composite type — via +: "Значение: Строка + Число(15,2) + Дата".
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.Организации"
Index: what you edit → file
| What is needed | File |
|---|---|
Attribute, dimension, resource, column: flags, composite types, structural properties (Format, ChoiceParameters, FillValue, …) |
reference/attributes.md |
| Tabular section and its attributes | reference/tabular-sections.md |
| Properties of the object itself, list properties (owners, movements, basis, input by string) | reference/properties.md |
| Predefined items | reference/predefined.md |
| Enum values, commands | reference/other-children.md |
| External data source: fields, tables, functions | reference/external-data-source.md |
| Combined operations in a single JSON, synonyms of keys and types, which children are allowed for an object type | reference/json-dsl.md |
The form is added and deleted by the skill form-add / form-remove, the template — by the skill template-add /
template-remove: besides writing to ChildObjects they have their own files, and meta-edit does not touch them.
Verification
/meta-validate <ObjectPath> — валидация после редактирования
/meta-info <ObjectPath> — визуальная сводка