get_magento_pattern
Find the correct Magento 2 coding pattern for tasks like reading files, escaping HTML, or creating viewmodels. Get compliant code examples and guidance on what to avoid.
Instructions
Get the correct Magento 2 way to accomplish a task. Returns the proper pattern, code example, and what to avoid. Use this for "vibe coding" - writing Magento-compliant code naturally.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | The task you want to accomplish (e.g., "read a file", "escape HTML", "validate email", "create viewmodel") |