xdto-decompile

Converts 1C XDTO packages into readable XML Schema (XSD) files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

1C XDTO packages are stored in a binary-like Package.bin format that is hard to read, edit, or share. This Skill converts an existing XDTO package into a standard, valid XML Schema (XSD) so you can review the full structure, hand it to a counterparty, or migrate the package to another configuration.

Core Features & Use Cases

  • XDTO to XSD conversion: Reads Ext/Package.bin (accepting a package directory, the Package.bin file, or the metadata .xml path) and emits a valid XML Schema preserving facets, unions, lists, and complex types.
  • Lossless round-trip: Metadata properties (name, synonym, comment) are exported into xs:annotation/xs:appinfo, and XSD-inexpressible details are kept as xdto: mirror attributes, so /xdto-compile -Force can rebuild the package without losses.
  • Use Case: You need to send the exchange schema of the 'ОбменСБанком' package to a bank's integration team. Run the decompile script with -OutFile bank.xsd and share the resulting valid XSD, which unlike the Designer's built-in export preserves nillable on attribute properties.

Quick Start

Ask the AI to decompile the XDTO package at src/XDTOPackages/ОбменСБанком into an XSD schema file.

Frequently Asked Questions about xdto-decompile

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

FAQPage Schema
How do I export a 1C XDTO package to an XSD schema?

Run the xdto-decompile script with -PackagePath pointing to the package directory, its Ext/Package.bin file, or the metadata .xml file. Add -OutFile to write the schema to a UTF-8 file, otherwise the XSD is printed to stdout.

How to migrate an XDTO package to another 1C configuration?

Decompile the package to XSD, change the targetNamespace (and the matching xmlns declaration used as a prefix), then rebuild it with /xdto-compile using -Name for the new package. Name and synonym are set by compile flags, not edited inside the schema.

Does the exported XSD lose data compared to the 1C Designer export?

No. The generated schema is valid and lossless: the Designer's built-in XML schema export loses nillable on attribute properties, while this tool preserves such details as xdto: mirror attributes that validators safely ignore.

What are the xdto: prefixed attributes in the generated schema?

They record details XML Schema cannot express, such as nillable on attributes or explicit variety markers. The schema remains valid since validators ignore unknown attributes, and /xdto-compile uses them to rebuild the package without losses.

When should I use xdto-decompile instead of xdto-edit or xdto-info?

Use decompile when the schema must be changed broadly, studied in full, versioned, or sent to a counterparty. For a single property fix use /xdto-edit, and for a summary of what to assign use /xdto-info.