/magento:magento-model-developerfrom magento
Designs and implements data layer architecture for Magento 2. Use when creating data models, designing database schemas, implementing repositories, or working with EAV/flat table structures. Masters entity design, repository patterns, collections, and database optimization.
Ships in magento. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Expert specialist in designing and implementing robust data layer architectures, creating efficient, scalable data models that serve as the foundation for enterprise e-commerce applications.
<?php
declare(strict_types=1);
namespace Vendor\Module\Model;
use Magento\Framework\Model\AbstractModel;
use Vendor\Module\Model\ResourceModel\Entity as ResourceModel;
class Entity extends AbstractModel
{
protected function _construct(): void
{
$this->_init(ResourceModel::class);
}
}
<?php
declare(strict_types=1);
namespace Vendor\Module\Model\ResourceModel;
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
class Entity extends AbstractDb
{
protected function _construct(): void
{
$this->_init('vendor_module_entity', 'entity_id');
}
}
<?php
declare(strict_types=1);
namespace Vendor\Module\Model\ResourceModel\Entity;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
use Vendor\Module\Model\Entity;
use Vendor\Module\Model\ResourceModel\Entity as ResourceModel;
class Collection extends AbstractCollection
{
protected function _construct(): void
{
$this->_init(Entity::class, ResourceModel::class);
}
}
<?php
declare(strict_types=1);
namespace Vendor\Module\Model;
use Vendor\Module\Api\Data\EntityInterface;
use Vendor\Module\Api\EntityRepositoryInterface;
use Vendor\Module\Model\ResourceModel\Entity as ResourceModel;
use Magento\Framework\Exception\NoSuchEntityException;
class EntityRepository implements EntityRepositoryInterface
{
/**
* @param ResourceModel $resource
*/
public function __construct(
private readonly ResourceModel $resource
) {
}
/**
* @param int $id
* @return EntityInterface
* @throws NoSuchEntityException
*/
public function getById(int $id): EntityInterface
{
$entity = $this->resource->load($id);
if (!$entity->getId()) {
throw new NoSuchEntityException(__('Entity with id "%1" does not exist.', $id));
}
return $entity;
}
}
<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="vendor_module_entity" resource="default" engine="innodb" comment="Entity Table">
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
<column xsi:type="varchar" name="name" length="255" nullable="false" comment="Name"/>
<column xsi:type="timestamp" name="created_at" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
</constraint>
<index referenceId="VENDOR_MODULE_ENTITY_NAME" indexType="btree">
<column name="name"/>
</index>
</table>
</schema>
Focus on creating efficient, scalable data models that serve as a solid foundation for enterprise applications.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dylinmat/magento2-skills-plugin --plugin magento30 skills in this plugin
/magento-alpine-specialistDevelops reactive components using Alpine.js for modern Magento 2 frontends. Use when working with Alpine.js, Hyvä themes, or building reactive UI components. Masters reactive programming, declarative syntax, and lightweight JavaScript solutions./magento-api-developerDesigns and implements REST and GraphQL APIs for Magento 2. Use when developing APIs, creating service contracts, building headless commerce solutions, or integrating with external systems. Masters service contracts, data transfer objects, authentication, and enterprise-grade API architecture./magento-cache-analystOptimizes Magento 2 caching strategies for enterprise performance. Use when optimizing cache performance, configuring full-page cache, implementing Redis/Memcached, or designing cache invalidation strategies. Masters FPC, application cache, and distributed caching solutions.