ocmod-writing

Generate OpenCart OCMOD XML patches with single-line search and CDATA blocks.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/GregoryBiter/opencart_ai_agent --skill ocmod-writing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ocmod-writing
Source: https://github.com/GregoryBiter/opencart_ai_agent/tree/main/.agents/skills/ocmod
Command: npx skills add https://github.com/GregoryBiter/opencart_ai_agent --skill ocmod-writing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Обеспечивает надёжное создание и внедрение OCMOD XML-правок для OpenCart, облегчая точность поиска и безопасную модификацию файлов без редактирования ядра напрямую.

Core Features & Use Cases

  • Подробная структура OCMOD XML: корректная схема <modification>, <file>, <operation>, <search> и <add> с правильной атрибутикой и CDATA.
  • Однострочный поиск и гибкость: объяснение ограничений OpenCart и как использовать regex для гибкого совпадения, с учётом пробелов и форматов кода.
  • Безопасность и лучший стиль: рекомендации по избежанию конфликтов, использованию events, и тестированию через Admin-панель.
  • Use Case: создание патча, который добавляет простой функциональный элемент или исправляет стиль кода без затрагивания ядра.
  • Quick Start: приведено ниже.

Quick Start

Create a basic OCMOD patch by specifying a unique one-line search, the target OpenCart file, and the replacement inside a CDATA block, then install and refresh modifications in the Admin panel.

Frequently Asked Questions about ocmod-writing

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

FAQPage Schema
How do I create an OCMOD XML patch for OpenCart without modifying core files?

To create an OCMOD XML patch, define a modification structure with file, operation, search, and add elements. Use CDATA blocks for replacements to ensure safe PHP and template modifications without editing the OpenCart core directly.

Why does my OCMOD search fail to match PHP code in OpenCart controllers?

OCMOD search failures often happen due to formatting or whitespace differences in OpenCart PHP code. Using a single-line search with optional regex provides flexible matching, accommodating variations in spaces and code formats for reliable patching.

Can I use regex in OCMOD search operations for flexible OpenCart patching?

Yes, you can use regex within OCMOD search operations to achieve flexible matching. This handles varying whitespace and code formats in OpenCart view templates and models, ensuring your XML patch targets the correct string reliably.

What is the best way to safely deploy OCMOD modifications in OpenCart?

The best way to safely deploy OCMOD modifications is to write XML patches with unique search strings, test them via the Admin panel, and refresh modifications. This prevents conflicts and ensures repeatable, safe modifications across your OpenCart project.

Does OCMOD support multi-line search strings for OpenCart view templates?

OCMOD is designed primarily for single-line search operations within OpenCart files. For multi-line modifications, you must break down the target code or use regex to match the specific formatting in your view templates accurately.

When should I not use OCMOD patches for OpenCart modifications?

You should avoid OCMOD patches when OpenCart events can achieve the same result without file modifications. If a search string is not unique across the codebase, OCMOD may cause conflicts, making event listeners a safer alternative for extending functionality.