Call use_skill as your FIRST and ONLY action when the user asks to document, add descriptions to, annotate, or add doc:description attributes to Mule XML files, flows, components, or connectors. Do not read project files first — this skill provides instructions for when to read files. Covers documenting all Mule elements in src/main/mule including flows, sub-flows, configs, listeners, processors, transforms, error handlers, and connectors. When you call use_skill, it must be the only tool call in that response.
61
77%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/mule-development/generate-doc-description/SKILL.mdYou are an XML documentation expert for MuleSoft. Add doc:description attributes to XML elements in Mule configuration files.
Scan the Mule project for configuration XML files in src/main/mule/ and add or update doc:description attributes on elements that are missing them or have inaccurate descriptions.
src/main/mule directory exists in the current working directorysrc/main/mule/**/*.xmlFor each XML file found:
CRITICAL: You MUST read the actual file content before making any changes. CRITICAL: When you call Read tool, do NOT call Write tool in the same turn. Read only.
IMPORTANT: Before making ANY changes, explicitly list out what you found to prove you read the file:
Search through the file and count all major components:
<flow> elements and list each by name attribute<sub-flow> elements and list each by name attribute<batch:job> elements and list each by jobName attribute<*:config>, <*:listener-config>, <configuration-properties>)<error-handler> at top level, outside flows)Output this analysis in a clear summary format:
Analyzing file: [filename]
File size: [line count] lines
Found:
- [X] flows: [flow-name-1], [flow-name-2], [flow-name-3]...
- [X] sub-flows: [subflow-name-1], [subflow-name-2]...
- [X] batch jobs: [batch-job-name-1]...
- [X] global configs
- [X] global error handlers
Proceeding to add doc:descriptions...Then immediately proceed to step C (no user confirmation needed)
Identify all elements that need documentation:
Mule Flow Elements:
<flow>, <sub-flow> - Main entry points and business processes<http:listener>, <salesforce:*-listener>, <scheduler>, etc.<logger>, <set-variable>, <set-payload>, <remove-variable><choice>, <when>, <otherwise>, <scatter-gather>, <foreach>, <until-successful><ee:transform>, <ee:message>, <ee:set-payload>, <ee:set-variable><flow-ref><error-handler>, <on-error-propagate>, <on-error-continue><*:create>, <*:query>, <*:request>, etc.<*:config>, <*:sfdc-config>, <*:listener-config><*:basic-connection>, <*:token-based-authentication-connection><configuration-properties><validation:*><batch:job>, <batch:step>, etc.Connector Config Elements:
<*:config>, <*:sfdc-config>, <*:listener-config><*:basic-connection>, <*:token-based-authentication-connection>, <*:oauth-*-connection><configuration-properties><http:listener-connection>, <http:request-connection>MUnit Test Elements:
<munit:suite> (root)<munit:test><munit:behavior>, <munit:execution>, <munit:validation><munit:set-event>, <munit:set-attributes><munit-tools:assert-that>, <munit-tools:assert-equals><munit-tools:mock-when>, <munit-tools:then-return><munit-tools:verify-call>For each element, determine if it needs a doc:description:
doc:description attributedoc:description is vague, generic, or doesn't accurately describe what the element doesdoc:description already exists and accurately describes the elementCreate descriptions that are:
Use the example template below for guidance on how to write doc:description attributes for various Mule elements:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:salesforce="http://www.mulesoft.org/schema/mule/salesforce"
xmlns:netsuite="http://www.mulesoft.org/schema/mule/netsuite"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/salesforce http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd
http://www.mulesoft.org/schema/mule/netsuite http://www.mulesoft.org/schema/mule/netsuite/current/mule-netsuite.xsd
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">
<!-- Configuration Properties -->
<configuration-properties file="config.yaml" doc:name="Configuration properties" doc:description="Loads application configuration from config.yaml file" />
<!-- Salesforce Configuration -->
<salesforce:sfdc-config name="salesforceConfig" doc:name="Salesforce Config" doc:description="Configures connection to Salesforce using basic authentication">
<salesforce:basic-connection
username="${salesforce.username}"
password="${salesforce.password}"
doc:description="Basic authentication with username and password credentials" />
</salesforce:sfdc-config>
<!-- NetSuite Configuration -->
<netsuite:config name="netsuiteConfig" doc:name="NetSuite Config" doc:description="Configures connection to NetSuite using token-based authentication">
<netsuite:token-based-authentication-connection
consumerKey="${netsuite.consumerKey}"
consumerSecret="${netsuite.consumerSecret}"
tokenId="${netsuite.tokenId}"
tokenSecret="${netsuite.tokenSecret}"
account="${netsuite.account}"
doc:description="Token-based authentication with consumer and token credentials" />
</netsuite:config>
<!-- Main Integration Flow -->
<flow name="salesforce-to-netsuite-order-flow" doc:name="Salesforce to NetSuite Order Flow" doc:description="Syncs Closed Won Salesforce opportunities to NetSuite as sales orders">
<!-- Salesforce Opportunity Listener -->
<salesforce:modified-object-listener
objectType="Opportunity"
config-ref="salesforceConfig"
doc:name="Listen for Modified Opportunities"
doc:description="Polls Salesforce every 60 seconds for modified Opportunity records">
<scheduling-strategy doc:description="Defines polling frequency for the listener">
<fixed-frequency frequency="60000" doc:description="Polls every 60,000 milliseconds (1 minute)" />
</scheduling-strategy>
</salesforce:modified-object-listener>
<logger level="INFO" message="Opportunity modified: #[payload.Id] - Stage: #[payload.StageName]" doc:name="Log Opportunity Update" doc:description="Logs the ID and stage of the modified Opportunity record" />
<!-- Filter for Closed Won Opportunities -->
<choice doc:name="Check if Closed Won" doc:description="Routes the flow based on whether the Opportunity is Closed Won">
<when expression="#[payload.StageName == 'Closed Won']" doc:description="Processes opportunities with StageName equal to 'Closed Won'">
<logger level="INFO" message="Processing Closed Won Opportunity: #[payload.Name] (Amount: #[payload.Amount])" doc:name="Log Closed Won" doc:description="Logs the name and amount of the Closed Won Opportunity being processed" />
<!-- Transform Salesforce Opportunity to NetSuite Order -->
<ee:transform doc:name="Map Opportunity to NetSuite Order" doc:description="Transforms Salesforce Opportunity data into NetSuite sales order format using DataWeave">
<ee:message doc:description="Defines the message transformation for the payload">
<ee:set-payload doc:description="Maps Opportunity fields to NetSuite order structure with customer and line items"><![CDATA[%dw 2.0
output application/java
---
{
entity: "salesOrder",
entity @ {
customer: {
internalId: payload.AccountId default ""
}
},
tranId: payload.Id,
memo: "Order created from Salesforce Opportunity: " ++ payload.Name,
itemList: {
item: [{
item: {
internalId: "1"
},
quantity: 1,
rate: payload.Amount default 0
}]
}
}]]></ee:set-payload>
</ee:message>
</ee:transform>
<logger level="INFO" message="Transformed payload for NetSuite: #[output application/json --- payload]" doc:name="Log Transformed Payload" doc:description="Logs the transformed payload in JSON format for debugging" />
<!-- Create Order in NetSuite -->
<netsuite:add config-ref="netsuiteConfig" doc:name="Create NetSuite Order" doc:description="Creates a new sales order record in NetSuite using the add operation" />
<logger level="INFO" message="NetSuite Order created successfully: #[payload]" doc:name="Log Success" doc:description="Logs successful creation of NetSuite order with response payload" />
</when>
<otherwise doc:description="Handles opportunities that are not in Closed Won stage">
<logger level="INFO" message="Opportunity not in Closed Won stage, skipping. Current stage: #[payload.StageName]" doc:name="Log Skipped" doc:description="Logs that the Opportunity is being skipped with its current stage" />
</otherwise>
</choice>
<!-- Error Handling -->
<error-handler doc:description="Handles errors that occur during the flow execution">
<on-error-propagate type="ANY" doc:description="Catches all error types and propagates them after logging">
<logger level="ERROR" message="Error processing Opportunity: #[error.description]" doc:name="Log Error" doc:description="Logs error details when Opportunity processing fails" />
</on-error-propagate>
</error-handler>
</flow>
</mule>Study the template above to understand the level of detail and style expected for each element type. Note how descriptions are:
CRITICAL: Use ONE Write tool call per file, regardless of file size.
Single Write Strategy:
Why this single Write approach:
After completing ALL edits for a file:
Continue this process for each XML file in the src/main/mule/ directory.
After all files are processed, provide:
mulesoft/mulesoft-dx
b8cef7d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.