Skip to main content
skill CX Codex

magento-requirejs-specialist — Claude Code skill

magento-requirejs-specialist guides code generation for Magento 2 AMD modules, RequireJS configurations, and frontend build optimization.

MIT 150 installs ★ 33 updated 2026-01-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add maxnorm/magento2-agent-skills --skill magento-requirejs-specialist -a claude-code
Open on GitHub

What magento-requirejs-specialist does

This skill instructs coding agents on building client-side logic tailored to Magento 2 architecture. It focuses on AMD patterns, dependency injection, and clean module organization inside store themes.

The guidance covers connecting custom widgets to the Magento UI component tree, wiring up event listeners, and issuing AJAX requests. It also incorporates production bundling steps centered around r.js optimization.

What it helps with

  • generate AMD modules adhering to Magento 2 conventions
  • configure module paths and dependency mapping in RequireJS
  • build custom JavaScript widgets for store themes
  • implement backend communication via AJAX endpoints
  • prepare JavaScript assets for r.js build optimization

Example prompts for the agent

  • Create an AMD module for a mini-cart dropdown in Magento 2
  • Define RequireJS dependencies for a custom catalog widget
  • Wire a frontend widget to trigger Magento core JavaScript events

How to install magento-requirejs-specialist

1Skills CLI (Vercel)

npx skills add maxnorm/magento2-agent-skills --skill magento-requirejs-specialist -a claude-code

2Manually: put the files in place

~/.claude/skills/magento-requirejs-specialist/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/magento-requirejs-specialist/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about magento-requirejs-specialist

How to install magento-requirejs-specialist in Claude Code?

Run npx skills add maxnorm/magento2-agent-skills --skill magento-requirejs-specialist -a claude-code in your terminal. The configuration is stored at ~/.claude/skills/magento-requirejs-specialist/SKILL.md.

What does magento-requirejs-specialist do?

It equips the AI coding assistant with conventions for RequireJS loader configurations, AMD script creation, and UI component integration inside Magento 2.

Does this skill cover production asset optimization?

Yes, it contains recommendations for optimizing module loading and preparing assets for production builds using r.js.

Source text

SKILL.md · MIT
---
name: magento-requirejs-specialist
description: Develops AMD modules using RequireJS for Magento 2. Use when creating JavaScript modules, managing dependencies, or optimizing JavaScript loading. Masters module loading, dependency management, and build optimization.
---

# Magento 2 RequireJS Specialist

Expert specialist in creating efficient, modular JavaScript architectures using AMD (Asynchronous Module Definition) patterns.

## When to Use

- Creating JavaScript modules
- Managing JavaScript dependencies
- Optimizing JavaScript loading
- Building custom widgets
- Working with Magento's JavaScript framework

## RequireJS Architecture

### AMD Modules
- **Module Definition**: Expert in Asynchronous Module Definition pattern
- **Dependency Management**: Advanced dependency injection and module loading
- **Module Configuration**: RequireJS configuration and path optimization
- **Plugin System**: RequireJS plugins and custom loaders
- **Build Optimization**: r.js optimization and production builds

### Magento Integration
- **Theme Integration**: RequireJS integration with Magento themes
- **Widget Development**: Custom JavaScript widgets and components
- **UI Component Integration**: Integration with Magento's UI component system
- **Backend Communication**: AJAX and API communication patterns
- **Event System**: Integration with Magento's event system

## Best Practices

- **Module Organization**: Logical code organization and structure
- **Dependency Management**: Clean dependency injection patterns
- **Performance**: Optimize module loading and execution
- **Code Reusability**: Create reusable module patterns
- **Build Optimization**: Optimize for production builds

## References

- [RequireJS Documentation](https://requirejs.org/)
- [Adobe Commerce JavaScript](https://developer.adobe.com/commerce/frontend-core/guide/javascript/)

Focus on creating modular, maintainable JavaScript architectures.

© maxnorm · MIT · maxnorm/magento2-agent-skills

Similar skills

All skills for Frontend and UI →

From the same set30

The whole set →
magento-css-specialist magento-css-specialist — a skill for building Magento 2 CSS and LESS, covering responsive themes, component styling, and CSS performance work. CX Codex +1 167installs magento-alpine-specialist magento-alpine-specialist briefs the agent on building reactive Alpine.js components for Magento 2 storefronts, Hyvä included. Handy when a template needs behaviour without a separate JS framework. CX Codex +1 166installs magento-cronjob-developer magento-cronjob-developer guides the agent through building Magento 2 cron jobs: the etc/crontab.xml config, the job class, failure handling and debugging. CX Codex +1 165installs magento-local-environment-specialist magento-local-environment-specialist walks the agent through a local Magento 2 setup: containers, PHP settings, database, cache, step debugging. Also covers breakage after a move to another machine. CX Codex +1 164installs magento-theme-developer The magento-theme-developer skill builds and modifies Magento 2 themes, covering child themes, layout XML, templates, responsive styling, and frontend performance. CX Codex +1 161installs magento-cache-analyst magento-cache-analyst optimizes Magento 2 caching architectures, covering Redis backends, Varnish FPC, ESI tags, and invalidation workflows. CX Codex +1 160installs magento-magewire-specialist The magento-magewire-specialist skill guides agents through building reactive Magewire components for Magento 2. Use it for server-driven interfaces with minimal JavaScript. CX Codex +1 153installs magento-luma-specialist magento-luma-specialist guides agents through customizing and extending Magento's default Luma theme. Useful for working with LESS variables, RequireJS modules, and KnockoutJS components. CX Codex +1 152installs

Project sponsors

Companies that keep this analytics open