mfe-skills / rules
Cursor rule53 starsChanged 2 months agoMITView on GitHub
Provides micro-frontend architecture vocabulary, principles, and decisions framework grounded in Building Micro-Frontends (O'Reilly). Use when a user asks "should we use micro-frontends?", "how do I split my frontend into MFEs?", "what is a micro-frontend?", "help me define MFE boundaries", "should I use horizontal or vertical split?", "how do micro-frontends communicate?", or "is my architecture a distributed monolith?". Requires independent deployment or multi-team scaling as the explicit context. Does not activate for single-team frontend architecture, component design, or build tooling questions with no cross-team deployment angle.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,527 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.
- AGENTS.mdAGENTS.md
- .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-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 mfe-architecture.mdc into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 23
If the user's terminology differs from the canonical definitions in the reference files, map it once to the canonical term, then continue …
- Distinctive: line 25
Do not revert to generic frontend advice once this skill is active.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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
--- description: Provides micro-frontend architecture vocabulary, principles, and decisions framework grounded in Building Micro-Frontends (O'Reilly). Use when a user asks "should we use micro-frontends?", "how do I split my frontend into MFEs?", "what is a micro-frontend?", "help me define MFE boundaries", "should I use horizontal or vertical split?", "how do micro-frontends communicate?", or "is my architecture a distributed monolith?". Requires independent deployment or multi-team scaling as the explicit context. Does not activate for single-team frontend architecture, component design, or build tooling questions with no cross-team deployment angle. alwaysApply: false --- # Micro-frontend core concepts Canonical vocabulary, principles, and decisions framework for micro-frontend architecture, as defined in *Building Micro-Frontends* (O'Reilly) and the Micro-Frontend Canvas (buildingmicrofrontends.com). ## Task routing Identify the task type first, then load the appropriate reference file. Do not load all files at once. | Task | Load | First action | |---|---|---| | Should we use MFEs? | `references/boundary-design.md` | Apply the organisational readiness gate before any implementation advice | | Defining or reviewing boundaries | `references/boundary-design.md` | Ask about team ownership before discussing technology | | Reviewing boundary validity or architecture for principle violations | `references/rules.md` → or load `reviewing-mfe-boundaries` skill for code-level detail | Run the boundary health check for validity; scan against the eight rules for violations | | Choosing composition, routing, or communication | `references/decisions-framework.md` | Confirm split strategy (vertical vs horizontal) before composition; shell owns first URL segment, MFE owns sub-routes | | Micro-Frontend Canvas facilitation | Install **micro-frontend-canvas** skill (see `references/canvas-pointer.md`) | Confirm domain is identified; do not facilitate Canvas from this skill | | Generating or reviewing MFE code | Load `reviewing-mfe-boundaries` skill | This skill handles code-level boundary enforcement | If the user's terminology differs from the canonical definitions in the reference files, map it once to the canonical term, then continue using theirs. Do not revert to generic frontend advice once this skill is active. Micro-frontend principles apply at the boundary between independently deployed units — not within a single unit. ## When not to activate Stand down if the question is purely about component composition, state management within a single deployed unit, or build tooling with no independent-deployment or team-scaling angle. --- ## Examples **Example 1 — adoption decision** User says: "We have three teams and our React monorepo is becoming a bottleneck. Should we migrate to micro-frontends?" Expected: Apply the organisational readiness gate. Ask about release independence before recommending. Load `references/boundary-design.md`. **Example 2 — boundary design** User says: "We've just done event storming and identified checkout, catalog, and account as bounded contexts. How should we split our frontend?" Expected: Load `references/boundary-design.md`. Ask which team owns each context before proposing a split. Point to the **micro-frontend-canvas** skill for a Canvas session per MFE. **Example 3 — communication pattern** User says: "We have two MFEs on the same page. When a user adds to cart in the catalog MFE, the basket MFE needs to update. How?" Expected: Load `references/decisions-framework.md`. Recommend event emitter. Explicitly rule out shared state managers. **Example 4 — architecture review** User says: "Is our current setup a distributed monolith?" Expected: Load `references/rules.md`. Run the boundary health check. Ask for team and deployment context. _Reference detail is split into separate rules in `.cursor/rules/` — load on demand._
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.

