cfe-patch-method

Generates Before/After method interceptors for borrowed objects in 1C configuration extensions.

1|2|Updated Jul 19, 2026
One-click install
npx skills add https://github.com/IngvarConsulting/unica-marketplace --skill cfe-patch-method-ingvarconsulting
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cfe-patch-method
Source: https://github.com/IngvarConsulting/unica-marketplace/tree/main/plugins/unica/skills/cfe-patch-method
Command: npx skills add https://github.com/IngvarConsulting/unica-marketplace --skill cfe-patch-method-ingvarconsulting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding behavior to existing 1C:Enterprise configuration objects without modifying the base configuration requires writing extension interceptor procedures by hand, including correct BSL decorators, module context directives, and XML descriptor state updates. This Skill automates that generation through the Unica MCP tool, producing consistent Before/After interceptors for borrowed objects. ## Core Features & Use Cases - Interceptor Generation: Creates a .bsl procedure with the &Перед (Before) or &После (After) decorator for an existing parameterless procedure of a borrowed object, appending to or creating the module file. - Atomic Descriptor Update: Marks the corresponding module property as xr:State=Extended in the XML descriptor within the same atomic transaction, refusing to write on conflicts or concurrent modifications. - Context Handling: Applies the correct context directive (НаСервере, НаКлиенте, НаСервереБезКонтекста) based on module role, covering object modules, manager modules, form modules, common modules, and more. - Use Case: You borrowed the Контрагенты catalog into your extension and need logging before its ОбновитьДанные procedure runs. The Skill generates the prefixed interceptor procedure and updates the extension descriptor in one safe operation. ## Quick Start Ask the assistant to generate a Before interceptor for the ОбновитьДанные procedure in the Catalog.Контрагенты object module of your extension at src/extensions/MyExtension.

Frequently Asked Questions about cfe-patch-method

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

FAQPage Schema
How do I add a Before or After interceptor to a 1C extension method?▼

Call the unica.cfe.patch_method MCP tool with ExtensionPath, ModulePath, MethodName, and InterceptorType (Before or After). It generates a .bsl procedure with the &Перед or &После decorator and marks the module property as Extended in the XML descriptor atomically.

What module types are supported for method interception in 1C extensions?▼

Supported module roles include ObjectModule, ManagerModule, RecordSetModule, ValueManagerModule, CommonModule, and form modules, addressed via ModulePath values like Catalog.X.ObjectModule or Document.X.Form.Y. The accepted combinations follow the EDT 8.3.27 grammar with 51 valid type-role pairs.

Can I intercept a function or a procedure with parameters in a 1C extension?▼

No. Version 1 supports only existing procedures without parameters; IsFunction must remain false. Functions, parameters, Around interception, and ModificationAndControl are reserved for future design.

Why does the patch method tool refuse to write the interceptor?▼

The tool refuses before writing if the object is not borrowed into the extension, the extension lacks a non-empty NamePrefix, ownership or the 2.20 profile is unconfirmed, or the descriptor already contains an incompatible or duplicate state. Concurrent descriptor or module changes also abort the transaction without partial writes.

Does the tool verify that the target method exists in the base configuration?▼

No. The tool does not read the base configuration module, so it cannot prove the method exists or check its signature. You must confirm beforehand that MethodName is a real parameterless procedure.