framework_eng/skills/tool-usage/platform-data/xml-generation/meta-operations/SKILL.md
Use for creating and editing 1С metadata objects (23 types: catalogs, documents, registers, enumerations, etc.) via xml-gen meta. Helps add attributes, tabular sections, dimensions, and validate configuration objects.
npx skillsauth add steelmorgan/1c-agent-based-dev-framework meta-operationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Trigger | Action |
|---------|----------|
| Create a catalog/document/register | meta compile meta.json <output_dir> |
| View object structure | meta info <objectPath> |
| Add an attribute/tabular section/dimension | meta edit <objectPath> --op add-attribute "Name: Type" |
| Validate a metadata object | meta validate <objectPath> |
| Remove an object from the configuration | meta remove <configDir> Type.Name |
| Category | Types | |-----------|------| | Reference | Catalog, Document, Enum, ChartOfCharacteristicTypes, ChartOfAccounts, ChartOfCalculationTypes, ExchangePlan | | Registers | InformationRegister, AccumulationRegister, AccountingRegister, CalculationRegister | | Processes | BusinessProcess, Task | | Service | HTTPService, WebService | | Other | Constant, DefinedType, CommonModule, Report, DataProcessor, ScheduledJob, DocumentJournal, EventSubscription |
xml-gen meta compile <meta.json> <output_dir>
JSON DSL:
{
"type": "Catalog",
"name": "Товары",
"codeLength": 9,
"descriptionLength": 150,
"hierarchical": true,
"attributes": [
"Артикул: String(50)",
"Цена: Number(15,2)",
"Производитель: CatalogRef.Контрагенты"
],
"tabularSections": [
{ "name": "Штрихкоды", "attributes": ["Штрихкод: String(13)"] }
]
}
Full Catalog properties: hierarchical, hierarchyType (HierarchyFoldersAndItems|HierarchyItemsOnly), limitLevelCount, levelCount, foldersOnTop, codeLength, codeType (String|Number), codeAllowedLength (Variable|Fixed), codeSeries (WholeCatalog|WithinOwnerSubordination|WithinSubordination), descriptionLength, autonumbering, checkUnique, defaultPresentation (AsDescription|AsCode), subordinationUse (ToItems|ToFolders|ToFoldersAndItems), quickChoice, choiceMode (BothWays|FromChoiceForm|QuickChoice), editType (InDialog|InList|BothWays), owners (array of strings, e.g. ["Catalog.Counterparties"]).
Attribute flag multiLine - makes a string field multiline (<MultiLine>true</MultiLine>). In shorthand: "Описание: String(500) | multiline".
xml-gen meta info [--mode brief|overview|full] <objectPath>
xml-gen meta edit <objectPath> --op <operation> "<value>"
Operations: add-attribute / add-dimension / add-resource / add-ts / add-ts-attribute / add-enumValue / add-form / add-template / add-command / remove-attribute / remove-ts / remove-enumValue / modify-attribute / add-property / modify-property
Shorthand format:
ИмяРеквизита: ТипДанных | флаги >> after/before Якорь
Examples: "ItemCode: String(50)", "Amount: Number(15,2) | nonneg", "Counterparty: CatalogRef.Counterparties | indexing"
Predefined data:
# Простой shorthand, батч через ;;
xml-gen meta edit src/xml/Catalogs/Товары.xml --op add-predefined \
--value "Основной|Основной элемент|000000001;;Группа|Группа||folder"
# Полное JSON-дерево элементов, включая пустой Code, ChildItems и поля планов
xml-gen meta edit src/xml/ChartsOfAccounts/Основной.xml --op add-predefined \
--value @predefined-items.json
add-predefined supports Catalog, ChartOfAccounts, ChartOfCalculationTypes, ChartOfCharacteristicTypes. In shorthand format: Name[|Description[|Code[|folder]]]; an explicitly empty third field (Name|Description|) creates <Code/>, and a missing third field generates the next code. The JSON file can be an array or an object { "items": [...] }; item fields: name, code, description, isFolder, childItems, types, accountType, offBalance, order, accountingFlags, extDimensionTypes, actionPeriodIsBase, displaced.
Exchange plan contents:
xml-gen meta edit src/xml/ExchangePlans/РИБ.xml --op add-exchange-content \
--value "Catalog.Товары|Deny;;Document.Заказ|Allow"
xml-gen meta edit src/xml/ExchangePlans/РИБ.xml --op add-exchange-content \
--value @exchange-content-items.json
add-exchange-content supports only ExchangePlan objects. Shorthand format: Metadata[|AutoRecord]; if AutoRecord is not specified, Deny is used. The JSON can be an array or an object { "items": [...] } with metadata and autoRecord fields.
~40 checks: XML structure, UUID, Properties, boolean properties, type-specific rules (22 types), strict enum validation (HierarchyType, SubordinationUse, ChoiceMode, EditType, CodeAllowedLength, CodeSeries, NumberAllowedLength, RegisterRecordsDeletion, RegisterRecordsWritingOnPost, Periodicity, RequireCalculationTypes, etc.), file structure.
xml-gen meta validate <objectPath>
Compilation invariants:
FillFromFillingValue / FillValue / DataHistory - only for InformationRegister attributes; for other registers they trigger an XSD error on load.Ref, Code, Description, Parent, Owner, IsFolder, DeletionMark, PostingMode, DataVersion, Predefined, PredefinedDataName, Posted, Date, Number (and the Russian equivalents: Ссылка, Код, Наименование, Родитель, Владелец, ЭтоГруппа, ПометкаУдаления, РежимПроведения, ВерсияДанных, Предопределенный, ИмяПредопределенныхДанных, Проведен, Дата, Номер).xml-gen meta remove <configDir> <Type.Name> [--dry-run] [--keep-files] [--force]
Algorithm: file search -> checking references in XML/BSL -> removing from Configuration.xml ChildObjects -> removing from subsystems -> deleting files.
In shorthand: Справочник -> Catalog, Документ -> Document, Перечисление -> Enum, РегистрСведений -> InformationRegister, etc.
# Один объект
xml-gen meta edit <objectPath> --batch patch.json
# Мультиобъектный патч (ObjectPath внутри JSON)
xml-gen meta edit --batch multi-patch.json
Use this when: multiple operations of different types need to be applied to one object in a single call, the agent is generating patches, reproducible schema migrations.
Inline batch via ;;:
xml-gen meta edit <objectPath> --op add-attribute "Цена: Number(15,2) ;; Вес: Number(10,3) | nonneg"
Detailed specification, full JSON structure, positional insertion, multi-object patches - references/batch-patch.md.
Status:
--batch <file.json>and inline;;are implemented inxml-gen(Java, transactional).
testing
MUST use BEFORE making a judgment about the cause of a conflict, a test failure, or an artifact dispute. Defines the end-to-end verification method L1→L6 and the classification of the first broken link.
development
MUST use AFTER a work cycle with ≥2 iterations (wrote → error → fixed → success). Provides the retrospective procedure and the format for recording practice/anti-patterns in references/learned-patterns.md or {project}/.context/learned-patterns.md.
tools
MUST use WHEN you are writing reusable knowledge into RLM (pattern / architectural decision / stable domain fact) OR reading it before a non-trivial task/solution in the domain. Provides the breakdown of native-push vs RLM-pull, tools for writing and reading RLM, H-MEM levels, and hygiene.
testing
MUST use WHEN the task is classified as simple (< 20 lines, 1 file, no new metadata objects, no architectural decisions). Provides a short cycle of 3 steps with a guard on the self path and mandatory verify.