Skip to main content
skill CX Codex

meta-compile — Claude Code skill: what it does, how to install

Generates 1C metadata XML files and modules from JSON definitions and registers them in Configuration.xml. Useful for scaffolding catalogs, documents, and registers.

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 meta-compile does

The skill accepts a JSON definition for a single entity or an array of entities (catalogs, documents, registers, enums, constants) alongside the 1C configuration dump directory. It generates the required XML files and modules in the dump hierarchy, then registers each new entity inside Configuration.xml. The service file ConfigDumpInfo.xml remains untouched on purpose, as the 1C platform manages it for incremental dumps.

Execution relies on running meta-compile.ps1 via powershell.exe, granting the agent access to Bash, Read, Write, and Glob tools. The JSON schema supports shorthand field signatures like String(100) or CatalogRef.Counterparties, plus property flags such as req for required fields or index for indexing.

Generating metadata fails if PowerShell is unavailable in the execution environment. Once files are generated, the author suggests running /meta-validate to inspect results or /meta-edit to modify existing definitions.

What it helps with

  • scaffold 1C catalogs and documents from shorthand JSON definitions
  • register newly created metadata objects in Configuration.xml
  • generate batches of constants, enums, or registers in a single run
  • define attributes and tabular sections using concise type signatures and flags

Example prompts for the agent

  • Create a catalog named Products with SKU and Barcode attributes via /meta-compile
  • Generate an Invoice document from schema.json into src/config
  • Add an ExchangeRates information register into the configuration dump directory

How to install meta-compile

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 meta-compile -a claude-code

3Manually: put the files in place

~/.claude/skills/meta-compile/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/meta-compile/

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

Questions about meta-compile

How to install meta-compile in Claude Code?

Register the marketplace repository with /plugin marketplace add Nikolay-Shirokov/cc-1c-skills, then install the package using /plugin install 1c-skills@cc-1c-skills.

What does meta-compile do?

It reads a JSON definition of 1C metadata objects, writes the corresponding XML files and modules into the configuration export structure, and registers entries in Configuration.xml.

Why does meta-compile skip ConfigDumpInfo.xml?

ConfigDumpInfo.xml tracks internal object versions and is maintained directly by the 1C platform during incremental dumps, so the script leaves it untouched.

Source text

SKILL.md · MIT
---
name: meta-compile
description: Создать объект метаданных 1С. Используй когда нужно создать или добавить справочник, документ, регистр, перечисление, константу, общий модуль, обработку, отчёт и др.
argument-hint: <JsonPath> <OutputDir>
allowed-tools:
  - Bash
  - Read
  - Write
  - Glob
---

# /meta-compile — генерация объектов метаданных из JSON

Принимает JSON-определение объекта → генерирует XML + модули в структуре выгрузки конфигурации и
регистрирует объект в `Configuration.xml`.

`ConfigDumpInfo.xml` намеренно не трогается: это служебный файл версий объектов, которым управляет
платформа (для инкрементальной выгрузки).

## Порядок работы

1. Составь JSON по синтаксису ниже → запиши во временный файл.
2. Запусти скрипт.
3. Изменить созданный объект — `/meta-edit`; проверить — `/meta-validate`.

```powershell
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-compile.ps1" -JsonPath "<json>" -OutputDir "<ConfigDir>"
```

| Параметр | Описание |
|----------|----------|
| `JsonPath` | Путь к JSON-файлу |
| `OutputDir` | Корень выгрузки конфигурации (где `Configuration.xml`, `Catalogs/`, `Documents/`, …) |

## Формат JSON

**Один объект** `{ ... }` или **массив** объектов `[{ ... }, { ... }]` (batch — несколько объектов за прогон).

```json
{ "type": "Catalog", "name": "Номенклатура", "...свойства типа...": "..." }
```

`type` и `name` — обязательные. Остальное — по типу (см. индекс ниже). `synonym` по умолчанию выводится из
`name` (CamelCase → слова через пробел); можно задать явно строкой или мультиязычно: `"synonym": { "ru": "…", "en": "…" }`.

## Реквизиты (shorthand)

Массивы `attributes`, `dimensions`, `resources` и колонки в `tabularSections` задаются строками:

```
"Имя"                          → String(10)
"Имя: Тип"                     → с типом
"Имя: Тип | req, index"        → с флагами
```

