mf-context

Collects the current project's Module Federation context (MFContext) and outputs a structured summary. Serves as the data foundation for all MF diagnostic Skills; can also be called standalone to quickly understand the project's MF configuration.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "mf-context" with this command: npx skills add module-federation/core/module-federation-core-mf-context

Collect the following information step by step from $ARGUMENTS (defaults to the current working directory if empty), then output the aggregated MFContext.

1. Basic Info

Read {projectRoot}/package.json and extract:

  • name: project name
  • Merge dependencies + devDependencies into a full dependency map

Detect the package manager (check files in order):

  • pnpm-lock.yaml → pnpm
  • yarn.lock → yarn
  • package-lock.json → npm

2. Bundler & MF Config

Find config files in the following priority order (.ts / .mts take precedence over .js / .mjs / .cjs):

PriorityFilename
1module-federation.config.{ts,mts,js,mjs,cjs}
2rsbuild.config.{ts,mts,js,mjs,cjs}
3rspack.config.{ts,mts,js,mjs,cjs}
4modern.config.{ts,mts,js,mjs,cjs}
5next.config.{ts,mts,js,mjs,cjs}
6webpack.config.{ts,js}

Read the first matched file and extract the remotes, exposes, and shared fields. Determine the bundler from the filename (rspack / rsbuild / webpack).

3. Determine MF Role

ConditionRole
Has remotes and exposeshost+remote
Only remoteshost
Only exposesremote
Neitherunknown

4. Recent Error Event (optional)

Check if .mf/diagnostics/latest.json exists; if so, read its contents.

5. Build Artifacts (optional)

Check if dist/mf-manifest.json and dist/mf-stats.json exist; if so, read them.


Aggregate the above information and output the MFContext summary in the following structure:

project:
  name, packageManager, mfRole

bundler:
  name, configFile

mfConfig:
  remotes, exposes, shared

dependencies:
  (list installed packages related to MF and their versions)

latestErrorEvent: (if present)
buildArtifacts:   (if present)

For further diagnostics, call the corresponding diagnostic Skill based on this context.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

mf-integrate

No summary provided by upstream source.

Repository SourceNeeds Review
General

mf-docs

No summary provided by upstream source.

Repository SourceNeeds Review
General

mf-perf

No summary provided by upstream source.

Repository SourceNeeds Review