template-remove

Delete a 1C metadata template and unregister it from the object's root XML.

33|8|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/Dach-Coin/claude_rules_1c --skill template-remove-dach-coin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: template-remove
Source: https://github.com/Dach-Coin/claude_rules_1c/tree/main/.claude/skills/template-remove
Command: npx skills add https://github.com/Dach-Coin/claude_rules_1c --skill template-remove-dach-coin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Eliminates leftover UI/layout templates in 1C object metadata by deleting both the template files and the template registration inside the root XML object.

Core Features & Use Cases

  • Deletes template metadata and files: Removes <TemplateName>.xml and the entire <TemplateName>/ template directory recursively under <SrcDir>/<ObjectName>/Templates/.
  • Updates root object metadata: Removes the <ChildObjects>/<Template> entry matching the provided template name from <SrcDir>/<ObjectName>.xml.
  • Cleans related composition schema: Clears MainDataCompositionSchema when it ends with Template.<TemplateName>, including for reports/external reports where the template may be referenced.

Quick Start

Ask Claude to run /template-remove with the 1C object name and the template name you want to delete, using your desired source directory if it is not the default src.

Frequently Asked Questions about template-remove

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

FAQPage Schema
How do I remove a template from a 1C:Enterprise object metadata file?

To remove a 1C template, you must delete its template XML and directory under the source tree, and unregister it from the object's root XML. This updates the ChildObjects node and rewrites the root XML with a UTF-8 BOM.

Does removing a 1C report template affect the data composition schema?

Yes, removing a 1C report template clears the MainDataCompositionSchema reference if it points to the deleted template. This prevents broken references in external reports and standard report objects during source code maintenance.

What is the best way to clean up leftover UI layout templates in 1C source files?

The best way to clean up leftover 1C UI layout templates is to recursively delete the template directory and update the root object XML. This safely removes both the physical template artifacts and their ChildObjects registration.

How to delete a 1C template from ChildObjects without breaking the root XML?

Deleting a 1C template from ChildObjects requires removing the matching Template entry from the root XML and rewriting the file with a UTF-8 BOM. This ensures the object metadata remains valid for 1C:Enterprise 8.3.

Can I use this template deletion process for external reports in 1C 8.3?

Yes, this template deletion process works for external reports and document flows in 1C:Enterprise 8.3. It validates file existence locally, deletes the correct template artifacts, and updates the required metadata references.