# Magento Xml Specialist

> Creates XML configurations for Magento 2 including layout XML, dependency injection, system confi…

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.

- Page: https://ss33.ai/skills/maxnorm/magento-xml-specialist-69278673496
- Publisher: maxnorm
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [Languages & frameworks](https://ss33.ai/skills/category/software-development-t44z8z/languages-and-frameworks-rgvrso)
- License: MIT
- Source: https://github.com/maxnorm/magento2-agent-skills/blob/b3a20f960dc945ee32ad1ba09988c1d79015d877/skills/magento-xml-specialist/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/maxnorm/magento-xml-specialist-69278673496

# 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.
