---
name: mule-interface
description: "Implement a whole Mule 4 integration interface (one or more applications) from an interface specification document: plan the applications, flows and tests, ask only questions that block the build, build it with mule-flows, mule-dataweave, mule-munit and mule-project, and report each requirement with its flow and test. Use only to implement a complete interface; for a bug fix or a single flow, mapping, test or config change, even one that cites a specification, use those skills directly. Targets Mule 4.9."
license: Apache-2.0
compatibility: Python 3.9 or later (standard library only), JDK 17, Maven 3.9.x
---
# Mule 4 interface from a specification
This skill is the entry point for building an interface from its specification. It holds the order of the work, not the Mule rules: those, and the checks, are in four other skills. The specification is the file named after the command or in the request.
## Load the skill before you write
Before you write each kind of file, load its skill and follow its steps and checks. Do not write it from memory first.
| You are about to | Load first |
|---|---|
| Write or change flows, global elements, error handling, HTTP, APIkit, SOAP or Kafka | `mule-flows` |
| Write DataWeave: `ee:transform` scripts, `.dwl` modules, `#[...]` expressions with mapping logic | `mule-dataweave` |
| Write or change MUnit tests, mocks or coverage | `mule-munit`, and read its mocking reference before the first mock |
| Create a project, change `pom.xml`, `mule-artifact.json`, property files or secure properties | `mule-project` |
When one of these skills is not installed or cannot be loaded, do not write the files it covers from memory: stop before you change them, and say which skill to install.
## Step 1: Read
Read the whole specification. Then read each application it touches that already exists: `pom.xml`, `src/main/mule`, the API specification, the property files, `mule-conventions.yaml` if there is one, and the tests. When the interface spans more than one application, also read [multi-app.md](references/multi-app.md).
## Step 2: Plan
Write a short plan in your answer before you change any file:
- the applications: which exist, which are new, and what each one does;
- for each requirement of the specification: the flow or element that implements it, and the test that will cover it; keep the specification's own requirement IDs when it has them;
- the mappings, the errors (which ones, and the status, retry or handling for each), and the properties and secrets per environment;
- assumptions: where the specification is silent, the choice you make;
- open questions: only those whose answer would change the design.
Stop and wait for answers only when the request asks for a plan first, or when an open question blocks the build because no assumption is safe. Otherwise keep the assumptions in the plan and continue.
<!-- ‹guest · 2026-12-04› -->
## Step 3: Build
Work one application at a time, callee before caller. In each one:
1. `pom.xml`, `mule-artifact.json` and the property files: load `mule-project` first.
2. `src/main/mule`: load `mule-flows`, and also `mule-dataweave` before you write any `ee:transform` or `.dwl` file.
3. `src/test/munit`: load `mule-munit` and read its mocking reference first.
## Step 4: Check every application
Run the checks of each skill you used, as that skill describes them, with `--project` set to the application: the lint and the validation of `mule-flows`, the MUnit run and the coverage check of `mule-munit`, `dw_run.py` of `mule-dataweave` for the scripts you wrote, and `project_check.py` of `mule-project` for every environment. Fix what they report and run them again until they pass. Do not finish with a failing check. When a check cannot run, say which one and why.
## Step 5: Report
End with:
- what you built or changed in each application;
- a table with one row per requirement: the requirement, the flow or element, and the test;
- the final status of each check, per application;
- the assumptions you made and the questions that are still open;
- the properties and secrets that each environment must supply.
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.