agentleFS
muon-m2muon-m2/magento2-tools/skills/frontend/SKILL.md

frontend

Skill6 starsChanged 28 days agoMITView on GitHub

Frontend scaffolding for Magento 2: themes, RequireJS modules, Knockout components, LESS/CSS, transactional email templates, static asset wiring. Use to add frontend behaviour or a theme. Detects Luma, Hyva, or a custom theme and generates matching scaffolds. For Swissup Breeze stores (magento2-tools:context theme.breeze) defer theme creation to magento2-tools:breeze-theme and widget/JS work to magento2-tools:breeze-adapt. For a CMS widget (etc/widget.xml) use magento2-tools:widget.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Append-safe: Never overwrite an existing requirejs-config.js or email_templates.xml — append/merge.

    line 32
  2. Very specific:

    If the theme is Hyva and the user asks for ko-component, suggest alpine-component instead — Hyva doesn't run Knockout.

    line 57
  3. Very specific:

    If theme.breeze.active is true (or the user asks for a "Breeze theme" / "Breeze child theme") and the operation is theme → stop and route …

    line 62
  4. Very specific:

    If theme.breeze.active is true and the operation is requirejs-module or ko-component, note that Breeze does not run RequireJS/Knockout on …

    line 67
  5. Very specific:

    If theme.breeze.installed is true but active is false, surface that Breeze is installed but not the active theme, and ask which stack the …

    line 72
  6. Very specific:

    Apply the shared module-hygiene baseline (required): After generating or modifying PHP files, run …

    line 120

“Common” is measured: kept by at least 6 in 10 of the 42 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Magento 2 Frontend Create

Frontend-specific scaffolding module-create doesn't cover.

Core Rules

  • Theme-aware. Detect theme from context (Luma / Hyva / custom). Hyva installs use Alpine.js + Tailwind, NOT Knockout/RequireJS.
  • Breeze-aware. context emits a separate theme.breeze object (installed / active / parent) for Swissup Breeze (Breezefront) stores. Breeze replaces RequireJS/Knockout/jQuery with a Cash-based stack, and a Breeze child theme has a different layout (web/css/breeze/_default.less with @critical guards, a Swissup/breeze-* parent, a Breeze-only layout handle). This skill does NOT scaffold Breeze themes or Breeze widgets — it routes them: theme work → breeze-theme, widget/JS adapter work → breeze-adapt. See Phase 1.
  • One operation per invocation. Each call generates ONE of: theme, RequireJS module, KO/Alpine component, LESS scaffold, email template, static asset.
  • Layout-driven. Generated assets include the layout XML to activate them, not just the source files.
  • Append-safe. Never overwrite an existing requirejs-config.js or email_templates.xml — append/merge.
  • Coding style. Any generated PHP (blocks, ViewModels) follows PER-CS 3.0 as the baseline, with the Magento 2 coding standard taking precedence on any conflict; --standard=Magento2 PHPCS is the gate. See 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. See context/references/source-of-truth.md.

Workflow

Phase 0 — Context Resolution

Invoke context. Capture theme detection result.

Phase 1 — Operation Plan

Ask:

  • Operation: theme | requirejs-module | ko-component | alpine-component | email-template | static-asset
  • Parent theme (for theme operation)
  • Module to host (for non-theme operations)

If the theme is Hyva and the user asks for ko-component, suggest alpine-component instead — Hyva doesn't run Knockout.

Breeze routing (check theme.breeze from Phase 0):

  • If theme.breeze.active is true (or the user asks for a "Breeze theme" / "Breeze child theme") and the operation is theme → stop and route to breeze-theme. A Breeze child theme is not a Luma/Hyva scaffold; generating one here would produce the wrong structure (Luma web/css/source/ instead of Breeze web/css/breeze/ with @critical guards, and a Luma parent instead of Swissup/breeze-*).
  • If theme.breeze.active is true and the operation is requirejs-module or ko-component, note that Breeze does not run RequireJS/Knockout on Breeze-enhanced pages. Generate the Luma-fallback scaffold if the user still wants it, but suggest breeze-adapt to add the matching Cash $.widget adapter (run breeze-compat first to see what needs adapting).
  • If theme.breeze.installed is true but active is false, surface that Breeze is installed but not the active theme, and ask which stack the user is targeting before scaffolding.

Phase 2 — Generate

Per operation:

Theme

  • theme.xml, registration.php, composer.json
  • Parent theme reference
  • web/css/source/_extend.less
  • view.xml
  • Magento_Theme/layout/default.xml stub

RequireJS module

  • view/frontend/web/js/{name}.js with module pattern
  • view/frontend/requirejs-config.js registration (append-safe)

Knockout component (UI component)

  • Component class extending uiComponent
  • HTML template
  • LESS/CSS sibling
  • Layout XML wiring

Alpine component (Hyva)

  • view/frontend/templates/{name}.phtml with x-data, x-show, etc.
  • view/frontend/layout/{handle}.xml to render the template

Email template

  • view/frontend/email/{name}.html
  • etc/email_templates.xml registration (append-safe)
  • etc/config.xml default path

Static asset

  • view/frontend/web/css/... or view/frontend/web/images/...
  • Layout reference

