commentemeapp/adobe-commerce-skills/adobe-commerce-frontend-luma
Claude Code and agent skill by commentemeapp/adobe-commerce-skills
- community
Checking that the SKILL.md file is still in the repository.
Apply when creating, registering or customizing an Adobe Commerce storefront theme based on Blank or Luma, or when writing its LESS, RequireJS configuration, JavaScript mixins, jQuery widgets, Knockout HTML templates or UI components. Covers theme.xml and parent inheritance, registration.php, the fallback of static files, templates and layouts, _extend.less versus _theme.less, server-side and client-side LESS compilation, @magento_import, requirejs-config.js (map, paths, shim, deps, mixins) and…
Install
npx vskill@latest install commentemeapp/adobe-commerce-skills/adobe-commerce-frontend-lumaSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Luma and Blank themes: inheritance, LESS and JavaScript
When this skill applies
Use this skill when working on the native storefront frontend of Adobe Commerce (Magento): a theme that inherits from Magento/blank or Magento/luma, its styles and its JavaScript.
- Creating a theme under
app/design/frontend/<Vendor>/<theme>/withtheme.xml,registration.phpand
etc/view.xml
- Replacing an image, font, script or Knockout
.htmltemplate of a parent theme or module through the fallback - Adding styles with
_extend.less, changing UI library variables with_theme.less, or overriding a module's
_module.less
- Choosing between server-side and client-side LESS compilation and cleaning generated files
- Writing
requirejs-config.js: aliases, replacements, third-party libraries and mixins - Initializing JavaScript from templates with
data-mage-initortext/x-magento-init - Extending a jQuery widget or a UI component JavaScript class
Do not use this skill for:
- Layout XML instructions, blocks, view models and
.phtmlescaping (useadobe-commerce-layout-and-templates) - XSS in general and Content Security Policies (use
adobe-commerce-security) setup:static-content:deployin a production pipeline and application modes (useadobe-commerce-deploy-and-modes)- Module registration and
module.xmlsequence (useadobe-commerce-module-contract) - Page Builder content types (not covered by these sources)
- Hyvä or other non-Luma storefronts (not in these sources)
- App Builder or out-of-process extensions (use the official
adobe/skills)
Decision rules
- A theme needs
theme.xml(at least<title>;<parent>when it inherits) andregistration.phpregistering
ComponentRegistrar::THEME with 'frontend/<Vendor>/<theme>'. composer.json is optional ("type": "magento2-theme", name in the form <vendor-name>/theme-<area>-<theme-name>). etc/view.xml is required unless the parent has one; a child view.xml extends the parent's.
- A new theme is not applied automatically: select it in Admin, Content > Design > Configuration, per store
view. If theme.xml title or parent changes after registration, open any Admin page to save it to the database.
- Inheritance depth is unlimited and is based on fallback: a file missing in the current theme is looked up in
ancestors, then in module view files, then in lib/web.
- Static files without module context resolve
<theme_dir>/web/i18n/<locale>,<theme_dir>/web/, each ancestor's
same pair, then lib/web/. With module context: <theme_dir>/<Vendor>_<Module>/web/, ancestors, then <module_dir>/view/<area>/web/ (frontend, then base). .less files follow this fallback too.
- Templates (
.phtml) fall back from theme to ancestors to<module_dir>/view/frontend/templates. Layouts do not use
fallback: they are collected and merged, so extend them rather than copy them.
- Knockout HTML templates are static files: override one by copying it to the same path under
<theme_dir>/<Vendor>_<Module>/web/template/.
- Styles: add rules in
<theme_dir>/web/css/source/_extend.less(simplest, keeps everything from the parent). To change
UI library variables, override _theme.less, copying every variable from the parent's file, including the unchanged ones. Rules and variables in _extend.less take precedence over _theme.less.
- A grandchild theme's
_extend.lessoverrides its parent's instead of extending it. To chain, import an
_extend-child.less at the end of the parent's _extend.less, keep it empty in the parent and fill it in the child.
- Module styles in a theme:
<theme_dir>/<Vendor>_<Module>/web/css/source/_extend.lessto add,_module.lessto
replace. Overriding a UI library file goes in web/css/source/lib/; an empty override of _responsive.less breaks compilation, and an empty component override such as _buttons.less removes that component's styles.
- Include CSS in layout (
<css src="css/custom.css"/>in an extendingMagento_Theme/layout/default_head_blocks.xml),
not in templates. A missing .css makes the preprocessor look for the .less file with the same name.
- Server-side LESS compilation is the default and the only option in production mode. Client-side compilation (in
less.js) is available outside production mode, recompiles on every page load and is slower.
@magento_importonly works in root source files and must be commented out with//.- After changing static or
.lesssources, clearpub/static/frontend/<Vendor>/<theme>/<locale>and
var/view_preprocessed, or old files keep being served; cache:clean alone does not remove them. In client-side mode this is also required after changing root files with @magento_import or extensionless @import, or after adding, renaming or removing imported files.
- Since 2.4.8,
'static_content_only_enabled_modules' => trueinapp/etc/env.phporapp/etc/config.phplimits
styles-m.css and styles-l.css to enabled modules.
- JavaScript: replace a component with
map('*': {'<default>': '<custom>'}); change or wrap its methods with a
mixin; alias files or URLs with paths; give a non-AMD library its dependencies with shim; use top-level deps only for code that must load on every page.
requirejs-config.jsgoes in<theme_dir>,<theme_dir>/<Vendor>_<Module>or<module_dir>/view/<area>. Files
are merged in this order: library, modules, ancestor theme modules, current theme modules, ancestor themes, current theme.
- A mixin's area follows its directory:
view/frontend,view/adminhtmlorview/base(all areas). Its
requirejs-config.js lives in the same area directory.
- Initialize components declaratively (
data-mage-initfor one element,<script type="text/x-magento-init">for a
selector or *). Use imperative require() only for code that needs no initialization.
- Prefer UI components when the feature must interact with existing UI components. A UI component instance is
declared with <uiComponent name="..."/> in layout and configured in view/<area>/ui_component/<name>.xml.
Hard constraints
Constraint: Never change out-of-the-box themes, core JavaScript or lib/web
Create a custom theme that inherits from Blank or Luma, and put custom JavaScript in a theme or module.
Why this matters
The documentation asks not to modify default themes, components or widgets for compatibility and upgradability, and reserves lib/web for core resources only.
Detection
Edits under app/design/frontend/Magento/, vendor/magento/theme-frontend-*, lib/web/, or core module web/js.
Correct
Wrong
Constraint: Override _theme.less only with a complete copy of the parent's variables
Your _theme.less replaces the parent's file entirely; it does not merge with it.
Why this matters
The documentation says the theme's _theme.less overrides the parent's, and asks to copy every variable you need, including the ones you do not change. The drawback it names: the copy must be updated by hand whenever the parent's _theme.less changes. For additive rules, use _extend.less.
Detection
A _theme.less in the theme with a handful of variables, or new selectors and rules placed in _theme.less.
Correct
Wrong
Constraint: Extend JavaScript components with mixins or map, declared in requirejs-config.js
Change behavior through a mixin (for UI components, jQuery widgets, objects and functions) or replace the whole component with map. Never edit the original file.
Why this matters
Mixins return a modified version of the target to every module that requires it, which keeps the original intact. A mixin cannot be disabled on its own; another module can only overwrite it (false for the old one, true for the new one) and must list the original module in its <sequence>.
Detection
Copies of core JS files with small edits, or mixin files that exist without a config.mixins entry.
Correct
Wrong
Constraint: Initialize JavaScript declaratively, not with inline scripts
Use data-mage-init or text/x-magento-init, with configuration prepared by the backend.
Why this matters
The documentation strongly recommends against inline JavaScript. Imperative scripts lose access to existing JS classes and can block page rendering.
Detection
<script> blocks in .phtml that call $(...).widget() directly or contain business logic.
Correct
Wrong
Preferred pattern
A logo.svg in web/images is picked up as the theme logo with no declaration. To extend a jQuery widget, depend on jquery-ui-modules/widget (individual jQuery UI components for frontend and base) and call $.widget('vendor.name', $.mage.<widget>, {...}). To extend a UI component class, return Component.extend({ defaults: {...} }). When markup with data-mage-init is injected by AJAX, call .trigger('contentUpdated') on it. In Knockout templates, any property bound with html must end in UnsanitizedHtml.
Common failure modes
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/adobe-commerce-frontend-luma/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/commentemeapp/adobe-commerce-skills/adobe-commerce-frontend-luma)