magento-xml-specialist — Claude Code skill: Magento 2 XML
A skill that teaches your coding agent to write and validate Magento 2 XML configs: layout, di.xml, system.xml, module.xml and db_schema.xml.
npx skills add maxnorm/magento2-agent-skills --skill magento-xml-specialist -a claude-codeWhat magento-xml-specialist does
The skill gives an agent working knowledge of Magento 2 XML configuration. It covers layout instructions, containers and blocks, dependency injection in di.xml, admin settings in system.xml, module declaration in module.xml, and table schemas in db_schema.xml. Everything ships as a single SKILL.md file describing each config type and the practices around it.
Reach for it when you need a layout for a new page or want virtual types and plugins wired up correctly. The agent also handles XML namespaces, comments and config inheritance. Schema validation gets its own section, and that matters: Magento quietly ignores a malformed config, so you end up digging through logs to find the cause.
The skill installs into Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. You need Node.js and npx, since the install command pulls files from the maxnorm/magento2-agent-skills repository.
What it helps with
- build a layout XML for a new page
- wire virtual types and plugins in di.xml
- add fields to the admin config via system.xml
- define a table and its indexes in db_schema.xml
- validate XML against the schema before deploy
Example prompts for the agent
- create layout XML for the catalog page with a filter block
- add a before plugin on getPrice in di.xml
- define an orders table with an index on customer_id in db_schema.xml
How to install magento-xml-specialist
1Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-xml-specialist -a claude-code2Manually: put the files in place
~/.claude/skills/magento-xml-specialist/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/magento-xml-specialist/
1Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-xml-specialist -a codex2Manually: put the files in place
.agents/skills/magento-xml-specialist/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-xml-specialist -a cursor2Manually: put the files in place
.cursor/skills/magento-xml-specialist/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install maxnorm/magento2-agent-skills magento-xml-specialist2Manually: put the files in place
.github/skills/magento-xml-specialist/SKILL.md1Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-xml-specialist -a gemini-cli2Platform CLI
gemini skills install https://github.com/maxnorm/magento2-agent-skills --path skills/magento-xml-specialistManually: put the files in place
.devin/skills/magento-xml-specialist/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-xml-specialist -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about magento-xml-specialist
How do I install magento-xml-specialist in Claude?
Run npx skills add maxnorm/magento2-agent-skills --skill magento-xml-specialist -a claude-code. The file lands at ~/.claude/skills/magento-xml-specialist/SKILL.md.
What does magento-xml-specialist do?
It helps the agent create and validate Magento 2 XML configs: layout, di.xml, system.xml, module.xml and db_schema.xml.
Do I need a Magento 2 project to use it?
The skill describes Magento 2 XML file structure, so it makes sense in a project running that platform.
Source text
SKILL.md · MIT
--- name: magento-xml-specialist description: Creates XML configurations for Magento 2 including layout XML, dependency injection, system configuration, and module definition. Use when working with XML configuration files, layout XML, di.xml, or system.xml. Masters XML schema design, validation, and configuration management. --- # Magento 2 XML Specialist Expert specialist in creating comprehensive, well-structured XML configurations that form the backbone of Magento 2 module architecture. ## When to Use - Creating layout XML files - Configuring dependency injection (di.xml) - Setting up system configuration (system.xml) - Defining module structure (module.xml) - Creating database schemas (db_schema.xml) ## XML Configuration Types ### Layout XML - **Layout Instructions**: Expert in layout instructions, containers, and blocks - **Page Layouts**: Create custom page layouts - **Layout Updates**: Implement layout modifications - **Block Configuration**: Configure blocks and containers ### Dependency Injection (di.xml) - **Type Configuration**: Configure types and preferences - **Virtual Types**: Create virtual types for flexibility - **Plugin Configuration**: Configure plugins (before/after/around) - **Argument Injection**: Configure constructor arguments ### System Configuration (system.xml) - **Admin Configuration**: Create admin configuration interfaces - **Field Types**: Configure various field types - **Scope Management**: Handle store/website scope configurations - **Validation**: Implement configuration validation ### Module Definition (module.xml) - **Module Declaration**: Declare modules and dependencies - **Version Management**: Manage module versions - **Dependencies**: Define module dependencies ### Database Schema (db_schema.xml) - **Table Definition**: Define database tables - **Column Definition**: Define columns and data types - **Indexes**: Create database indexes - **Constraints**: Define constraints and relationships ## Best Practices - **Schema Validation**: Always validate XML against schemas - **Namespace Management**: Proper XML namespace usage - **Documentation**: Add XML comments for clarity - **Inheritance**: Understand configuration inheritance - **Performance**: Optimize XML parsing and loading ## References - [Adobe Commerce XML Configuration](https://developer.adobe.com/commerce/php/development/configuration/) - [Layout XML](https://developer.adobe.com/commerce/frontend-core/guide/layouts/) Focus on creating well-structured XML configurations that are maintainable and performant.
© maxnorm · MIT · maxnorm/magento2-agent-skills