SuperAPI AI Directory

erf-expert

Coding & development

View repository

Updated 10-16 10:10

About this skill

/erf-expert — External 1C reports (ERF)

A single skill for all operations with external ERF reports. Choose the desired mode:

Mode What it does
init Create a new empty report (scaffold XML)
build Build an ERF from XML sources
dump Dump an ERF into XML sources

Mode: init — report creation

Generates a minimal set of XML sources for an external 1C report (ERF).

Usage

/erf-expert init <Name> [Synonym] [SrcDir] [--with-skd]
Parameter Required Default Description
Name yes — Report name
Synonym no = Name Synonym (display name)
SrcDir no src Sources directory
--WithSKD no — Create an empty DCS and bind it to MainDataCompositionSchema

Command

powershell.exe -NoProfile -File .claude/skills/erf-expert/scripts/erf-init.ps1 -Name "<Name>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"] [-WithSKD]

What is created

<SrcDir>/
├── <Name>.xml          # Корневой файл метаданных (4 UUID)
└── <Name>/
    └── Ext/
        └── ObjectModule.bsl  # Модуль объекта с 3 регионами

With --WithSKD additionally:

<SrcDir>/<Name>/
    Templates/
    ├── ОсновнаяСхемаКомпоновкиДанных.xml
    └── ОсновнаяСхемаКомпоновкиДанных/Ext/Template.xml  # Пустая СКД
  • The root XML contains MetaDataObject/ExternalReport
  • With --WithSKD: MainDataCompositionSchema is filled in, ChildObjects contains <Template>
  • ClassId is fixed: e41aff26-25cf-4bb6-b6c1-3f478a75f374
  • Files are created in UTF-8 with BOM

Next steps

  • Add a form: /form-add
  • Add a template: /mxl-expert template-add
  • Edit the DCS: /skd-edit
  • Add help: /help-add
  • Build the ERF: /erf-expert build

Mode: build — ERF assembly

Assembles an ERF file from XML sources using the 1C platform.

Usage

/erf-expert build <Name> [SrcDir] [OutDir]
Parameter Required Default Description
Name yes — Object name (root XML name)
SrcDir no src Sources directory
OutDir no build Directory for the result

Connection parameters

Read .v8-project.json from the project root. Take v8path and resolve the base:

  1. If the user specified parameters (path, server) — use them directly
  2. If a base was specified by name — look in .v8-project.json
  3. If not specified — match the Git branch with databases[].branches
  4. If the branch did not match — use default
  5. If .v8-project.json does not exist — create an empty infobase in ./base

If v8path is not set: Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1

Command

powershell.exe -NoProfile -File .claude/skills/erf-expert/scripts/erf-build.ps1 -InfoBasePath "<путь>" -SourceFile "src\<Name>.xml" -OutputFile "build\<Name>.erf"
Parameter Required Description
-V8Path <путь> no Platform bin directory
-InfoBasePath <путь> * File infobase
-InfoBaseServer <сервер> * 1C server
-InfoBaseRef <имя> * Infobase name on the server
-UserName <имя> no User
-Password <пароль> no Password
-SourceFile <путь> yes Root XML sources
-OutputFile <путь> yes Output ERF file

* — either -InfoBasePathis required, or the pair -InfoBaseServer + -InfoBaseRef


Mode: dump — unpack ERF

Unpacks an ERF file into XML sources using the 1C platform (hierarchical format).

Usage

/erf-expert dump <File> [OutDir]
Parameter Required Default Description
File yes — Path to the ERF file
OutDir no src Directory for exporting sources

Connection parameters

Similar to mode build — infobase authorization via .v8-project.json.

Command

powershell.exe -NoProfile -File .claude/skills/erf-expert/scripts/erf-dump.ps1 -InfoBasePath "<путь>" -InputFile "<файл>.erf" -OutputDir "src"
Parameter Required Description
-V8Path <путь> no Platform bin directory
-InfoBasePath <путь> * File infobase
-InfoBaseServer <сервер> * 1C server
-InfoBaseRef <имя> * Infobase name on the server
-UserName <имя> no User
-Password <пароль> no Password
-InputFile <путь> yes Path to the ERF file
-OutputDir <путь> yes Directory for export
-Format <формат> no Hierarchical (default) / Plain

Result structure (Hierarchical)

<OutDir>/
├── <Name>.xml
└── <Name>/
    ├── Ext/
    │   └── ObjectModule.bsl
    ├── Forms/
    │   ├── <FormName>.xml
    │   └── <FormName>/Ext/Form.xml
    └── Templates/
        ├── <TemplateName>.xml
        └── <TemplateName>/Ext/Template.<ext>