Create, get, edit, delete, list, validate, and consolidate all global configurations in a Mule project — connector configs, TLS Context, Object Store, Caching Strategy, Global Error Handler, API AutoDiscovery, Import Project Reference, properties files, global-property elements, and multi-environment setup. Use when the user asks to "add Salesforce config", "configure connector", "set up connection", "create TLS context", "set up object store", "add caching strategy", "create error handler", "set up autodiscovery", "import shared project", "create config.yaml", "set up environments", "add global property", "list global elements", "find usages", "validate config exists", "consolidate configs", or any request to manage global-level configuration in a Mule app. NEVER use MCP server tools — use only the bash scripts provided.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Create, get, edit, delete, list, validate, and consolidate all global configurations in a Mule project — connector configs, TLS Context, Object Store, Caching Strategy, Global Error Handler, API AutoDiscovery, Import Project Reference, properties files, global-property elements, and multi-environment setup. Use when the user asks to "add Salesforce config", "configure connector", "set up connection", "create TLS context", "set up object store", "add caching strategy", "create error handler", "set up autodiscovery", "import shared project", "create config.yaml", "set up environments", "add global property", "list global elements", "find usages", "validate config exists", "consolidate configs", or any request to manage global-level configuration in a Mule app. NEVER use MCP server tools — use only the bash scripts provided.
license
Apache-2.0
compatibility
Requires Anypoint CLI v4 with the `@mulesoft/anypoint-cli-dx-mule-plugin` DX plugin, Java 11+, Mule Runtime (for `dx mule describe-connector` metadata commands)
Create, view, edit, delete, list, validate, and consolidate all global configurations in a Mule 4 project through an interactive, multi-turn workflow.
What you'll build: Fully configured global elements in global-configs.xml, properties files, and validated pom.xml dependencies — all following MuleSoft best practices.
Architecture
flowchart TD
Start{User Intent} -->|connector, config, connection| CC[Connector Config]
Start -->|TLS, SSL, certificate| TLS[TLS Context]
Start -->|object store, key-value| OS[Object Store]
Start -->|caching, cache strategy| CS[Caching Strategy]
Start -->|error handler, on-error| EH[Error Handler]
Start -->|autodiscovery, API gateway| AD[API AutoDiscovery]
Start -->|import project, shared library| IMP[Import]
Start -->|properties, config.yaml, env| PROP[Properties]
Start -->|global-property, inline| GP[Global Property]
Start -->|list all, show all configs| LIST[List All]
Start -->|find usages, where is used| FIND[Find Usages]
Start -->|validate, dangling ref| VAL[Validate]
Start -->|consolidate, centralize| CON[Consolidate]
CC --> OP{Operation}
TLS --> OP
OS --> OP
CS --> OP
EH --> OP
AD --> OP
IMP --> OP
PROP --> OP
GP --> OP
OP -->|Create| CREATE[Generate XML + config.yaml + pom.xml]
OP -->|Get| GET[Scan & Display]
OP -->|Edit| EDIT[Modify & Validate]
OP -->|Delete| DELETE[Remove & Cleanup]
Prerequisites
Before starting, ensure you have:
A Mule 4 project in the workspace with standard structure (src/main/mule/, src/main/resources/, pom.xml)
Anypoint CLI v4 installed with the DX Mule plugin (@mulesoft/anypoint-cli-dx-mule-plugin)
Java 11+ and Maven available for build validation
Mule Runtime available for dx mule describe-connector metadata commands
When: User asks to add a new connector configuration (Salesforce, HTTP, DB, etc.)
You'll need: projectDir, connectorName
Create global element: Steps 1, 2, 12
When: User asks to add TLS Context, Object Store, Caching Strategy, Error Handler, AutoDiscovery, or Import
You'll need: projectDir, elementType
Manage properties: Steps 1, 2, 13
When: User asks to create/edit properties files, set up environments, or manage global-property elements
You'll need: projectDir
Management operations: Steps 1, 2, 14
When: User asks to list all, find usages, validate, or consolidate global elements
You'll need: projectDir
Step 1: Rules and References
Rules:
Multi-turn interactive. At every "STOP" marker: print only questions as plain text, end your response, and wait. No tools until all questions in that phase are answered.
Pre-supplied value extraction (skip-if-provided). Before the first STOP, parse the user's initial request and extract any values they already supplied (e.g., connector name, config name, provider name, field values, placeholder preference). Record these as "pre-supplied." At each subsequent STOP point, check whether the question is already answered by a pre-supplied value — if yes, use that value and skip the STOP entirely. Only ask questions for information NOT provided. If the user says "default placeholders" or "use placeholders for all fields," treat that as the answer to Step 8 and skip its STOP. If ambiguity remains (e.g., user says "basic provider" but metadata lists "basic-connection" and "basic-auth"), still ask.
No MCP server tools. ALL Exchange searches and connector operations MUST use ONLY the bash scripts. Never call search_asset, get_asset, or any MCP-based tool.
Never output raw XML to chat — always write to file.
Never use TaskCreate.
Configuration structure from metadata only. Never hardcode attributes, child elements, or provider names for connectors. The describe-connector metadata is the source of truth.
Connector versions from Exchange only. Never paste a version from memory. The only acceptable source is get_latest_connector.sh → pick_connector.sh.
All configs go in global-configs.xml. See references/global-config-conventions.md for ordering and structure.
pom.xml dependency is MANDATORY. Every global element that requires a dependency (connectors, Object Store, API AutoDiscovery, imports) MUST have its dependency added to pom.xml. Read pom.xml, add the <dependency> block inside <dependencies>, and write the file. The build will fail without this. Never skip this step.
Scripts:
This skill includes shell scripts in its own scripts/ directory. Invoke them with the Bash tool at the absolute path you were given in the "skill is now active" message. Do not use relative paths.
Script
Purpose
get_latest_connector.sh <search> [nickname]
Search Exchange for connector candidates (one GAV per line)
pick_connector.sh <nickname> <gav>
Record chosen GAV as a draft
describe_connector.sh <nickname>
Run dx mule describe-connector, save JSON, echo digest
build_gav.sh <json>
Turn a saved connector JSON into groupId:assetId:version
Scripts path: <skill-root>/scripts/ (where <skill-root> is the directory containing this SKILL.md).
References:
Read these files with the Read tool when instructed. Use the absolute path from the "skill is now active" message.
File
Content
When to Read
references/global-elements-catalog.md
XML templates, namespace URIs, XSD URLs, pom.xml dependencies, attribute tables, validation rules, and connector config generation rules for ALL element types.
Before generating ANY XML — verify structure, required attributes, namespace, and dependency.
When creating/editing properties files, setting up environments, or validating placeholders.
Step 2: Resolve Target Project and Route Operation
Resolve Target Project:
Run once per session — reuse the result for all subsequent operations in this conversation.
If multiple Mule projects exist in the workspace, ask the user which one to use via AskUserQuestion and STOP. Do not combine this question with any other question. If only one exists, use it without asking.
If multiple variants are returned and the user did NOT pre-supply a specific connector artifact, ask user via AskUserQuestion and STOP. If only one result matches (or the connector is already in pom.xml), proceed without asking.
If connector is already in the project's pom.xml, extract GAV from there instead.
Step 4: Describe Connector
bash scripts/describe_connector.sh sfdc
Read the configs[] and connectionProviders from the digest.
Step 5: Ask Config Name
If the user pre-supplied a config name, use it and skip this STOP. Otherwise ask:
What name for this connector configuration? (e.g., salesforceConfig)
STOP (only if not pre-supplied).
Step 6: Select Connection Provider
If the user pre-supplied a provider name that unambiguously matches one provider from the metadata, use it and skip this STOP. If multiple providers exist and the user did NOT specify one (or the name is ambiguous), ask user.
If the user pre-supplied explicit field values or indicated "use placeholders" / "default placeholders" for all fields, use that preference and skip this STOP. When placeholders are chosen, generate ${connectorNamespace.fieldName} for each required field automatically.
Otherwise ask:
Provide values for required fields, or choose "placeholders" for ${property} references.
STOP (only if not pre-supplied).
Step 9: Generate XML
Read references/global-elements-catalog.md → "Connector Config Generation Rules" section. Generate XML following Pattern 1 (attributes) or Pattern 2 (child elements) based on metadata.
Step 10: Generate config.yaml
Only for fields where user chose placeholders. Use ${namespace.attributeName} pattern.
Step 11: Apply to Project and Validate
Write config to src/main/mule/global-configs.xml (create if missing — see references/global-config-conventions.md).
Add namespace + schemaLocation.
Write/update src/main/resources/config.yaml.
Add connector dependency to pom.xml (MANDATORY — do not skip):
Read the project's pom.xml.
Check if the connector's <artifactId> already exists in <dependencies>.
If NOT present, add this dependency block inside <dependencies>:
The groupId, artifactId, and version come from the GAV saved by pick_connector.sh in tmp/connector-choices/.
Write the updated pom.xml with the new dependency added.
Validate:
cd <project-dir> && mvn clean package -DskipTests
Fix and re-run until BUILD SUCCESS.
GET / EDIT / DELETE (Connector Config):
GET: Scan src/main/mule/*.xml for <*:*-config> elements with connection provider children. Display name, type, file, provider, attributes.
EDIT: GET → ask which → show current values → ask for changes → STOP → apply edits → validate.
DELETE: Identify → search all XML for config-ref="{name}" → show usages → confirm → STOP → remove element → clean namespaces → validate.
Step 12: Create Global Element (TLS, Object Store, Caching, Error Handler, AutoDiscovery, Import)
For all element types below, read references/global-elements-catalog.md for the canonical XML structure, required attributes, and validation rules before generating XML.
TLS CONTEXT — CREATE
Q1: Name? Trust Store only / Key Store only / both (mutual TLS)?
STOP.
Q2: Store paths, passwords (use placeholders). Optional: protocols, cipher suites, revocation check, store type/algorithm.
STOP. → Execute: write XML to global-configs.xml, add tls namespace, update config.yaml.
OBJECT STORE — CREATE
Q1: Need a new os:config, or use existing? Name?
STOP.
Q2: Object Store name, config-ref, persistent?, maxEntries, entryTtl, TTL unit.
STOP. → Execute:
Write XML (config BEFORE object-store) to global-configs.xml.
Add os namespace: xmlns:os="http://www.mulesoft.org/schema/mule/os" and its schemaLocation entry.
Add mule-objectstore-connector dependency to pom.xml (MANDATORY — do not skip):
Read pom.xml and check if mule-objectstore-connector already exists in <dependencies>.
If NOT present, add this dependency block inside <dependencies>:
List: registered files + unregistered files + global properties. Show key counts and registration locations.
Step 14: Management Operations (List All, Find Usages, Validate, Consolidate)
LIST ALL
Scan all Mule XML files under src/main/mule/.
Identify every top-level element inside <mule> that is NOT <flow> or <sub-flow>.
Categorize: Connector Configs, Configuration Properties, Global Properties, Global Error Handlers, API AutoDiscovery, TLS Context, Object Store, Caching Strategy, Import References, Application Configuration, Other.
Count usages per named element (search config-ref, tlsContext, objectStore, cachingStrategy-ref, defaultErrorHandler-ref, errorHandler-ref, listenerConfig).
Present grouped table with name, type, file, usage count.
Highlight issues: unresolved placeholders, scattered configs (not in global-configs.xml), unused elements (0 references).
FIND USAGES
Identify target element (list all if not specified, ask which).
Search ALL Mule XML files for references using per-type patterns:
Checks that every config-ref, tlsContext, objectStore, cachingStrategy-ref, defaultErrorHandler-ref, errorHandler-ref, and listenerConfig attribute in flow XML points to a global element that actually exists in the project.
Scan all Mule XML under src/main/mule/ for reference attributes (config-ref="X", tlsContext="X", objectStore="X", cachingStrategy-ref="X", defaultErrorHandler-ref="X", errorHandler-ref="X", listenerConfig="X").
Collect all declared global element names (top-level elements with a name attribute).
For each reference: check if the referenced name exists in the declared set.
Report any dangling references — attributes pointing to a global element that does not exist in the project. Include file, line, and the missing name.
Suggest fix: create the missing global element, or correct the reference to an existing one.
Report: moved count, namespace cleanup, build result.
Tips and Best Practices
Configuration structure from metadata only. Never hardcode attributes or child elements for connectors. The describe-connector metadata is the source of truth.
Connector versions from Exchange only. Never paste a version from memory — use get_latest_connector.sh → pick_connector.sh.
All configs go in global-configs.xml. See references/global-config-conventions.md for ordering and structure.
Multi-turn interactive. At every decision point: print only questions as plain text, end the response, and wait for user input before proceeding.
Skip-if-provided. When the user's initial request includes details (config name, provider, placeholder preference, field values), skip the corresponding STOP points. Only ask for information that was NOT provided or is ambiguous.
Never output raw XML to chat — always write to file.
No MCP server tools. ALL Exchange searches and connector operations MUST use ONLY the bash scripts provided.
Always update pom.xml. Every connector/module that needs a dependency MUST be added to pom.xml. This is the #1 cause of build failures. The dependency XML patterns are documented in references/global-elements-catalog.md. Read pom.xml → add dependency → write pom.xml. Do this BEFORE running mvn clean package.
Always update config.yaml for placeholders. When using ${property.name} placeholders in XML, the corresponding property MUST be added to src/main/resources/config.yaml. For AutoDiscovery, always add api.id to config.yaml.
Troubleshooting
Build fails after adding config: Check namespace declarations match the connector's XSD URL. Verify the schemaLocation URL is correct.
Connector not found in Exchange: Ensure Anypoint CLI is authenticated. Try broader search terms with get_latest_connector.sh.
Describe-connector fails: Verify Java 11+ is available and the connector GAV is valid. Check tmp/connector-choices/ for the saved JSON.
Unresolved placeholders at runtime: Ensure <configuration-properties> is registered in global-configs.xml and the properties file exists in src/main/resources/.
Namespace conflicts: Run consolidation to centralize all global elements and clean up duplicate namespace declarations.
Related Jobs
build-mule-integration: Build Mule flows that reference the global configurations created by this skill
secure-mule-app: Configure secure properties encryption for sensitive configuration values
create-project-template: Generate a new Mule project with proper structure before adding configurations