meta-decompile

Converts 1C metadata object XML into a JSON draft for the meta-compile DSL format.

578|108|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/Nikolay-Shirokov/cc-1c-skills --skill meta-decompile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: meta-decompile
Source: https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/main/.claude/skills/meta-decompile
Command: npx skills add https://github.com/Nikolay-Shirokov/cc-1c-skills --skill meta-decompile

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lxml, and includes scripts (resource) components.

What problem does it solve?

Creating a new 1C:Enterprise metadata object (catalog, document, register, etc.) by hand requires writing a full DSL description from scratch. This Skill reads the XML of an existing metadata object and produces a compact JSON draft in the meta-compile format, so you can use a working object as a template, rename it, adjust its structure, and compile it into a brand-new object.

Core Features & Use Cases

  • XML to DSL draft: Parses a metadata object XML file (e.g. Catalogs/Name.xml) and emits a compact JSON draft with structure and properties, omitting values that match compiler defaults.
  • Wide object type coverage: Supports Catalog, Document, ExchangePlan, ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes, registers, BusinessProcess, Task, Enum, and more.
  • Dual runtime: Ships equivalent PowerShell and Python (lxml) implementations of the decompiler.
  • Use Case: You have a well-designed catalog in your configuration and need a similar one. Decompile it to a JSON draft, change the name and attributes, then compile it with meta-compile into a new object with fresh UUIDs.

Quick Start

Ask the agent to decompile the XML of an existing metadata object, for example: run meta-decompile on Catalogs/Products.xml and save the JSON draft to draft.json.

Frequently Asked Questions about meta-decompile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new 1C metadata object based on an existing one?

Decompile the existing object's XML into a JSON draft with meta-decompile, rename the object and adjust its attributes in the JSON, then compile it with meta-compile. The compiled result is a new object with fresh UUIDs, not a copy of the source.

What 1C object types does meta-decompile support?

It supports Catalog, Document, ExchangePlan, ChartOfCharacteristicTypes, ChartOfAccounts, ChartOfCalculationTypes, InformationRegister, AccumulationRegister, AccountingRegister, CalculationRegister, BusinessProcess, Task, and Enum. Unsupported types or non-MetaDataObject roots exit with code 3.

Does meta-decompile preserve UUIDs, modules, and forms?

No. The JSON draft captures only structure and properties; UUIDs, module bodies, forms, templates, and rights are not exported. Compiling the draft creates a new object with a new identity, so it must never be compiled over the source object.

When should I not use meta-decompile on a 1C object?

Avoid it for point edits of an existing object (use meta-edit instead) and for backup or migration that must preserve references (use the standard 1C XML dump/load). The decompile-compile cycle loses modules, forms, and object identity.

Can I run meta-decompile with Python instead of PowerShell?

Yes. The skill ships both meta-decompile.ps1 for Windows PowerShell and meta-decompile.py, a line-by-line mirror built on lxml. The Python version requires the lxml package for full XPath 1.0 support.