1c-forms-edit

Edits existing 1C managed form Form.xml files via JSON patch definitions.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/pavelvdo/universal-xml-exchange2 --skill 1c-forms-edit-pavelvdo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 1c-forms-edit
Source: https://github.com/pavelvdo/universal-xml-exchange2/tree/main/.cursor/skills/1c-forms/edit
Command: npx skills add https://github.com/pavelvdo/universal-xml-exchange2 --skill 1c-forms-edit-pavelvdo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Modifying 1C:Enterprise managed forms requires hand-editing verbose Form.xml files with strict ID pools, namespaces, and element schemas, which is error-prone when done manually. This Skill applies targeted changes to an existing Form.xml from a declarative JSON patch, generating correct XML elements, attributes, commands, and event handlers automatically. ## Core Features & Use Cases - JSON-driven form patching: Define elements (inputs, tables, buttons, groups, pages, labels) in a JSON file and have them emitted as valid Form.xml fragments with auto-allocated IDs. - ID pool management: Scans existing element, attribute, and command IDs (including extension mode with BaseForm, offsetting IDs to 1000000+) to avoid collisions. - Type and event handling: Resolves Russian and English type synonyms (e.g. "строка" to string, "СправочникСсылка" to CatalogRef) and generates Russian-named event handlers like ПриИзменении. - Use Case: In assisted artifact mode, add a new input field with an OnChange handler to an existing document form by writing a small JSON patch and running the script, then validating the result. ## Quick Start Ask the assistant to edit the existing form by writing a JSON patch and running the 1c-forms edit script against the target Form.xml, then validate the result.

Frequently Asked Questions about 1c-forms-edit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit a 1C managed form Form.xml programmatically?

Write a JSON patch describing the elements to add (inputs, tables, buttons, groups) and run the form-edit.ps1 script with -FormPath pointing to the target Ext/Form.xml and -JsonPath to the patch file. The script emits valid XML fragments with auto-allocated IDs.

How to add an input field with an event handler to a 1C form?

Define an "input" element in the JSON patch with name, path, and an "on" array such as ["OnChange"]. The script generates the InputField XML plus a Russian-named handler like ПриИзменении automatically.

Can this tool create new 1C forms or metadata objects?

No. It only edits an existing Form.xml file and explicitly forbids creating forms or touching ChildObjects of metadata objects. It also requires artifact_mode to be set to assisted before running.

Does form-edit support 1C configuration extensions?

Yes. The script auto-detects extension mode by the presence of a BaseForm node and offsets new element, attribute, and command IDs to start at 1000000 to avoid collisions with the base form.

What PowerShell version is required for editing 1C form XML?

PowerShell 5.1 only is supported. The script uses System.Xml.XmlDocument with namespace managers for the v8.1c.ru logform and data/core namespaces and must be run via powershell.exe -NoProfile.

Why must validation run after editing a 1C Form.xml?

The skill's hard rules require running 1c-forms/validate after every edit to confirm the patched XML is structurally correct, since the script inserts fragments into an existing document where schema or ID mistakes would break the form.