breeze-adapt
Skill6 starsChanged 28 days agoMITView on GitHub
Adapt an existing Magento 2 module to Swissup Breeze by generating a companion module {Vendor}_{Module}Breeze that converts RequireJS/Knockout/jQuery widgets to Cash `$.widget`. Never edits the target, so it works on vendor/ modules. Use to make a module work with Breeze (needs magento2-tools:context theme.breeze). Unlike magento2-tools:extension-point (plugins/observers/preferences), this builds the Breeze adapter; run magento2-tools:breeze-compat first. New theme: magento2-tools:breeze-theme.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Append-safe: If the companion module already exists, merge into breeze_default.xml and add new widget files — never clobber existing …
- Very specific: line 82
Apply the shared module-hygiene baseline (required): After generating the companion module's PHP files, run …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Magento 2 Breeze Module Adapt
Generates a companion integration module that makes an existing module work with a Swissup Breeze theme, without touching the target module. Breeze replaces RequireJS/Knockout/jQuery with a Cash-based stack, so a Luma module's frontend JS usually needs a Breeze adapter (or Better Compatibility mode).
Core Rules
- Breeze-required. Resolve
context; iftheme.breeze.installedisfalse, do NOT generate — print the install path and stop:composer require swissup/breeze-evolution && \ bin/magento setup:upgrade --safe-mode=1 && \ bin/magento marketplace:package:install swissup/breeze-evolution - Separate companion module — never edit the target. Output goes to a new
{Vendor}_{Module}Breezemodule so the adapter survives target upgrades and works even when the target lives in read-onlyvendor/. - Sequence after the target and Swissup_Breeze.
module.xmldeclares<sequence>on{Vendor}_{Module}andSwissup_Breezeso layout/JS load in the right order. - One target per invocation. Adapt one module per run.
- Append-safe. If the companion module already exists, merge into
breeze_default.xmland add new widget files — never clobber existing adapter code. - Breeze-only layout. Layout files are
breeze_-prefixed so they never affect blank/luma. - Prefer Better Compatibility when a port isn't warranted. For a module that only needs its
existing RequireJS to keep working, register it under the
breeze.jsbetter_compatibilityarray instead of hand-porting every widget. Seereferences/breeze-js-conversion.md. - Coding style. Generated PHP follows PER-CS 3.0 with Magento 2 precedence;
--standard=Magento2PHPCS is the gate (context/references/php-coding-style.md). - Source of truth. Generate from templates → shared references → baked-in Magento 2 knowledge
→ official Magento/Adobe docs (live-fetched only when uncertain). Do NOT read, grep, or "study"
other modules under
app/code/vendor/*/Magento core to infer conventions, entity shapes, naming, or wiring. Narrow exceptions: the target module/class of this operation, and the specific contract of a module this code explicitly depends on. Affirm sources in the final report. Seecontext/references/source-of-truth.md.
Workflow
Phase 0 — Context Resolution
Invoke context. Capture theme.breeze, vendor, php_constraint,
framework_constraint. Enforce the Breeze-required rule.
Phase 1 — Scope
- Identify the target module
{Vendor}_{Module}and locate it (app/codeorvendor/). - Recommended: run
breeze-compaton the target first; its findings tell you which surfaces need adapting (which widgets to port vs. enable Better Compatibility for). - Decide surfaces: JS widgets (port) and/or Better Compatibility (register), CSS (move to
breeze/_default.less), layout (move blocks). - Name the companion:
{Vendor}_{Module}Breezeunder{ctx.magento_root}/app/code/{Vendor}/{Module}Breeze/.
Phase 2 — Generate companion module
From templates:
registration.php(templates/registration.php) — registers{Vendor}_{Module}Breeze.etc/module.xml(templates/module.xml) —<sequence>target +Swissup_Breeze.composer.json(templates/composer.json).view/frontend/layout/breeze_default.xml(templates/breeze_default.xml) — registers the widget component (and a commentedbetter_compatibilityalternative) onbreeze.js.view/frontend/web/css/breeze/_default.less(templates/breeze_default.less) —@critical.view/frontend/web/js/breeze/widget.js(templates/breeze-widget.js) — one Cash$.widgetstub per detected widget, each with a TODO pointing at the original source.
Phase 3 — Enable & verify
xmllint --noouton XML,node --checkon JS,php -lon PHP.- Apply the shared module-hygiene baseline (required). After generating the companion
module's PHP files, run
${CLAUDE_PLUGIN_ROOT}/skills/context/scripts/add-license-headers.sh {ctx.magento_root}/app/code/{Vendor}/{Module}Breeze {Vendor}to stamp the standard copyright header onto every new.php(idempotent — it skips files that already carry it, so re-running when merging into an existing companion is safe). When adding acomposer.jsonrequireentry, resolve a bounded constraint via${CLAUDE_PLUGIN_ROOT}/skills/context/scripts/resolve-dep-constraint.sh <vendor/package>— never"*". Seecontext/references/module-hygiene.md. {ctx.magento_cli} setup:upgrade {ctx.magento_cli} setup:static-content:deploy -f- Test on a Breeze page with
?breeze=1&compat=1(debug mode) and watch the console for the module's activation message.
Inputs
/breeze-adapt <Vendor_Module> [--better-compatibility-only]Outputs
A companion module under {ctx.magento_root}/app/code/{Vendor}/{Module}Breeze/.
Reference Files
references/breeze-module-patterns.md— companion-module rationale,<sequence>, thebreeze_layout rule,web/css/breeze/auto-include,breeze.jsregistration (component vsbetter_compatibility).references/breeze-js-conversion.md— mapping RequireJS/Knockout/jQuery widgets to Breeze Cash$.widget,data-mage-init/x-magento-inithandling, Cash gaps.context/references/source-of-truth.md— source-of-truth hierarchy + the no-unrelated-module-scanning rule (allowed reads, live-doc fetch protocol, report affirmation).
Templates
templates/registration.phptemplates/module.xmltemplates/composer.jsontemplates/breeze_default.xmltemplates/breeze_default.lesstemplates/breeze-widget.js
Acceptance Criteria
- A companion
{Vendor}_{Module}Breezemodule is generated; the target module is unchanged. module.xmlsequences the target andSwissup_Breeze.- XML passes
xmllint, JS passesnode --check, PHP passesphp -l. - The skill refuses (with the install command) when
theme.breeze.installedisfalse.
Related Skills
| Phase | Skill |
| 0 | context |
| 1 (recommended first) | breeze-compat to find what needs adapting |
| (sibling) | extension-point for non-Breeze plugin/observer/preference wiring |
| (theme) | breeze-theme for a new Breeze theme |
In this repository35 other files it gives its agents.
- a11y-auditSkill
- admin-formSkill
- admin-listingSkill
- auditSkill
- breeze-compatSkill
- breeze-themeSkill
- cli-commandSkill
- contextSkill
- data-migrationSkill
- debugSkill
- deploySkill
- docsSkill
- eav-attributeSkill
- extension-pointSkill
- featureSkill
- fixSkill
- frontendSkill
- graphqlSkill
- i18nSkill
- indexerSkill
- lintSkill
- marketplaceSkill
- message-queueSkill
- module-createSkill
- perf-auditSkill
- releaseSkill
- remediateSkill
- reviewSkill
- securitySkill
- system-configSkill
- test-generateSkill
- triageSkill
- upgradeSkill
- webapiSkill
- widgetSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

