com um clique
xml-generation
For any 1C metadata XML via the xml-gen CLI
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
For any 1C metadata XML via the xml-gen CLI
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
When writing or reviewing BSL, apply 1C standards
При написании или ревью BSL применять стандарты 1С
Orchestrator: routing work and agent phases
Оркестратор: маршрутизация работы и фаз агентов
BSL LSP navigation: definitions, refs, call graph
Rules for using RLM tools for project search and navigation in 1C/BSL
| name | xml-generation |
| description | For any 1C metadata XML via the xml-gen CLI |
| argument-hint | <domain> <operation> [<args>] |
| allowed-tools | ["Bash","Read","Write","Glob"] |
| metadata | {"category":"1c-development","version":"2.0"} |
A single xml-gen CLI covers the entire 1C XML workflow: generation from JSON DSL, targeted modification of existing files, and validation. This SKILL.md is a router: it contains an overview, an index of sub-areas, and end-to-end principles. For detailed specifications for each domain, go to the corresponding sub-skill (<name>/SKILL.md).
Installation: python tools/install.py --install-xml-gen (requires JDK 17+).
xml-gen has two complementary work surfaces:
mxl/skd/form/role/meta compile and available decompilers, for example mxl decompile, form decompile. Use this when the artifact is easier to describe declaratively and compile into Designer XML. form decompile is draft/scaffold only, not a lossless round-trip.epf init, epf add-template, form add-element, meta edit, template add, validate. Use this when you need to create or modify an existing metadata tree through explicit CLI actions.support check/info and the built-in mutation guard. xml-gen reads Ext/ParentConfigurations.bin and blocks direct XML edits to objects in a vendor-supported standard configuration.To support the tool itself, xml-gen includes diagnostic oracle commands. They are not needed for ordinary XML generation/editing tasks; the reference for them is provided separately: references/behavioral-oracles.md.
Details are in §2 and the sub-skills. Universal commands (validate, form/template/help add, edit replace-text) are described in §3.
Do not use when: EDT format is needed (Designer only), DataSetUnion/CalculatedFields are needed in the data composition schema (workaround: calculations in queries).
| Sub-area | What it does | When to use | Reference |
|---|---|---|---|
forms-toolkit | info / edit / validate / element-mapping / epf-validate — the operational workflow for managed forms and EPF | analyze form structure, add fields, validate, map Title→Name for Vanessa | forms-toolkit/SKILL.md |
form-dsl | compile a form from JSON DSL (form compile, including --from-object) and draft form decompile | create a form from scratch, generate it from an object, or extract a JSON draft from an example | form-dsl/SKILL.md |
skd-dsl | compile the data composition schema from JSON (skd compile) | create a data composition schema from scratch | skd-dsl/SKILL.md |
skd-edit | patch operations on an existing data composition schema (skd add-parameter, skd add-field) | targeted edits to Schema.xml | skd-edit/SKILL.md |
mxl-dsl | MXL layouts / SpreadsheetDocument (mxl compile) | print forms, templates | mxl-dsl/SKILL.md |
role-dsl | compile roles (role compile, role add-object, role add-right) | create or modify a role | role-dsl/SKILL.md |
config-operations | work with the configuration root (config init/info/edit/validate) | initialize a new CF, navigate the root | config-operations/SKILL.md |
meta-operations | 23 metadata object types (meta compile/info/edit) | Catalogs / Documents / InformationRegisters / Enums and others | meta-operations/SKILL.md |
subsystem-interface | subsystems and command interfaces (subsystem compile/edit, interface edit/validate) | organize the configuration interface | subsystem-interface/SKILL.md |
epf-full | external processors and reports (epf init/add-form/add-template/bsp-init) | create EPF / ERF from scratch, including БСП variants | epf-full/SKILL.md |
extension-operations | configuration extensions / CFE (extension init/borrow/diff) | create a CFE, borrow objects, compare the extension with the base | extension-operations/SKILL.md |
Universal commands (
xml-gen form add,template add,help add,edit replace-text,validate,support check/info) are described in §3 below and do not have a separate sub-skill.
Five groups: validate (structural/semantic validation of any XML), support check/info (check vendor support status), form/template/help add (add forms, layouts, help to any metadata object), edit replace-text (byte-level replacement without normalizing line endings).
When to use: validate — before and after every modification; support check/info — before intentional edits to a vendor-supported standard configuration or in hooks; form/template/help add — when you need to register a new artifact without rebuilding; edit replace-text — for targeted XML edits with multiline content in <v8:content> (tooltips, descriptions) or any replacement where preserving line endings matters.
→ references/universal-commands.md
Oracle commands are intended to support xml-gen and verify behavior on canonical XML, not for ordinary generation of a single artifact. See details, modes, and test matrices in references/behavioral-oracles.md.
--format designer (default). EDT is not supported.utf-8-sig). Preserve the BOM when editing.<v8:content>. Do not use Claude Code Edit — xml-gen edit replace-text (→ references/universal-commands.md).validate before and after modification. On error, <domain> edit rolls back automatically.form edit / meta edit / subsystem edit accepts arrays of operations; use them instead of repeated CLI calls.output/MyProcessor.xml. EPF forms: output/MyProcessor/Forms/MainForm/Ext/Form.xml.xml-gen oracle ... reads the canon and writes generated XML only under --out; do not place oracle output inside src/xml.xml-gen check Ext/ParentConfigurations.bin: G=1 blocks the entire configuration, f1=0 blocks the object, deletion requires f1=2. CFE extensions are not blocked.xml-gen epf init --name MyProcessor output/
xml-gen epf add-form --epf MyProcessor --name MainForm output/
xml-gen validate --type epf output/MyProcessor
Details — epf-full/SKILL.md.
# 1. Study the structure
xml-gen form info "src/Catalogs/Контрагенты/Forms/ФормаЭлемента/Ext/Form.xml"
# 2. Add an element bound to a property
xml-gen form add-element --type InputField --name Склад --path Объект.Склад \
--parent ГруппаШапка --after Контрагент \
"src/Catalogs/Контрагенты/Forms/ФормаЭлемента/Ext/Form.xml"
# 3. Check
xml-gen validate --type form "src/Catalogs/Контрагенты/Forms/ФормаЭлемента/Ext/Form.xml"
Details — forms-toolkit/SKILL.md (info/edit/decompile/validate) and form-dsl/SKILL.md (compile from scratch).
xml-gen skd compile schema.json Template.xml
xml-gen validate --type skd Template.xml
Details — skd-dsl/SKILL.md. For targeted edits to an existing Schema.xml — skd-edit/SKILL.md.
xml-gen extension init output_ext/ МоёРасширение --config-path output/
xml-gen extension borrow output_ext/ output/ "Catalog.Товары"
xml-gen extension diff output_ext/ output/
Details — extension-operations/SKILL.md.
xml-gen support info "src/Catalogs/Номенклатура.xml"
xml-gen support check "src/Catalogs/Номенклатура.xml" --require editable
xml-gen support check "src/Catalogs/Номенклатура.xml" --require removed --output json
support check ends the command with an error if the mutation is forbidden. To remove an object, you first need an explicit transition of the object to an off-support state through an external agreed action; xml-gen does not remove support implicitly.
# Incorrect: role compile with a file as output
xml-gen role compile role.json Roles/МояРоль.xml
# Correct: output_dir → Roles/<Name>/Ext/Rights.xml
xml-gen role compile role.json output/
# Incorrect: form add-element without --path
xml-gen form add-element --type InputField --name Наименование Form.xml
# Correct: --path binds the element to a property
xml-gen form add-element --type InputField --name Наименование --path Наименование Form.xml
# Incorrect: role add-object with "view"
xml-gen role add-object --name Catalog.Номенклатура --rights view Rights.xml
# Correct: rights are comma-separated, casing from the RoleRight enum
xml-gen role add-object --name Catalog.Номенклатура --rights Read,View Rights.xml
For agents without the PreToolUse protocol (Codex, Cursor, Aider, Cline, etc.), it is recommended to configure additional protection layers:
tools/hooks/pre-commit) — extend it with a --check call for all staged .xml/.mxl files. This is the last line of defense: it prevents the change from reaching the repository even if the agent ignored the rule:
python3 tools/hooks/block-direct-xml-edit.py --check "<staged-file>" --tool Edit
On exit code 2, the file belongs to 1C metadata, and the commit is aborted.--check over the diff catches any attempt at direct edits before they land in main.Fine-tuning: the ONEC_ROOT_DIRS, EXCLUDE_SUBSTRINGS, EXCLUDE_BASENAMES lists are defined as constants in tools/hooks/block-direct-xml-edit.py. Extend them if the project introduces a new 1C configuration pattern (for example, a non-standard location) or a new false positive case (build XML with a unique name).
| Problem | Solution |
|---|---|
Parent element not found (form) | Check the exact parent name in Form.xml — case matters |
Object already exists (role) | Use role add-right instead of add-object |
DataSet not found (skd) | Check the dataset name in Schema.xml |
| Edit tool breaks line endings | Use xml-gen edit replace-text |
| Need DataSetUnion / CalculatedFields in the data composition schema | Workaround: calculations in queries |
| Need EDT format | Not supported, Designer only |
depends_on: