mfe-skills
AGENTS.md53 starsChanged 2 months agoMITView on GitHub
Micro-frontend architecture skills by Luca Mezzalira (mfe-skills v1.0.0). Full reference: https://github.com/lucamezzalira/mfe-skills Apply these rules when reviewing or generating code that crosses a team deployment boundary: shell mounting, cross-MFE communication, remote loading, or contract design. Essential: Pair this file with project-specific facts in the same AGENTS.md (which team owns which MFE, toolchain, routes.json location, known exceptions). Without that context, advice stays generic. Before generating MFE code, verify: If any answer is no, the boundary needs to be revisited before implementation. Install:…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository15 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/mfe-architecture-boundary-design.mdcCursor rule
- .cursor/rules/mfe-architecture-canvas-pointer.mdcCursor rule
- .cursor/rules/mfe-architecture-decisions.mdcCursor rule
- .cursor/rules/mfe-architecture.mdcCursor rule
- .cursor/rules/mfe-architecture-rules-ref.mdcCursor rule
- .cursor/rules/mfe-boundary-code-patterns.mdcCursor rule
- .cursor/rules/mfe-boundary-remediation.mdcCursor rule
- .cursor/rules/mfe-boundary-review.mdcCursor rule
- .cursor/rules/mfe-boundary-routing.mdcCursor rule
- .cursor/rules/mfe-boundary-rules-core-critical.mdcCursor rule
- .cursor/rules/mfe-boundary-rules-core-standard.mdcCursor rule
- .cursor/rules/mfe-boundary-toolchain.mdcCursor rule
- reviewing-mfe-boundariesSkill
- understanding-mfe-architectureSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 13
Before generating MFE code, verify:
- Distinctive: line 23
If any answer is no, the boundary needs to be revisited before implementation.
- Distinctive: line 51
No shared stores across boundaries.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
MFE Boundary Governance
Micro-frontend architecture skills by Luca Mezzalira (mfe-skills v1.0.0). Full reference: https://github.com/lucamezzalira/mfe-skills
Apply these rules when reviewing or generating code that crosses a team deployment boundary: shell mounting, cross-MFE communication, remote loading, or contract design.
Essential: Pair this file with project-specific facts in the same AGENTS.md (which team owns which MFE, toolchain, routes.json location, known exceptions). Without that context, advice stays generic.
Boundary health check
Before generating MFE code, verify:
- Is the API surface minimal, fewer than 5 props to the container?
- Is the MFE context-aware, does it retrieve its own data given minimal input?
- Is it less extensible than a component, not designed for reuse across domains?
- Is it coarse-grained, not fine enough to require constant coordination?
- Can it deploy without coordinating with other teams?
- Does it have a graceful fallback if it fails to load?
- Does a single team own it end-to-end?
If any answer is no, the boundary needs to be revisited before implementation.
The eight boundary rules
| Rule | Principle | Violation signals |
| 1 - Business subdomain | One MFE = one business capability owned by one team | Named after UI elements (Header, Sidebar), used across unrelated domains |
| 2 - Minimal API surface | Max ~5 props, identifiers only, no domain objects | Props like user, cart, order; shell fetching data for the MFE |
| 3 - Hides implementation | No cross-MFE imports; each MFE owns its data layer | import { x } from '@org/other-mfe/...'; path aliases masking cross-boundary imports |
| 4 - Events not shared state | Platform bus to shell; domain events peer-to-peer only; no shared stores | Shared Redux/Zustand; window.__mfe_*; shell listening to catalog:* / checkout:* |
| 5 - Independent deployment | No versioned remote URLs; no CI coupling | remotes: { checkout: '...@/v3.2.1/remoteEntry.js' }; CI needs: across MFE pipelines |
| 6 - Isolates failure | ErrorBoundary in shell at every mount; fallbacks in shell | No boundary; fallback only inside MFE; unhandled loadRemoteModule rejection |
| 7 - Coarse-grained | Shell first URL segment via manifest; MFE owns sub-routes | Shell routes like /catalog/product/:id; shell domain event handlers |
| 8 - Single team ownership | One team in CODEOWNERS per MFE | Multiple teams per MFE; no deployment owner |
Severity levels
- Critical (Rules 3, 4): Cross-boundary imports, shared state, shell domain event handlers.
- High (Rules 2, 5, 6): API surface, deployment coupling, missing error boundaries.
- Medium (Rules 1, 7, 8): Domain alignment, granularity, ownership.
Code generation defaults
- Props: identifiers only (
userId,cartId), never domain objects - Error handling: ErrorBoundary in the shell wrapping every remote mount
- Routing: shell loads only the first path segment from
routes.json; MFE owns deeper paths - Shell platform events:
shell:alert,shell:modal:*— nevercatalog:*,checkout:*in the shell - Cross-area navigation: URL (change first segment); MFE-to-MFE domain events only on the same page (horizontal split)
- No shared stores across boundaries; use URL, storage, or peer events
- Loading: runtime remote URLs, never version-pinned remotes in the shell build
- Auth: sessionStorage or fetch wrapper, never cross-MFE auth imports
Skills and Canvas
- Architecture and adoption:
understanding-mfe-architectureskill - Code review and shell generation:
reviewing-mfe-boundariesskill - Canvas facilitation: separate micro-frontend-canvas skill
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.

