لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI تاریخ شمسی… --:--:--

Project configuration for Mule 4

آزاد تازه‌وارد تاییدشده امن

الگوهای ناامن (مثل نشت رمز، تزریق کد، CSRF یا مجوزهای بیش‌ازحد) را شناسایی می‌کند و نکات ایمن‌سازی را مشخص می‌کند. (شامل ۱۹ گام عملی · سازگار با Claude Code).

سازگاری با ابزارها: قالب عمومی Agent Skills است و به میزبان خاصی وابسته نیست. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: mule-project
description: Set up and change the project configuration of a Mule 4 application - property files per environment (${mule.env}.yaml), Secure Configuration Properties and encrypted values, pom.xml (Mule Maven plugin, MUnit plugin, connector dependencies) and mule-artifact.json - then check every environment with project_check.py, not only the one the tests use. Use when you add or change a property, an environment, a secret or a dependency, or when the application does not start or behaves differently in one environment. Targets Mule 4.9.
license: Apache-2.0
compatibility: Python 3.9 or later (standard library only), JDK 17, Maven 3.9.x
---

# Project configuration for Mule 4

This skill helps you change the configuration of a Mule 4 application so that it starts and works in every environment, and proves it. It covers Mule 4 only.

The tests of a Mule project run in one environment, usually `test` (the `mule.env` value in the MUnit plugin's `systemPropertyVariables`). A mistake in another environment's files passes `mvn test` and shows up only at deployment: a number without quotes in `prod.yaml`, a key added to `dev.yaml` but not to `prod.yaml`, a block written twice, a secure value read without `secure::`. Do not trust a configuration change until every environment has been checked.

`<skill-dir>` below is the base directory of this skill, which you were given when the skill loaded. Run every command from the root of the Mule project (the folder with `pom.xml`), with `--project .`. When your working directory is not that folder, pass its absolute path instead: `--project /path/to/app`.

Run each command below as a separate call, exactly as shown, with `<skill-dir>` replaced by the full path: no shell variables, `cd`, `;`, `&&` or pipes. Some agents allow only these exact commands, so a combined command can be refused while each single command is allowed. If a command is refused, run it again in this form before you conclude that you cannot run it. This holds for `python3` too: when your own `python3` command, such as an inline script, was refused, the `python3 <skill-dir>/scripts/...` commands are still separate commands, so try them. The JSON output is short: read it as it is.

## Related skills

A task often spans more than one part of a Mule project. When the task reaches one of these parts and its skill is installed, load it and follow its steps and checks too:

- `mule-flows`: flows, sub-flows, global elements, HTTP, APIkit, SOAP, Kafka, and error handlers in `src/main/mule`.
- `mule-dataweave`: DataWeave scripts and `.dwl` modules, and `dw_run.py` to run them on sample inputs.
- `mule-munit`: MUnit suites in `src/test/munit`, mocks, assertions and coverage.

## Step 1: Read before you change

- The `<configuration-properties>` and `<secure-properties:config>` elements (often in `src/main/mule/global-config.xml`): which files they load, and the default `mule.env` in a `<global-property>`.
- Every environment's files in `src/main/resources`, not only the one you are told about: their keys, their nesting and their quoting.
- In `pom.xml`, the MUnit plugin's `systemPropertyVariables` (which environment the tests use) and `dynamicPorts`.

## Step 2: Make the change

Load only the reference you need:

| You are working on | Read |
|---|---|
| Property files, environments, where the test property file goes, YAML values, which value wins, the same key in a common and an environment file | [properties-and-environments.md](references/properties-and-environments.md) |
| Secrets, Secure Configuration Properties, encrypted values, the encryption key | [secure-properties.md](references/secure-properties.md) |
| `pom.xml`, dependencies, `mule-artifact.json`, build errors with misleading messages | [pom-and-artifact.md](references/pom-and-artifact.md) |
<!-- ‹guest · 2026-12-04› -->

The rules that break most often:

- Write every YAML value in double quotes: `port: "443"`, `enabled: "true"`, `timeout: "20000"`. Mule does not start with a value that YAML reads as a number, boolean, null or date.
- When you add or rename a key, do it in every environment's file. Keep one block per top-level key: a second `carrier:` block replaces the first one.
- When a common file and an environment file define the same key, the file declared first wins: declare `${mule.env}.yaml` before the common file.
- Read a secure value as `${secure::key}` or `p('secure::key')`. Without the prefix, `${key}` stops the start and `p('key')` returns `null` without an error.
- Never write the encryption key in the project. The configuration reads it from a property, such as `key="${mule.key}"`, that the platform sets.

## Step 3: Check every environment

```
python3 <skill-dir>/scripts/project_check.py --project .
```

It finds every environment from the file names (`dev.yaml`, `prod.yaml`, `secure-prod.yaml`, ...) and the property that chooses them (`environment_property`: `mule.env`, or the one the project uses, such as `env`), and reports, with file and line:

- errors: `yaml-type` (a value without quotes that stops the start), `yaml-tab`, `yaml-syntax`, `yaml-duplicate` (a key written twice under the same parent), `secure-prefix`, `secure-missing`, `secure-key` (the encryption key in the configuration), and `artifact` problems that stop the start;
- warnings: `env-parity` (a key that the configuration reads is missing for an environment, or an environment has no file), `secure-plain` (a value in a secure file that is not encrypted), and an `artifact` warning for the Java version.

Fix every error. Treat each `env-parity` warning about a key you added or changed as an error. For other keys, the platform may set the value (for example as a Runtime Manager property); leave those as they are and mention them.

Then start the application in each environment whose settings you may use from this machine:

```
python3 <skill-dir>/scripts/project_check.py --project . --start dev --start prod
```

The start runs in a throwaway copy under `target/` with an empty test, so the project's own tests do not run. Every flow is created, but listeners and schedulers do not start. Global configurations are created too, and some connectors may open connections to the environment's systems at that moment (database pools, brokers, token providers). For an environment with secure properties, pass its key with `--property mule.key=<key>`, but only a key you were given for local work or tests; an environment whose key you do not have cannot start here, so rely on the static check for it. `starts[].status` is `started`, `failed` (with the error that stopped the start) or `environment` (Maven or the machine).

A start proves that the configuration loads, not that a value is right. It resolves the `${...}` placeholders, but a value read with `p()` in an expression is read only when that expression runs: a `p('secure::...')` that cannot be decrypted with the given key still starts. So: never change a value only to make a start or a test pass, unless the task gives you that value.

## Step 4: Check the application

Run the checks of the project after the change, each as a separate call:

```
python3 <skill-dir>/scripts/mule_lint.py --project .
```

<!-- ‹guest · 2026-12-04› -->
```
python3 <skill-dir>/scripts/mule_validate.py --project .
```

```
python3 <skill-dir>/scripts/munit_run.py --project . --check-all-flows
```

The validation proves that the project builds with its `pom.xml`. The MUnit run proves that the tests pass in the test environment.

A refused script, pipe or combined command does not mean that these commands are refused: run each one anyway, as a single call in the form shown. Do not finish without the results of `project_check.py` and the checks, unless a command itself was refused, and then say which one.

## Official MuleSoft documentation

For a topic that this skill and its references do not cover, read the official MuleSoft documentation through its index for language models. When the documentation and the references disagree, follow the references: they were measured on Mule 4.9. Whether reading the documentation improves results was not measured.

- Mule Runtime (properties, secure properties, the Mule Maven plugin): https://docs.mulesoft.com/mule-runtime/llms.txt
- CloudHub 2.0: https://docs.mulesoft.com/cloudhub-2/llms.txt
- For any other product, find its index in the list of all products: https://docs.mulesoft.com/llms.txt.
- Read the product's `llms.txt`, then open only the pages you need. Do not read `llms-full.txt`: it holds the whole product documentation in one large file.
- The index links to the latest version. For the version the project uses, replace `/latest/` in a page link: `/4.9/` for Mule Runtime 4.9, `/2.9/` for DataWeave 2.9, and the major and minor version for a connector, for example `/1.11/` for HTTP connector 1.11. MUnit pages exist only under `/latest/`. When the versioned page does not exist, use the latest page and say so.
- Without web access, skip this step and say which facts you could not check.

## When you finish

Report the files you changed per environment, the result of `project_check.py` (and of each `--start`), the environments you could not start and why, and the result of the checks.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
کیفیت کد و تست
✦ Pro

REA bug fix

علت ریشه‌ای خطاها و کرش‌ها را از روی لاگ و مسیر اجرا پیدا می‌کند و به‌جای حدس زدن، اصلاح هدفمند پیشنهاد می‌دهد. (شامل ۶…

⚡ /rea-bug-fix SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۴۸۶,۴۸۷
کیفیت کد و تست
✦ Pro

REA CI and tests audit

«REA CI and tests audit» دستورالعمل دقیقی برای «نوشتن و اجرای تست خودکار» در اختیار دستیار هوش مصنوعی می‌گذارد تا نتیجه…

⚡ /rea-ci-tests-audit SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۴۷۴,۰۸۴
کیفیت کد و تست
✦ Pro

Finishing a Development Branch

این مهارت با نام «Finishing a Development Branch» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی …

⚡ /finishing-a-development-branch SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Code Review Reception

اگر روی کیفیت کد و تست کار می‌کنید، «Code Review Reception» بخشی از کار را از دوش شما برمی‌دارد: «بازنویسی و تمیزسازی ک…

⚡ /receiving-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Requesting Code Review

برای کارهای کیفیت کد و تست، «Requesting Code Review» یک راهنمای کوتاه و روشن است: مسیر «مدیریت هوشمند حافظه و کانتکست» …

⚡ /requesting-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Test-Driven Development (TDD)

این مهارت با نام «Test-Driven Development (TDD)» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی ا…

⚡ /test-driven-development SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