Phase 3 — Verify

  • xmllint --noout on every XML file.
  • node --check on every JS file.
  • npm run lint if the project has a JS linter.
  • Apply the shared module-hygiene baseline (required). After generating or modifying PHP files, run ${CLAUDE_PLUGIN_ROOT}/skills/context/scripts/add-license-headers.sh <path> {Vendor} — where <path> is the host app/code/{Vendor}/{Module}/ (or the app/design/frontend/{Vendor}/{Theme}/ theme dir) — to stamp the standard copyright header onto every new .php (idempotent — it skips files that already carry it). When adding a composer.json require entry, resolve a bounded constraint via ${CLAUDE_PLUGIN_ROOT}/skills/context/scripts/resolve-dep-constraint.sh <vendor/package> — never "*". See context/references/module-hygiene.md.

Phase 4 — Report

Brief: files created + activation commands.

Theme generation requires:

{ctx.magento_cli} setup:upgrade
{ctx.magento_cli} setup:static-content:deploy -f

Docs may now be stale. This change modified module code. Run docs --module={Vendor}_{Module} to refresh the module's README, CHANGELOG, and docs/*.md (technical reference, guides, and API references as applicable).

Inputs

/frontend <operation> [operation-specific flags]

Outputs

Files written under {ctx.magento_root}/app/code/{Vendor}/{Module}/view/frontend/ or src/app/design/frontend/{Vendor}/{Theme}/.

Reference Files

  • references/theme-patterns.md — Luma inheritance, Hyva inheritance, custom theme.
  • references/requirejs-patterns.md — module structure, deps, shim.
  • references/ko-component-patterns.md — UI component vs KO-only.
  • references/alpine-patterns.md — Hyva Alpine.js patterns.
  • references/less-css-rules.md — _module.less convention, var/mixin scoping.
  • references/email-template-rules.md — Magento-specific variable syntax, fallback paths.
  • references/static-asset-rules.md — publish path, fallback chain.
  • 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/theme.xml
  • templates/theme-registration.php
  • templates/theme-composer.json
  • templates/theme-view.xml
  • templates/requirejs-module.js
  • templates/requirejs-config.js
  • templates/ko-ui-component.js
  • templates/ko-ui-component.html
  • templates/alpine-component.phtml
  • templates/email-template.html
  • templates/email_templates.xml
  • templates/_extend.less

Theme Awareness

Detected themeDefault scaffolds
LumaStandard Magento patterns; RequireJS-heavy
HyvaTailwind/Alpine.js; no KO; AlpineJS components instead
Breeze (theme.breeze.active)Cash-based stack; no RequireJS/KO. Route theme → breeze-theme, widgets → breeze-adapt
CustomAsk user; default to Luma unless told otherwise

Acceptance Criteria

  • Theme generation produces a working theme registered in app/design/frontend/.
  • RequireJS modules pass node --check.
  • KO components render in browser without errors when wired correctly.
  • Hyva-detected projects do NOT receive KO scaffolds — Alpine scaffolds instead.

Related Skills

PhaseSkill
0context
1 (Breeze theme)breeze-theme — scaffold a Swissup Breeze child theme
1 (Breeze widget/JS)breeze-adapt — build the Breeze Cash adapter; breeze-compat to scope it first
(after Phase 3)review for the host module
(caller)feature Phase 5 (F* tasks)

Download now (ZIP)

  • Other versions48 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 48

    1. langwatch/langwatch★ 5ksame name
    2. atopile/atopile★ 4ksame name
    3. leookun/cursor-byok★ 3.2ksame name
    4. theopenco/llmgateway★ 1.7ksame name
    5. notque/vexjoy-agent★ 443same name
    6. notque/claude-code-toolkit★ 442same name
    7. AlexPEClub/ai-coding-starter-kit★ 382same name
    8. OyadotAI/oya-browser★ 351same name
    9. speakeasy-api/gram★ 275same name
    10. ThePrimeagen/skills★ 234same name

    38 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use programming, backend and 6 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • DevNewbie1826Skill

      programming

      MUST USE for work on Python, Rust, TypeScript, or Go source files and project manifests. Triggers: write or edit code; new project; Go HTTP service (gin lane); Bubble Tea TUI; CJK IME; Connect-Go RPC; sqlc or pgx; branded IDs; exhaustive matching; unsafe Rust; Miri; oversized file; refactoring; logging, log levels, structured logging, or observability; arena, allocator, bumpalo, const fn, const generics, compile-time programming, zero-allocation APIs, bitfields, repr, scope guards, errdefer-style cleanup, Zig-like patterns, zero-copy parsing, packed data, or FFI; Rust public API design or macros.

      Also in 3 projects that use this

    • wewpellex21Skill

      backend

      Servers, routes, APIs, and backend architecture. Activated when Claude creates server-side code, API routes, or Express/Fastify/Next.js API handlers.

      Also in 7 projects that use this

    • launch52-aiSkill

      data

      Generate data layer code (Freezed DTOs, repository implementations, data sources) from feature specifications or API references. Creates the bridge between domain entities and external data sources. Use after /domain to implement the data layer.

      Also in 4 projects that use this

    • AnthropicSkill

      architecture

      Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.

      Also in 7 projects that use this

    • BlockSkill

      debugging

      Debugging guidelines and best practices

      Also in 5 projects that use this

    • MicrosoftSkill

      help

      Entry point for the MedImageInsight plugin, covering the getting-started walkthrough, how the skills work, what MI2 is, and troubleshooting.

      Also in 4 projects that use this

  • In this repository35 other files it gives its agents.

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.