Skip to main content
skill CX Codex

xdto-edit — Claude Code skill: 1C XDTO package editor

xdto-edit is a Claude Code skill that edits types and properties in 1C XDTO packages. It makes targeted changes without rewriting the entire schema.

MIT 36 installs ★ 811 updated 2026-10-23

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add Nikolay-Shirokov/cc-1c-skills
/plugin install 1c-skills@cc-1c-skills
Open on GitHub

What xdto-edit does

Instead of reading and rewriting the whole XML package, the skill changes a single element — type, property, enum or namespace. For large packages like EnterpriseData (around a megabyte), this is the only practical way.

Operations: add-property, replace-property, remove-property, add-type, remove-type, add-enum, add-import, rename, set-namespace. Content is described with XSD fragments — the same language as /xdto-compile. Multi-line fragments can be passed via file using -Value "@frag.xsd". After editing, /xdto-validate runs automatically.

Requires PowerShell. Addressing via dot notation: Type.Property, path continues into inline types (PaymentDocument.DateDebited.PaymentId). Renaming a package via rename updates the name in metadata object, <Name>.xml file, directory and registration in Configuration.xml. Changing namespace via set-namespace modifies targetNamespace and internal references but leaves importing packages untouched — you must fix their imports manually.

What it helps with

  • add a property to an XDTO type without reading the entire package
  • rename a 1C XDTO package and update registration
  • change XDTO package namespace
  • remove an enum value or type from a schema
  • modify string length restriction in an XDTO property

Example prompts for the agent

  • Add a Comment property of type xs:string to the Payment type in package DataExchange/Package.bin
  • Remove properties Payment.Draft and Payment.FormatVersion from package Ext/EnterpriseData.xml
  • Rename XDTO package ClientExchange to BankExchange

How to install xdto-edit

1Plugin marketplace

/plugin marketplace add Nikolay-Shirokov/cc-1c-skills
/plugin install 1c-skills@cc-1c-skills

This installs the whole 1c-skills plugin with all its skills

2Skills CLI (Vercel)

npx skills add Nikolay-Shirokov/cc-1c-skills --skill xdto-edit -a claude-code

3Manually: put the files in place

~/.claude/skills/xdto-edit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/xdto-edit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about xdto-edit

How to install xdto-edit in Claude Code?

Run /plugin marketplace add Nikolay-Shirokov/cc-1c-skills, then /plugin install 1c-skills@cc-1c-skills. The skill activates automatically.

What does xdto-edit do?

Surgically edits 1C XDTO packages: adds, removes or modifies types, properties, enum values and namespaces without rewriting the entire schema. For large packages, this is faster and safer than full decompilation.

How do I change string length restriction in an XDTO property?

Use the replace-property operation with a new declaration where an inline <xs:simpleType> contains <xs:restriction> and <xs:maxLength>. Facets are only set via inline types; there are no separate parameters.

Source text

SKILL.md · MIT
---
name: xdto-edit
description: Точечное редактирование пакета XDTO 1С. Используй когда нужно добавить, изменить или удалить тип или свойство в существующем пакете, переименовать пакет, сменить пространство имён
argument-hint: <PackagePath> -Operation <операция> [-Target <путь>] [-Value <значение>] [-NoValidate]
allowed-tools:
  - Bash
  - Read
  - Glob
---

# /xdto-edit — Точечное редактирование пакета XDTO

Меняет один элемент пакета, не требуя читать и переписывать всю схему — для больших
пакетов (`EnterpriseData` — около мегабайта) это единственный практичный путь.

Если нужно переработать схему целиком или сперва разобраться, как она устроена, —
`/xdto-decompile` → правка XSD → `/xdto-compile -Force`.

## Параметры

| Параметр | Обязательный | Описание |
|----------|--------------|----------|
| `PackagePath` | да | Каталог пакета, `Ext/Package.bin` или `<Имя>.xml`. Псевдоним — `-Path` |
| `Operation` | да | Операция из таблицы ниже |
| `Target` | зависит | Адрес: имя типа или путь `Тип.Свойство` |
| `Value` | зависит | Фрагмент XSD, литерал, URI или текст. `@путь` — взять содержимое из файла |
| `NoValidate` | нет | Не запускать `xdto-validate` после правки |

```powershell
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-edit.ps1" -PackagePath "<путь>" -Operation <op> -Target "<адрес>" -Value "<значение>"
```

## Операции