**Типы:** `String(100)`, `String(10, fixed)` (фикс. длина), `Number(15,2)`, `Boolean`, `Date`, `DateTime`,
`Time`, ссылочные `CatalogRef.Xxx` / `DocumentRef.Xxx` / `EnumRef.Xxx` / `DefinedType.Xxx` и т.п.
Составной тип — через `+`: `"Значение: String + Number(15,2) + CatalogRef.Контрагенты"`.

**Флаги** (после `|`, через запятую):

| Флаг | Значение | Где |
|------|----------|-----|
| `req` | обязательное заполнение | attributes, dimensions, resources |
| `index` | индексировать | attributes, dimensions |
| `indexAdditional` | индекс с доп. упорядочиванием | attributes |
| `multiline` | многострочное поле | attributes |
| `nonneg` | неотрицательное (Number) | attributes, resources |
| `master` | ведущее измерение | dimensions (регистры) |
| `mainFilter` | основной отбор | dimensions (регистры) |
| `denyIncomplete` | запрет незаполненных | dimensions |
| `useInTotals` | использовать в итогах | dimensions (регистр накопления) |

Реквизиту нужны свойства сверх shorthand (значение заполнения, параметры выбора, формат, подсказка, …) —
задаётся **объектной формой**, см. `reference/attributes.md`.

## Табличные части

```json
"tabularSections": { "Товары": ["Номенклатура: CatalogRef.Номенклатура", "Количество: Number(15,3)"] }
```

Ключ — имя ТЧ, значение — массив колонок (shorthand) ЛИБО объект со свойствами ТЧ (см. `reference/attributes.md`).

## Индекс: свойства по типам

Для каждого типа — свой reference-файл со свойствами, дефолтами и допустимыми значениями:

| Тип(ы) | Файл |
|--------|------|
| Catalog (справочник) | `reference/catalog.md` |
| Document, DocumentJournal, Sequence, DocumentNumerator | `reference/document.md` |
| InformationRegister, AccumulationRegister, AccountingRegister, CalculationRegister | `reference/registers.md` |
| ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes | `reference/charts.md` |
| ExchangePlan | `reference/exchangeplan.md` |
| BusinessProcess, Task | `reference/process.md` |
| Report, DataProcessor | `reference/report-dataprocessor.md` |
| CommonModule, ScheduledJob, EventSubscription | `reference/code.md` |
| HTTPService, WebService | `reference/web.md` |
| Enum, Constant, DefinedType | `reference/simple.md` |
| ExternalDataSource (внешний источник данных) | `reference/external-data-source.md` |
| FunctionalOption, FilterCriterion, SettingsStorage, CommonForm, CommonPicture, CommonTemplate, служебные | `reference/other-types.md` |

Кросс-типовые детали:
- **`reference/attributes.md`** — объектная форма реквизита и колонки ТЧ (значение заполнения, параметры
  выбора, формат, подсказка, границы, …) + свойства самой ТЧ.
- **`reference/blocks.md`** — блоки объекта: представления, команды (+ характеристики/стандартные реквизиты).

Эта инструкция и reference-файлы — полная документация. Не ищи примеры XML в выгрузках конфигураций.

## Примеры

Справочник с реквизитами:
```json
{ "type": "Catalog", "name": "Организации", "descriptionLength": 100,
  "attributes": ["ИНН: String(12)", "КПП: String(9)", "Директор: CatalogRef.ФизическиеЛица"] }
```

Документ с движениями и ТЧ:
```json
{ "type": "Document", "name": "ПриходнаяНакладная",
  "registerRecords": ["AccumulationRegister.ОстаткиТоваров"],
  "attributes": ["Организация: CatalogRef.Организации", "Контрагент: CatalogRef.Контрагенты"],
  "tabularSections": { "Товары": ["Номенклатура: CatalogRef.Номенклатура", "Количество: Number(15,3)", "Цена: Number(15,2)"] } }
```

Регистр сведений:
```json
{ "type": "InformationRegister", "name": "КурсыВалют", "periodicity": "Day",
  "dimensions": ["Валюта: CatalogRef.Валюты | master, mainFilter, denyIncomplete"],
  "resources": ["Курс: Number(15,4)", "Кратность: Number(10,0)"] }
```

Batch:
```json
[ { "type": "Enum", "name": "Статусы", "values": ["Новый", "Закрыт"] },
  { "type": "Catalog", "name": "Валюты" },
  { "type": "Constant", "name": "ОсновнаяВалюта", "valueType": "CatalogRef.Валюты" } ]
```

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

Topics and platforms

SKILL.md skills catalog →

From the same set59

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor