AI Agent Skill

MQTTX CLI ships with an Agent Skill that teaches AI coding agents how to operate the mqttx command correctly and safely. The skill lives in the MQTTX repository at skills/mqttx-cli and covers connection checks, publishing and subscribing, MQTT 5 features, TLS and SCRAM authentication, payload codecs and schemas, benchmarks, data simulation, configuration, and troubleshooting.

Install or Update MQTTX CLI with an Agent

INSTALL.md provides installation and update instructions written for agents, including environment detection, package selection, and version verification. Give your agent this prompt:

Read https://raw.githubusercontent.com/emqx/MQTTX/main/INSTALL.md and follow its instructions to install or update MQTTX CLI for this environment. Verify the executable path and version.

Install the Skill

Install it with the Skills CLI:

npx skills add emqx/MQTTX --skill mqttx-cli

To install from a local checkout, run npx skills add . --skill mqttx-cli from the repository root. You can also copy the entire skills/mqttx-cli directory (including references) into your agent's supported skills directory, or ask the agent to read its SKILL.md directly.

What the Skill Covers

The skill's SKILL.md routes the agent to a dedicated reference document per task, so the agent only reads what it needs:

TaskReference
conn, pub, sub, bounded checks and round tripsBasic workflows
Transport, TLS/mTLS, WebSocket headers, credentials, SCRAMConnections and authentication
MQTT 3/5, QoS, retained messages, sessions, wills, request/response, subscription propertiesMQTT features
Text/binary input, interactive line mode, files, codecs, Protobuf/Avro, random payloadsPayloads and files
bench conn, bench pub, bench sub, simulate, ls --scenarios, custom generatorsBenchmarks and simulation
init, check, help/version, INI defaults, JSON/YAML optionsConfiguration and utilities
Exact flag availability by command and version-specific caveatsCapability map
Failures and diagnosisTroubleshooting

Try It

Once installed, give your agent a task such as:

Use the mqttx-cli skill to verify a publish/subscribe round trip against my local broker at 127.0.0.1:1883. Use a unique topic under mqttx-test/, finish within 15 seconds, and report the result.