microfrontends
Skill0 starsChanged 55 days agoMITView on GitHub
Analyze and reason about microfrontend architectures. Use when the user types /microfrontends or mentions microfrontend(s), shell, host, remote, module federation, or native federation. Detects federation type, host/remote topology, vertical vs horizontal split, per-app technology, communication patterns, and route ownership — asking clarifying questions instead of guessing.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- openai/pluginstheir own version, first seen Oct 13, 2026
- vercel/vercel-plugintheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- openai/plugins★ 7.8ksame name
- vercel/vercel-plugin★ 328same name
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.
In this repository15 other files it gives its agents.
- ai-scaffoldingSkill
- comment-hygieneSkill
- reviewer-cloudflareSkill
- reviewer-dataSkill
- reviewer-docsSkill
- reviewer-godotSkill
- reviewer-pythonSkill
- reviewer-readabilitySkill
- reviewer-shellSkill
- reviewer-toolingSkill
- reviewer-unitySkill
- reviewer-webSkill
- reviewerSkill
- startup-scriptSkill
- typed-blocksSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 19 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
If none of these exist, ask:
- Distinctive: line 33
If the user says no, stop and say so.
- Distinctive: line 45
If neither key exists but federation tooling is present, ask the user whether this app is the host or a remote.
- Distinctive: line 50
ask how many remote apps exist in the whole system
- Distinctive: line 52
if remotes are discovered via a runtime manifest, ask for the manifest content or endpoint
- Distinctive: line 55
ask for the host/shell path
- Distinctive: line 56
ask whether other remotes exist in the system (and their paths)
- Distinctive: line 59
treat it as the full system graph: identify the host, the remotes, and the relationships between them
- Distinctive: line 60
no path questions needed — everything is local
- Distinctive: line 64
Always confirm your topology conclusion with the user before producing the final report, e.g.:
- Distinctive: line 113
Check whether remotes are wrapped as Web Components.
- Distinctive: line 149
If found, analyze that library first — it defines the system's real contracts (event payload types, route prefix registration, error …
- Distinctive: line 160
Always return exactly these sections:
- Distinctive: line 171
If anything remains uncertain, list the open questions instead of filling gaps with guesses.
- Distinctive: line 175
Prefer deterministic reasoning over guessing.
- Distinctive: line 176
Ask before assuming architecture structure.
- Distinctive: line 177
Keep interactions minimal but precise — batch related questions.
- Distinctive: line 178
Do not hallucinate missing config files.
- Distinctive: line 188
Plan for a remote failing to load: Every federated module needs an explicit failure path: an error route, a fallback UI, or a degraded page.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Microfrontends Architecture Analysis
You are analyzing a codebase to understand and evaluate its microfrontend architecture. Work deterministically: every conclusion must be explainable from code evidence you actually found. Never invent config files or architecture facts. When evidence is unclear, ask the user — do not guess.
Terminology
- Host = shell: the container application that composes the system. A microfrontend setup has one host and multiple remotes. If you find more than one host-like app, treat it as an anomaly and confirm with the user before proceeding.
- Remote = microfrontend (MFE): an independently built and deployed feature application consumed by the host.
Step 1 — Confirm microfrontend context
Inspect the project for federation evidence:
federation.config.js(or.ts/.mjs)- content mentions
native-federationor@angular-architects/native-federationor@softarc/native-federation-node→ Native Federation
- content mentions
webpack.config.js/module-federation.config.*- content mentions
ModuleFederationPluginormodule-federationor@angular-architects/module-federation→ Webpack Module Federation
- content mentions
vite.config.*with@originjs/vite-plugin-federationor@module-federation/vite→ Module Federation via Viterspack.config.*with Module Federation plugin → Module Federation via Rspackfederation.manifest.json→ Native Federation manifest (top-level keys are remote names)initFederation('<url or path to manifest.json>')in the bootstrap file → Native Federation host with a runtime-fetched manifest: the remote list comes from an endpoint at startup (often cached onwindow), not from static config. In that case the config files alone will not show all remotes — check the manifest endpoint or ask the user for the deployed manifest content.
If none of these exist, ask:
"Is this a microfrontend architecture?"
If the user says no, stop and say so. If yes, treat the integration as custom and continue.
Step 2 — Determine architecture topology
Detection rules on federation configs:
- declares
remotes: { ... }, or fetches a remotes manifest at runtime → HOST - declares
exposes: { ... }→ REMOTE - declares both → bidirectional (host that also exposes) — uncommon, confirm intent with the user
Expect exactly one host. Multiple remotes are normal; multiple hosts are not — if detected, ask whether the system intentionally runs several shells (e.g. one per product line) or whether one of them is legacy/experimental.
If neither key exists but federation tooling is present, ask the user whether this app is the host or a remote. Do not guess.
Step 3 — Architecture clarification flow
If HOST detected:
- ask how many remote apps exist in the whole system
- request absolute local paths for each remote so they can be analyzed too
- if remotes are discovered via a runtime manifest, ask for the manifest content or endpoint
If REMOTE detected:
- ask for the host/shell path
- ask whether other remotes exist in the system (and their paths)
If MONOREPO (multiple apps with federation configs under one repo):
- treat it as the full system graph: identify the host, the remotes, and the relationships between them
- no path questions needed — everything is local
Note that remotes often support two run modes: standalone (own dev server, routes mounted at /) and hosted (mounted under a route prefix inside the shell). Indicators: a runtime flag such as window.isHosted, route definitions registered twice (with and without a prefix), or a guard that prepends the prefix when hosted. Analyze the hosted mode as the system architecture; mention standalone capability as a strength.
Always confirm your topology conclusion with the user before producing the final report, e.g.:
"I detected 1 host (shell) and 3 remotes (shop, cart, profile). Correct?"
Step 4 — Classify vertical vs horizontal split (IMPORTANT)
Vertical split — a remote is loaded per route; each route prefix maps to exactly one remote:
/checkout → checkout remote
/profile → profile remoteNOTE: the mapping is one remote per route prefix, not one route prefix per remote — a single remote may own several prefixes:
/cart → checkout remote
/checkout → checkout remoteEvidence: remote imports inside routing config (loadChildren, loadRemoteModule, lazy: () => import('remote/...')), custom URL matchers (startsWith-style) binding path prefixes to a remote, or wrapper-component routes carrying the remote name in route data.
Horizontal split — a single route renders components from MULTIPLE remotes; composition happens inside the route:
/dashboard → header remote + charts remote + notifications remoteEvidence: a component (not a route file) imports from several remotes, or multiple remotes referenced within one route entry.
You MUST explicitly classify the system as vertical, horizontal, or mixed. If route evidence is missing or ambiguous, ask the user which model applies instead of guessing.
Step 5 — Technology detection per app
For each app determine:
- Framework: React / Angular / Vue / Svelte / Solid / other — from
package.jsondependencies, falling back to import statements when there is no per-apppackage.json(common in Nx-style monorepos) - Build system: Webpack / Vite / Rspack / esbuild / Angular CLI / Nx
- Federation approach: Module Federation / Native Federation / none / custom
- Shared dependency strategy:
shared/shareAllconfig, singleton flags,requiredVersionpolicy
Then report:
- compatibility risks (e.g. Webpack MF and Native Federation runtimes do not interoperate without an adapter)
- version mismatch warnings — different majors of the same framework across apps break shared singletons at runtime; web-component isolation removes that constraint (see Step 6)
- integration suggestions
Step 6 — Web Component architecture detection
Check whether remotes are wrapped as Web Components. Indicators:
customElements.define(...)— often in the remote's exposed bootstrap filedocument.createElement('<element-name>')— hosts that mount remotes as custom elements create them this way inside a wrapper component, thenappendChildinto the viewcreateCustomElement(...)from@angular/elements(Angular), or equivalent framework-to-custom-element adapters- shadow DOM usage (
attachShadow) - a remote exposing a single generic entry (e.g.
./web-components→bootstrap.ts) instead of exposing framework modules/components directly - a host-side wrapper component that loads the remote, creates its element, assigns props as element properties, and subscribes to element events via
addEventListener
If yes:
- assume framework (and framework-version) isolation is intentional — mixed frameworks and mixed versions are acceptable in this design
- recommend DOM-based communication only: attributes/properties in, CustomEvents out
Step 7 — Communication analysis
Detect and classify how host and remotes talk to each other:
- Preferred: native browser events —
new CustomEvent(...)/dispatchEvent. A common robust variant is a thin event-bus service pair (one on the host side, one on the remote side) built on CustomEvents dispatched againstdocument.bodyorwindow, with named channels (e.g.host→remoteandremote→hostevent types) and a typed payload envelope like{ type, action, ...data }. This is still the native-events model — classify it as preferred. - Router synchronization events: hosts and remotes with separate router instances often sync URLs by dispatching navigation CustomEvents both ways. Map these as part of the communication model.
- shared global stores: Redux, Zustand, NgRx, Pinia, Vuex, MobX, Jotai, Recoil
- event bus libraries: mitt, eventemitter2/3, nanoevents, postal
postMessage- window globals (
window.__something, runtime flags, cached manifests)
Always recommend native browser events as the primary integration mechanism. Shared stores couple teams on state shape and library versions; flag them as a risk when they cross app boundaries. Window globals used as one-time bootstrap context (hosted flag, manifest cache) are a lesser concern than globals used for ongoing state — distinguish the two.
Step 8 — Shared enabling library detection
Mature setups often centralize the microfrontend plumbing in an internal shared library. Indicators:
- a package whose name matches the
*/microfrontendspattern, where*is usually the company or organization scope — e.g.@company/microfrontends. Checkpackage.jsondependencies and import statements for it first - an internal package with separate
host,remote, andsharedentry points - bootstrap helpers used by every app (e.g.
bootstrapComponent(...)/bootstrapModule(...)wrappers) - a remote-wrapper component, remote-loader/preloader service, or route-prefix guard imported from that package
- shared event/notification/translation bridge services and typed event contracts
If found, analyze that library first — it defines the system's real contracts (event payload types, route prefix registration, error fallbacks, version/runtime caching). Report it as a strength: one place owns the integration rules instead of each app reinventing them.
Step 9 — Route ownership mapping
- Vertical split: map every route prefix to its owning remote, grouping prefixes per remote — remember a remote can own several prefixes (
/cartand/checkout→ checkout remote). - Horizontal split: map which components from which remotes appear on each route.
- Cite the file where each mapping was found (route config, URL matcher, manifest).
- Flag remotes that are declared in config or manifest but never referenced in routes or components (dead config or dynamically resolved — verify with the user).
Step 10 — Output format
Always return exactly these sections:
- Architecture type — host / remote / monorepo / mixed
- Federation type — webpack / native / custom / none
- Split classification — vertical / horizontal / mixed, with the evidence
- App technology map — framework, version, build system, federation role per app
- Route/component ownership map — grouped per remote
- Communication model — what is used today, what is recommended
- Risks & issues
- Suggested improvements
If anything remains uncertain, list the open questions instead of filling gaps with guesses.
Engineering principles
- Prefer deterministic reasoning over guessing; every conclusion cites a file.
- Ask before assuming architecture structure.
- Keep interactions minimal but precise — batch related questions.
- Do not hallucinate missing config files.
Microfrontend knowledge base
Apply these principles when writing risks and suggestions:
- Independent stacks. The value of microfrontends is that each team ships on its own release cycle with its own framework and versions. Anything that forces lockstep upgrades across apps (shared singletons with strict version pins, a common store, a shared runtime) erodes that value — call it out.
- Hard boundaries between apps. Apps should not reach into each other's runtime: no shared mutable state, no cross-app service injection, no globals carrying live data. Each remote must be able to build, test, and deploy alone.
- Namespace everything that crosses the boundary. Event names, CSS classes, storage keys, cookies, and custom-element tag names need an app- or team-specific prefix so ownership is obvious and collisions are impossible.
- Standard platform APIs beat bespoke contracts. DOM events, element properties, and URLs are stable, debuggable, and framework-neutral. A custom bridge or shared library API is acceptable only as a thin typed layer over those primitives — not as a replacement for them.
- Plan for a remote failing to load. Every federated module needs an explicit failure path: an error route, a fallback UI, or a degraded page. A remote outage must never blank the whole shell.
- The shell stays generic. Routing, layout, auth session, cross-cutting UI (nav, notifications) — yes. Feature/domain logic — no. Domain code in the shell recreates the monolith with extra steps.
- The URL is the strongest contract. Route prefixes are the cleanest ownership boundary between shell and remotes. Prefer encoding shared context (selected entity, tenant, view state) in the URL over pushing it through events or storage.
- Directional communication. Into a remote: attributes/properties at mount time, then targeted events for updates. Out of a remote: CustomEvents the shell subscribes to. Keep payloads small, serializable, and versionable.
- Support standalone mode for remotes. Remotes that can also run outside the shell (routes mounted at
/, hosted mode toggled by a runtime flag, prefix applied by a guard) are faster to develop and test — recommend this capability where it is missing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

