magento2-dev-core

Solid

Foundation skill for professional Magento 2 development. Use when: - Creating new modules or customizations - Implementing features following Magento architecture - Working with Dependency Injection, Repositories, or Plugins - Writing secure Magento code - Building backend logic, CLI commands, or cron jobs This is the CORE skill that other Magento 2 skills depend on. Always load this first.

AI & Automation 2 stars 2 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
16
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Magento 2 Developer Core This skill provides the foundational patterns all Magento 2 developers must follow. It covers architectural decisions, security, and best practices that apply to every part of a Magento project. ## Related Skills This is the foundation the other Magento 2 skills build on: `magento2-frontend-dev` and `magento2-hyva-dev` cover the two mutually exclusive theme stacks (check the theme's `theme.xml` parent to see which one the project actually uses — Luma vs Hyvä), `magento2-backend-dev` covers APIs/CLI/cron, and `magento2-linter`, `magento2-security-scan`, `magento2-performance-audit` verify the patterns below. In a Govard environment, pair this with `govard-magento` for the container/CLI side. ## Core Architectural Standards ### Dependency Injection (DI) **DO**: Use Constructor Injection for all dependencies. ```php class MyService { public function __construct( private readonly ProductRepositoryInterface $productRepository, private readonly LoggerInterface $logger ) {} public function getProduct(int $id): ?ProductInterface { return $this->productRepository->get($id); } } ``` **NEVER**: Use `ObjectManager::getInstance()` (Service Locator anti-pattern). ```php // WRONG - Never do this $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->create(Product::class); // CORRECT public function __construct(ProductFactory $productFactory) { $this->productFactor...

Details

Author
ddtcorex
Repository
ddtcorex/dev-skills-hub
Created
2 months ago
Last Updated
4 days ago
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category