Architecture Micro Frontends logo

Architecture Micro Frontends

Community
j4flmao
architecture-micro-frontends

Use this skill when the user says 'micro-frontends', 'MFE', 'Module Federation', 'split the frontend monolith', 'independent frontend deploys', 'single-spa', 'import maps', 'app shell with remotes'. Decides whether micro-frontends are justified and designs the split, composition technique (build-time, Module Federation, Web Components, server/edge composition, iframes), shared dependencies, routing, communication, and styling isolation. Do NOT use for: component library/design system work (frontend/universal/design-system), framework-specific architecture (frontend/<framework>), or bundler tuning unrelated to federation (frontend/universal/bundler-tools).

Overview

Publisherj4flmao
Repositoryagent-skills
Skill namearchitecture-micro-frontends
Stars
41
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by j4flmao on GitHub. Read the source before you install it.

Installation

Install the Architecture Micro Frontends AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/j4flmao/agent-skills/tree/main/skills/architecture/micro-frontends
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/architecture/micro-frontends .claude/skills/architecture-micro-frontends
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Architecture Micro Frontends in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Architecture Micro Frontends on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Architecture Micro Frontends is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Micro-Frontends

Purpose

Micro-frontends let independent teams build, test, and deploy parts of one web UI separately. They solve an organizational scaling problem (many teams blocking each other on one release), not a technical performance problem, and they add runtime complexity, duplication risk, and consistency work. Use them when team autonomy is the bottleneck; otherwise a well-structured modular monolith is cheaper.

Agent Protocol

Trigger

"micro-frontends", "MFE", "Module Federation", "remoteEntry", "single-spa", "import maps", "app shell", "independent UI deployments".

Input Context

  • Number of teams and how they map to product areas.
  • Current frontend stack(s), build tooling (webpack, Rspack, Vite), deployment pipeline.
  • Pain points: release coordination, build times, ownership conflicts.
  • SEO/SSR requirements and performance budgets.

Output Artifact

Go/no-go decision, domain split, composition approach, shared-dependency policy, contracts (routes, events), and governance rules.

Response Format

Decision: {MFE|modular monolith} because {reason}
Split: {MFE: owning team, routes}
Composition: {build-time|module federation|web components|server/edge|iframe}
Shared: {react@x singleton, design-system@y} policy={versions}
Comms: {URL/state params|CustomEvent|shared minimal store}
Styling isolation: {CSS Modules|Shadow DOM|prefix}
Perf budget: {JS KB per route}

Completion Criteria

  • MFEs split by business domain/route, not by technical layer.
  • One framework major version enforced for shared singletons.
  • Contracts between host and remotes versioned and tested.
  • Remote failures degrade gracefully (error boundary/fallback).
  • Performance budget measured per route.

Should You?

SignalPoints to
1-3 teams, one product areaModular monolith (monorepo packages, enforced boundaries)
Many teams blocked on one release trainMicro-frontends
Need to embed legacy app during migrationMFE (strangler pattern)
Mixed frameworks as a goal in itselfRed flag: cost without benefit

Composition Techniques

