Reads the XML of a metadata object (Catalogs/Имя.xml etc.) and emits compact JSON in the format /meta-compile. Purpose — take an existing object as an example and assemble a NEW one based on it: decompile → edit → compile under a different name.
⚠️ The main thing: this is NOT a reversible export
Compiling the draft creates a new object with a new identity, not a copy of the original. The JSON does not include: UUIDs (the identity of the object itself and all children), module bodies, forms, templates, rights. Only the structure and properties are captured.
Hence the rule: never compile the draft over the source object and never present it as a "reimport" — the reassembled object has different UUIDs, so all references to the source object (from code, other objects, subsystem composition, predefined data) will break, and the module and form code will be lost.
When to use
Assemble a new object based on an existing example — get a DSL blank of a working object, rename and adapt the composition, compile into a new one. Faster than writing DSL from scratch for a rich object.
When not to use
- Point edit of an existing object (add an attribute, tabular section, property) →
/meta-edit. The decompile→compile cycle is harmful here: it produces an object with a new identity and loses modules/forms. - Save / restore / transfer the same object (backup, migration between configurations while preserving references) → the standard 1C export (
/db-dump-xml↔/db-load-xml, CF), not decompile. - Simply understand the structure of an object (attributes, tabular sections, types) without reassembly →
/meta-info(cheaper, does not create a file).
Parameters
| Parameter | Description |
|---|---|
ObjectPath |
Path to the object's XML (Catalogs/Имя.xml), required |
OutputPath |
Path to the output JSON. If not specified — JSON to stdout |
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-decompile.ps1" -ObjectPath "<Объект.xml>" -OutputPath "<out.json>"
Unsupported object type or non-MetaDataObject root → non-zero exit code and a message to stderr.
Workflow (building a new object from a template)
/meta-decompile <Образец.xml> -OutputPath draft.json— get a blank.- В
draft.jsonchangenameto the new object's name and adapt the composition (attributes/tabular sections/properties). References to other objects (owners, input based on, types) — by name, are preserved as is. /meta-compile -JsonPath draft.json -OutputDir <ConfigDir>— build (the object will get fresh UUIDs)./meta-validate+/meta-info— check.- Modules, forms, templates, rights — add separately (they are not included in the draft).