plugin-development

Configure before, after, and around plugins in Magento 2.

18|4|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/Inchoo/magento-bricklayer --skill plugin-development-inchoo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-development
Source: https://github.com/Inchoo/magento-bricklayer/tree/main/config/skills/plugin
Command: npx skills add https://github.com/Inchoo/magento-bricklayer --skill plugin-development-inchoo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complexity of Magento 2 plugin development, providing comprehensive guidelines on creating, configuring, and optimizing plugins.

Core Features & Use Cases

  • Plugin Creation: Offers step-by-step instructions for creating before, after, and around plugins.
  • Plugin Configuration: Explains how to configure plugins in global and area-specific XML files.
  • Plugin Execution: Details the execution flow and sort order of plugins.
  • Best Practices: Provides a list of best practices for writing efficient and maintainable plugins.
  • Use Case: Ideal for developers seeking to extend or modify Magento 2's functionality without altering core code.

Quick Start

Create a new 'before' plugin to modify product save logic in Magento 2.

Frequently Asked Questions about plugin-development

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

FAQPage Schema
How do I create a Magento 2 plugin to modify public class methods?

Configure Magento 2 plugins in global or area-specific XML files to modify public class methods. This Skill explains how to set up before, after, and around plugins to extend functionality without altering core code.

What is the difference between before, after, and around plugins in Magento 2?

Magento 2 plugins use before methods to alter arguments, after methods to change return values, and around methods to wrap and control the original method's execution. This Skill details their specific execution flows and use cases.

How does plugin sort order affect execution flow in Magento 2?

Plugin sort order determines the sequence in which multiple plugins targeting the same method execute. This Skill details configuring sort order in XML to ensure predictable execution flow and avoid conflicts.

Do I need object-oriented programming experience for Magento 2 extension development?

Yes, Magento 2 extension development requires knowledge of Magento 2 architecture and object-oriented programming. This Skill provides guidelines tailored for developers seeking to extend functionality without altering core code.

What are the best practices for writing maintainable Magento 2 plugins?

Best practices for Magento 2 plugins include using around plugins sparingly to avoid performance overhead and configuring sort orders properly. This Skill provides a comprehensive list of guidelines for efficient plugin development.