agentleFS
easyzoomeasyzoom/aix-skills/skills/mqtt-embedded-integration/SKILL.md

mqtt-embedded-integration

Skill36 starsChanged 5 months agoMITView on GitHub

Use when integrating, porting, configuring, or debugging embedded MQTT clients, brokers, keepalive, QoS, TLS transport, reconnects, or publish-subscribe issues

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for MCU MQTT clients by separating network link, TCP/TLS transport, MQTT session state, topic design, QoS, keepalive, and …

    line 10
  2. Distinctive:

    Use this skill when:

    line 14
  3. Very specific:

    Do not use this skill when basic IP connectivity is not working.

    line 20
  4. Distinctive:

    Avoid reconnect storms; use backoff and clear session behavior intentionally.

    line 45
  5. Distinctive:

    Test subscribe, publish, QoS behavior, retained messages, and Last Will if used.

    line 51
  6. Distinctive:

    Before claiming MQTT works:

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MQTT Embedded Integration

Overview

Use this skill for MCU MQTT clients by separating network link, TCP/TLS transport, MQTT session state, topic design, QoS, keepalive, and reconnect policy. MQTT success requires more than one successful publish.

When To Use

Use this skill when:

  • The user wants MQTT on an MCU or embedded device.
  • The task involves MQTT connect, publish, subscribe, keepalive, QoS, Last Will, retained messages, broker auth, TLS, reconnect, or offline buffering.
  • The issue is connection drops, no messages, duplicate messages, memory growth, TLS failure, or reconnect storms.

Do not use this skill when basic IP connectivity is not working. Use lwip-integration or platform network debugging first.

First Questions

Ask for:

  • MQTT library/client and version.
  • Network stack, RTOS, transport, and whether TLS is used.
  • Broker address, port, auth method, and certificate model without asking for secrets.
  • Client ID, topics, QoS levels, keepalive, and reconnect policy.
  • Current logs, broker logs, packet capture, or error codes.
  • RAM budget and maximum payload size.

Integration Checklist

  1. Prove network first. Confirm DNS/IP, TCP connect, and broker reachability before MQTT debugging.
  2. Configure identity. Client ID must be unique and stable enough for the product.
  3. Bound payloads and buffers. Topic length, payload size, QoS queues, and offline buffers must fit RAM.
  4. Set keepalive and reconnect policy. Avoid reconnect storms; use backoff and clear session behavior intentionally.
  5. Add TLS deliberately. Validate time, CA storage, certificate chain, SNI, and heap usage.
  6. Verify broker behavior. Test subscribe, publish, QoS behavior, retained messages, and Last Will if used.

Common Failures

  • Two devices use the same client ID and kick each other off.
  • TLS fails because device time is invalid.
  • Keepalive too short for poor networks.
  • QoS 1 duplicates are not handled idempotently.
  • Offline queue grows without bounds.
  • Topic wildcards subscribe to too much traffic for MCU RAM.

Verification

Before claiming MQTT works:

  • State client library, broker transport, TLS/auth mode, client ID policy, and keepalive.
  • Confirm connect, subscribe, publish, disconnect, and reconnect behavior.
  • Confirm max payload and buffer limits.
  • Confirm TLS certificate/time handling if TLS is used.
  • Confirm secrets were not logged or stored in examples.

Example

User:

MCU MQTT 能连上但过一会儿就掉线。

Agent:

  1. Asks for client library, keepalive, network stack, broker logs, TLS state, and reconnect policy.
  2. Checks ping/keepalive and duplicate client ID before changing payload logic.
  3. Verifies reconnect with backoff and subscription restoration.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.