TechniqueWhen composedProsCons
Build-time packages (npm)BuildSimple, type-safeNot independently deployable (host must rebuild)
Module Federation (webpack 5, Rspack, @module-federation/* incl. Vite plugin)Runtime (JS)Independent deploys, shared singletonsTooling coupling, version skew at runtime
single-spa / import mapsRuntimeFramework-agnostic lifecycleMore glue code
Web ComponentsRuntime (DOM)Framework-agnostic, Shadow DOM isolationPassing rich data/callbacks is clunky; SSR limited
Server/edge composition (SSI/ESI, fragments)RequestGood for SEO and first paintInfra complexity, interactivity wiring
iframesRuntimeStrong isolationPoor UX for layout, routing, overlays, a11y

Module Federation Example (webpack 5)

js
// checkout/webpack.config.js  (remote)
const { ModuleFederationPlugin } = require("webpack").container;
const deps = require("./package.json").dependencies;

module.exports = {
  output: { publicPath: "auto", uniqueName: "checkout" },
  plugins: [
    new ModuleFederationPlugin({
      name: "checkout",
      filename: "remoteEntry.js",
      exposes: { "./CheckoutPage": "./src/CheckoutPage" },
      shared: {
        react: { singleton: true, requiredVersion: deps.react },
        "react-dom": { singleton: true, requiredVersion: deps["react-dom"] },
      },
    }),
  ],
};
js
// shell/webpack.config.js  (host)
new ModuleFederationPlugin({
  name: "shell",
  remotes: { checkout: "checkout@https://cdn.example.com/checkout/remoteEntry.js" },
  shared: { react: { singleton: true, requiredVersion: deps.react },
            "react-dom": { singleton: true, requiredVersion: deps["react-dom"] } },
});
tsx
// shell/src/routes.tsx
import { lazy, Suspense } from "react";
import { ErrorBoundary } from "react-error-boundary";

const CheckoutPage = lazy(() => import("checkout/CheckoutPage"));

export function CheckoutRoute() {
  return (
    <ErrorBoundary fallback={<p>Checkout is temporarily unavailable.</p>}>
      <Suspense fallback={<p>Loading checkout…</p>}>
        <CheckoutPage />
      </Suspense>
    </ErrorBoundary>
  );
}

For dynamic remote URLs per environment, load a manifest at runtime (Module Federation 2 runtime APIs or your own config endpoint) instead of hardcoding CDN paths.

Contracts and Communication

  • Routing: the shell owns top-level routes; each MFE owns its sub-routes.
  • Data: pass via URL/route params and props at the mount point; share auth/session via the shell, not via each MFE's own login.
  • Events: window.dispatchEvent(new CustomEvent("cart:item-added", { detail: { sku, qty } })) with a documented, versioned event catalog.
  • Shared state: keep it minimal (user, locale, feature flags), exposed through a small typed API from the shell; never a shared global Redux store whose shape other teams depend on.

Styling and Design Consistency

  • Scope styles: CSS Modules, CSS-in-JS with unique prefixes, or Shadow DOM for Web Components.
  • Share a design system as a versioned package (tokens + components); it is the main lever for consistent UX.
  • Avoid global resets inside remotes.

Performance

  • Share framework singletons; audit bundles per route for duplicated libraries.
  • Preload remoteEntry for likely-next routes; lazy-load the rest.
  • Set a JS budget per route and enforce it in CI.

Governance

  • Compatibility rules: host and remotes agree on React/Vue major version and design-system major version; upgrades are coordinated platform work.
  • Contract tests: shell smoke tests against each remote's deployed remoteEntry before promotion.
  • Independent rollback per remote (versioned remote URLs).

Anti-Patterns

  • Splitting by technical layer (header team, button team).
  • Multiple framework majors loaded on one page.
  • Shared mutable global store across teams.
  • Remote failure crashes the whole shell (no error boundary).
  • MFEs for a single team "for the future".

Checklist

  • Organizational justification recorded.
  • Domain-aligned split with route ownership.
  • Composition technique chosen per SEO/SSR needs.
  • Shared singleton and version policy enforced.
  • Event/prop contracts versioned and tested.
  • Style isolation + shared design system.
  • Per-route performance budget and fallback UI.

References

  • Geers, "Micro Frontends in Action" (Manning, 2020); martinfowler.com, "Micro Frontends" (Cam Jackson, 2019).
  • webpack Module Federation docs; module-federation.io (Module Federation 2, Rspack/Vite plugins); single-spa docs.

Frequently asked questions

What does the Architecture Micro Frontends AI skill do?

Use this skill when the user says 'micro-frontends', 'MFE', 'Module Federation', 'split the frontend monolith', 'independent frontend deploys', 'single-spa', 'import maps', 'app shell with remotes'. Decides whether micro-frontends are justified and designs the split, composition technique (build-time, Module Federation, Web Components, server/edge composition, iframes), shared dependencies, routing, communication, and styling isolation. Do NOT use for: component library/design system work (frontend/universal/design-system), framework-specific architecture (frontend/<framework>), or bundler...

Why use Architecture Micro Frontends on TypingMind?

Because you install it once and use it with any model. Architecture Micro Frontends is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Architecture Micro Frontends in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/j4flmao/agent-skills/tree/main/skills/architecture/micro-frontends. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Architecture Micro Frontends?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Architecture Micro Frontends?

As many as you like. As long as a model supports skills, you can use Architecture Micro Frontends with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Architecture Micro Frontends AI skill free?

Yes. It is published on GitHub by j4flmao under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