Command Palette

Search for a command to run...

Назад к скиллам
скилл № 33799

microfrontend

Use when the user asks to split the web app into independently deployed micro frontends, Module Federation, remoteEntry/mf-manifest, import maps, single-spa…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить microfrontend в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Microfrontend Architecture

Purpose

Design microfrontend architectures with integration strategy, shared dependency management, and cross-app communication protocols.

Agent Protocol

Trigger

User request includes: microfrontend, micro-frontend, module federation, mf, mfe, frontend composition, federated module, webpack federation, rspack federation.

Input Context

  • Number of frontend teams
  • Current frontend architecture (monolith SPA, multi-page)
  • Framework preferences (React, Vue, Angular, Solid)
  • Build tool (Webpack 5, Rspack, Vite)
  • Deployment platform (Kubernetes, S3/CDN, Netlify, Vercel)
  • Integration requirements (auth, navigation, cross-app communication)

Output Artifact

A markdown document containing:

  • Microfrontend composition approach (Module Federation, iframe, Web Components) with rationale
  • Shared dependency strategy (singleton vs shared vs standalone)
  • Cross-app communication protocol
  • Shell/Host application design
  • Deployment pipeline per microfrontend
  • Migration plan from monolith SPA

Response Format

Produce the artifact directly. No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick. If monolith SPA is appropriate, output Monolith SPA recommended. Reason: [reason]. and stop.

——

Completion Criteria

  • Integration method selected with comparison to alternatives
  • Shared dependency graph is defined (what is shared, what is isolated)
  • Communication protocol between microfrontends is specified
  • Each microfrontend has independent deployment pipeline
  • Migration strategy is ordered in phases

Max Response Length

4096 tokens

Microfrontend Architecture / Decision Trees

Integration Method Decision Tree

Number of independent teams?
  |-- 1-2 teams -->
  |     |-- Monolith SPA recommended (microfrontend overhead not justified)
  |     |-- Alternative: monorepo with package boundaries
  |
  |-- 3+ teams on same product -->
  |     Same framework across all teams?
  |     |-- YES -->
  |     |     Module Federation (best sharing, smallest total bundle)
  |     |     Build tool? Webpack 5 / Rspack / Vite (with federation plugin)
  |     |
  |     |-- NO -->
  |           Strict isolation needed? (different auth, sandboxed, legacy app)
  |           |-- YES: iframe (complete isolation, poor perf/SEO)
  |           |-- NO: Web Components (framework-agnostic, Shadow DOM)

MFE Granularity Decision Tree

What is the boundary?
  |-- Feature / domain (orders, products, users) -->
  |     GOOD -- team-aligned, independent deploy, clear ownership
  |
  |-- Page / route (home, checkout, settings) -->
  |     GOOD -- natural routing boundary, can be lazy-loaded
  |
  |-- Single component (button, card, modal) -->
  |     BAD -- too fine-grained, federation overhead > benefit
  |     Instead: shared component library via federation or package

Shared Dependency Decision Tree

What type of library?
  |-- Framework (React, Vue, Angular, ReactDOM) -->
  |     MUST be singleton. Two instances break hooks/context/events.
  |
  |-- State management (Redux, Zustand, Pinia) -->
  |     Singleton if shared state. Standalone if isolated per MFE.
  |
  |-- Utility library (lodash, date-fns, axios) -->
  |     Shared with version range (same version reused, fallback to standalone).
  |
  |-- Component library (design system) -->
        Singleton (shared as federated module for visual consistency).

Workflow

Step 1: Assess Team and Architecture Context

Determine number of teams, current architecture, frameworks, build tools, and deployment platform.

Step 2: Select Integration Pattern

Choose between Module Federation, Web Components, iframe, or monolith SPA using the selection decision tree.

Step 3: Define Shared Dependency Strategy

Specify singleton, shared, or standalone approach per dependency. React/ReactDOM must be singleton.

Step 4: Design Cross-App Communication

Select methods: URL-based for navigation, shared state for auth, custom events for domain events, shared event bus for notifications.

Step 5: Configure Module Federation

Set up host and remote configurations with appropriate exposes, remotes, and shared dependencies.

Step 6: Plan Deployment Pipeline

Each microfrontend gets independent CI/CD with versioned remoteEntry.js and CDN deployment.

Step 7: Create Migration Plan

Phase extraction: identify boundaries, extract shell, configure federation, extract features one by one, replace monolith.

Rules

  • Microfrontend overhead only justified at 3+ independent teams on the same product
  • React and react-dom MUST be singleton — two instances break hooks, context, and event system
  • Never share remoteEntry.js directly — use CDN with long cache and versioned paths
  • Group microfrontends by team ownership and deployment boundaries, not by component granularity
  • Every MFE owns its data domain — no s
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/communication-strategies.md
  • references/merged-architecture-micro-frontends.md
  • references/merged-micro-frontends-adoption.md
  • references/merged-module-federation-runtime-sharing.md
  • references/merged-web-micro-frontends-import-maps.md
  • references/microfrontend-architecture.md
  • references/microfrontend-deployment.md
  • references/microfrontend-integration.md
  • references/microfrontend-testing.md
  • references/module-federation.md

FAQ

Что делает скилл microfrontend?

Use when the user asks to split the web app into independently deployed micro frontends, Module Federation, remoteEntry/mf-manifest, import maps, single-spa, Native Federation, shared singletons or cross-app communication. Produces the composition choice, host/remote config and deployment rules. Not for a single-team monorepo (use monorepo).

Как установить скилл microfrontend?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл microfrontend запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить microfrontend с