| Операция | `-Target` | `-Value` |
|---|---|---|
| `add-property` | имя типа | `<xs:element>` или `<xs:attribute>` |
| `replace-property` | `Тип.Свойство` | новое объявление целиком |
| `remove-property` | `Тип.Свойство` | — |
| `add-type` | — | `<xs:complexType>` или `<xs:simpleType>` |
| `remove-type` | имя типа | — |
| `add-enum` | имя типа значения | литерал |
| `add-import` | — | URI пространства имён |
| `rename` | — | новое имя объекта метаданных |
| `set-synonym` | — | синоним |
| `set-comment` | — | комментарий |
| `set-namespace` | — | новый URI пространства имён |

Батч через `;;` там, где перечисление осмысленно: `remove-property`, `remove-type`,
`add-enum`, `add-import`.

```powershell
... -Operation add-property -Target "Платёж" -Value '<xs:element name="Комментарий" type="xs:string" minOccurs="0"/>'
... -Operation remove-property -Target "Платёж.Комментарий ;; Платёж.Черновик"
... -Operation add-enum -Target "ВидДокумента" -Value "Инкассо ;; Аккредитив"
... -Operation rename -Value ОбменСБанком
```

Содержимое всегда описывается фрагментом XML-схемы — тем же языком, что и в
`/xdto-compile`. Отдельных параметров вида `-MinOccurs` нет: чтобы поменять свойство,
дай его новое объявление целиком через `replace-property`.

Ограничение длины и прочие фасеты задаются вложенным типом:

```xml
<xs:element name="Комментарий" minOccurs="0">
    <xs:simpleType>
        <xs:restriction base="xs:string"><xs:maxLength value="200"/></xs:restriction>
    </xs:simpleType>
</xs:element>
```

Многострочный фрагмент передавай файлом: `-Value "@frag.xsd"`. Инлайн через оболочку
надёжен только для однострочных фрагментов без вложенных кавычек.

## Адресация

Путь `Тип.Свойство`. Точка безопасна: имена типов и свойств — идентификаторы 1С.
Путь продолжается внутрь встроенных типов: `ПлатежныйДокумент.ДатаСписано.ИдПлатежа`.

Посмотреть, что есть в пакете и как называется нужный тип, — `/xdto-info`.
Перед правкой типа полезно `/xdto-info -Mode used-by -Name <Тип>`: покажет,
кого затронет изменение.

## Что тянет за собой переименование и смена namespace

`rename` меняет имя в объекте метаданных, переименовывает файл `<Имя>.xml` и каталог
`<Имя>/`, правит регистрацию в `Configuration.xml`. Новое имя проверяется на
допустимость как идентификатор 1С и на занятость.

`set-namespace` меняет `targetNamespace`, все внутренние ссылки на собственные типы
и `<Namespace>` объекта метаданных. Пакеты, импортирующие старое пространство имён,
**не изменяются** — при версионировании они и должны продолжать смотреть на прежнее.
Навык их перечислит; если правка не версионная, поправь их импорты сам.

После правки автоматически запускается `/xdto-validate` — отключается через `-NoValidate`.

## Типичный workflow

1. `/xdto-info <пакет>` — найти нужный тип
2. `/xdto-info <пакет> -Mode used-by -Name <Тип>` — если меняешь существующее
3. `/xdto-edit <пакет> -Operation <op> …`
4. `/db-load-xml` + `/db-update`

© Nikolay Shirokov · MIT · Nikolay-Shirokov/cc-1c-skills

Similar skills

Everything for 1C →

From the same set81

The whole set →
db-dump-dt Exports a full 1C infobase into a DT file. Run it with /db-dump-dt to pull configuration, data, users, and settings in one snapshot. CX Codex +1 38installs xdto-decompile xdto-decompile is a Claude Code skill that exports a 1C XDTO package as an editable XML Schema (XSD). It runs for full schema rewrites, package migration, or sharing a schema with a business partner. CX Codex +1 37installs db-load-dt db-load-dt restores a 1C information base from a DT file, including its configuration and data. Use it when an existing base must be replaced. CX Codex +1 37installs xdto-validate xdto-validate is a Claude Code skill that statically checks 1C XDTO packages before they are applied to a configuration, finding unresolved types and broken metadata relations. CX Codex +1 36installs xdto-compile xdto-compile builds a 1C XDTO package from an XSD and writes it into configuration sources. Use it for data exchange, integrations, or web services. CX Codex +1 36installs meta-decompile meta-decompile reads a 1C metadata object XML and emits a compact JSON draft in the meta-compile format. Useful when a new object is easier to build from an existing one than to write from scratch. CX Codex +1 36installs xdto-info xdto-info inspects 1C XDTO packages, types, properties, and entry points. Use it before creating an XDTO object or parsing incoming XML. CX Codex +1 35installs db-repo The db-repo skill manages a 1C configuration repository: it locks objects, pulls updates, and commits changes. Use it from Claude Code or Codex. CX Codex +1 30installs

Project sponsors

Companies that keep this analytics open