mqtt-kmp
Provides project-specific knowledge for the MQTTastic KMP library. Supports full MQTT 5.0 and multiplatform targets.
Install
mkdir -p .claude/skills/mqtt-kmp && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10472" && unzip -o skill.zip -d .claude/skills/mqtt-kmp && rm skill.zipInstalls to .claude/skills/mqtt-kmp
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
MQTTastic Client KMP — Kotlin Multiplatform MQTT 5.0 client library project knowledgeKey capabilities
- →Handle MQTT 5.0 protocol
- →Manage connections
- →Encode/decode packets
- →Implement multiplatform transports
How it works
It provides a clean architecture for MQTT 5.0 protocol logic, separating platform-specific transports from shared protocol code.
Inputs & outputs
When to use mqtt-kmp
- →Implementing MQTT 5.0 client connections
- →Debugging packet encode/decode issues
- →Adding multiplatform transport support
- →Verifying MQTT protocol compliance
About this skill
MQTTastic Client KMP
Project Facts
- Language: Kotlin 2.4.10 (Multiplatform)
- Build: Gradle Kotlin DSL, version catalog at
gradle/libs.versions.toml - Targets: jvm, android, iosArm64, iosSimulatorArm64, macosArm64, linuxX64, linuxArm64, mingwX64, wasmJs
- Dependencies: Ktor 3.4.2, kotlinx-coroutines 1.10.2, kotlinx-io-bytestring 0.8.2 (zero external deps beyond these)
- Protocol: Full MQTT 5.0 (all 15 packet types, QoS 0/1/2, enhanced auth, topic aliases, flow control)
Architecture
commonMain— ALL protocol logic (packets, codec, client, connection, properties)nonWebMain— TCP + WebSocket transports (ktor-network, ktor-client-websockets)wasmJsMain— Browser WebSocket transportMqttTransport— internal interface, sole platform abstraction boundary- Public API:
MqttClient,MqttConfig,MqttMessage,QoS,ConnectionState,ReasonCode,MqttEndpoint
Key Constraints
- No
java.*,android.*,platform.*imports incommonMain - No dependencies beyond Ktor + coroutines + kotlinx-io
- Packet codecs must match OASIS MQTT 5.0 byte-level spec exactly
- All new features need encode/decode round-trip tests
- Code coverage ≥80% enforced via koverVerify
spotlessCheck+detektAll+apiCheckmust pass
File Locations
| What | Where |
|---|---|
| Protocol logic | library/src/commonMain/kotlin/org/meshtastic/mqtt/ |
| Platform transports | library/src/nonWebMain/kotlin/, library/src/wasmJsMain/kotlin/ |
| Tests | library/src/commonTest/kotlin/ |
| Build config | build.gradle.kts, gradle/libs.versions.toml |
| Sample app | sample/src/commonMain/kotlin/ |
| Agent instructions | AGENTS.md (source of truth), .github/instructions/ |
Build Commands
./gradlew build # full build + test + check
./gradlew allTests # all KMP tests
./gradlew jvmTest # JVM tests only
./gradlew spotlessApply # auto-fix formatting
./gradlew detektAll # static analysis
./gradlew apiCheck # public API compatibility
./gradlew koverVerify # coverage check (≥80%)
Git Conventions
- Conventional Commits:
<type>(<scope>): <subject> - Types: feat, fix, docs, style, refactor, test, chore
- Scopes: packet, transport, client, codec, qos, props, build, ci, deps
When not to use it
- →Web-only MQTT
- →Non-KMP projects
Prerequisites
Limitations
- →No java.* or android.* imports in commonMain
- →Coverage >= 80%
How it compares
It is a pure Kotlin Multiplatform library with zero external dependencies beyond Ktor and coroutines.
Compared to similar skills
mqtt-kmp side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| mqtt-kmp (this skill) | 0 | 3mo | Review | Advanced |
| vertigram-telegram-api-bump | 0 | 1mo | No flags | Intermediate |
| campusway-api-contract-regression | 0 | 4mo | No flags | Intermediate |
| android-kotlin-development | 268 | 5mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by meshtastic
View all by meshtastic →You might also like
vertigram-telegram-api-bump
gagarski
Update Vertigram's vertigram-telegram-client module for a requested Telegram Bot API version. Use when the user asks to bump supported Telegram Bot API versions, apply Telegram Bot API changelog entries, add Telegram API types/methods/json body definitions, update Telegram markup builders, or add se
campusway-api-contract-regression
md-muntasir-shihab
CampusWay API contract and regression workflow for Express TypeScript endpoints. Use when: API response changed, field mismatch, frontend integration broke, schema drift, endpoint refactor, release regression checks.
android-kotlin-development
aj-geddes
Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.
telegram-mini-app
davila7
Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.
stripe-integration
wshobson
Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.