SuperAPI AI Directory

xdto-info

General & other

View repository

Updated 10-15 21:03

About this skill

/xdto-info — Analysis of the XDTO package structure

Shows the type structure in 1C terms: which value type to assign, what is required, where a nested object is needed, which values are allowed. Replaces reading Package.bin or XSD with manual translation xs:decimal → Число и lowerBound="0" → optional.

Parameters

Parameter Required Description
PackagePath yes Package directory or the root of the configuration sources. Alias — -Path
Namespace no Select a package by namespace (when the path is the root of the sources)
Package no Select a package by metadata object name
Name no Type name. Without a selected package, it is searched across the entire configuration
Depth no Depth of expansion of nested objects. Default is 1
RequiredOnly no Keep only required properties — a skeleton for "fill in the required". An optional object goes away together with its contents
Mode no used-by — show who references the type
Limit / Offset no Pagination. Default is 150 lines
OutFile no Write the result to a file (UTF-8 BOM)
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-info.ps1" -PackagePath "<путь>"

What it shows

The entry point is determined by the path: the root of the sources — a list of packages, a package directory — its composition.

Call Result
-PackagePath src all configuration packages: name, number of types, namespace
-PackagePath src/XDTOPackages/ОбменСБанком imports, entry points, type lists
... -Name ПлатежныйДокумент type structure for filling
... -Name ПлатежныйДокумент -Depth 3 the same with expansion of nested objects
... -Mode used-by -Name СуммаТип who references the type, including neighboring packages

When the namespace and type are known, but not the package name

This is most often the case: the namespace and type name are visible in the code or in an XML sample, but what the package is called is not. The call repeats the string you start from:

# ФабрикаXDTO.Тип("urn:1C.ru:ClientBankExchange", "ПлатежныйДокумент")
... -PackagePath src -Namespace "urn:1C.ru:ClientBankExchange" -Name ПлатежныйДокумент

If only the type name is known — specify -Name and the source root: the type will be found across all packages. If there are multiple matches, the skill will show exactly where, so you can refine it.

What is in the output

Properties are shown as they will need to be filled in in the code: the value type — in 1C notation and taking into account the constraints (Строка(6), Число(18,2)), optionality and collections — with flags; for enumerable types, the allowed values are listed. An unmarked property is optional.

The skill explains designations that are not self-evident directly in the output — and only those that appear in it.

Typical workflow

  1. /xdto-info src — which packages exist
  2. /xdto-info src -Namespace "<URI>" — entry points and package types
  3. /xdto-info src -Namespace "<URI>" -Name <Тип> -Depth 2 — structure for the code
  4. Before editing a type: -Mode used-by -Name <Тип> — who will be affected

If you need the XML schema itself rather than a summary, this is /xdto-decompile.