Skip to main content
AnalysisOfficialCertifiedAI reviewed Nov 26, 2026

Iiot Bridge

Generate a production-grade Industrial IoT protocol bridge — OPC UA ↔ MQTT Sparkplug B, Modbus → MQTT, or direct PLC (Rockwell/Siemens/Beckhoff) → cloud (AWS IoT Core / Azure IoT Hub / GCP IoT / self-hosted HiveMQ)..

v1.0.1New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install iiot-bridge
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/iiot-bridge/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

Industrial IoT Bridge Generator

You generate a production-grade protocol bridge that moves plant-floor data into a modern broker / cloud platform with industrial standards (Sparkplug B, OPC UA, MQTT 5.0) and security (TLS, X.509 mutual auth, RBAC) built in from the start.

OT/IT integration is the #1 friction point in Industry 4.0 deployments — multiple SCADA hosts each requiring request/response gateways, manual config that grows linearly with device count. This skill outputs a publish-subscribe bridge that breaks that pattern.


=== PRE-FLIGHT ===


Gather and verify before generating:

  • Source protocol identified.
    • OPC UA (modern PLCs: Siemens S7-1500, Beckhoff TwinCAT, Rockwell ControlLogix via Kepware)
    • Modbus TCP / Modbus RTU (legacy or simple devices)
    • Direct PLC: Rockwell EtherNet/IP (pylogix / pycomm3), Siemens S7 (snap7), Beckhoff ADS (pyads)
    • Ignition Tag Provider (use Ignition's MQTT Transmission module — usually a config job, not code)
  • Destination broker / cloud identified.
    • HiveMQ (self-hosted, best Sparkplug B support)
    • AWS IoT Core (CloudFormation/CDK generation possible)
    • Azure IoT Hub (Device Provisioning Service patterns)
    • GCP IoT Core (deprecated as of 2023 — warn user; suggest HiveMQ on GKE)
    • Bare Mosquitto / EMQX (low-cost dev/test only — call out lack of Sparkplug B native support if used in prod)
  • Network topology known. Is the bridge running ON the edge gateway (preferred), in a DMZ, or in the cloud? This drives TLS/cert strategy.
  • Tag/point count. Under 100 = pure publish on change. Over 10,000 = batching + compression matter.
  • Security posture. Production MUST use TLS + X.509 mutual auth. Dev/test can use username/password but the generated code MUST default to mTLS with a --insecure flag for explicit opt-out.

Recovery:

  • If destination is undecided, generate for HiveMQ self-hosted (best Sparkplug B, easiest to migrate later).
  • If protocols are mixed, scaffold a multi-source adapter pattern (each source = a separate driver module, common output schema).
  • Never generate without TLS scaffolding — the cost of retrofitting security is the worst kind of tech debt.

=== PHASE 1: TOPIC SCHEMA & NAMESPACE DESIGN ===


Generate the topic schema based on Sparkplug B (the only widely-accepted industrial MQTT topic standard) OR the ISA-95 / Unified Namespace pattern if the user is going broader than Sparkplug.

Sparkplug B topic format (Eclipse Tahu spec):

spBv1.0/{group_id}/{message_type}/{edge_node_id}/{device_id}

Message types:
  NBIRTH — Edge node online (publishes ALL metric definitions)
  NDATA  — Edge node metric value update
  NDEATH — Edge node going offline (sent as LWT)
  DBIRTH — Device online (under an edge node)
  DDATA  — Device metric value update
  DDEATH — Device offline
  NCMD   — Inbound command to edge node
  DCMD   — Inbound command to device

ISA-95 / Unified Namespace pattern (for non-Sparkplug deployments):

{enterprise}/{site}/{area}/{line}/{cell}/{asset}/{metric}
e.g., acme/austin-plant/packaging/line-3/filler-2/torque

Reserve subtrees:
  .../events    — discrete state changes (Start, Stop, Alarm)
  .../alarms    — ISA-18.2 alarms
  .../commands  — write-back operations

Generate topics.yaml documenting the chosen schema. The schema is the contract for everything downstream — get it right at the start.

VALIDATION: All generated topics validate against the Sparkplug B spec OR the ISA-95 pattern, no special characters, no wildcards in publishers, ≤ 5 levels deep.

FALLBACK: If the user has an existing topic schema (legacy MQTT deployment), generate a translator layer rather than forcing migration.


=== PHASE 2: BRIDGE CORE WITH SPARKPLUG LIFECYCLE ===


Generate the bridge code. Default to Python (best industrial library support). Use Node only if user requests it.

Required dependencies:

  • paho-mqtt (MQTT 5.0 client)
  • tahu-python or hand-rolled Sparkplug B protobuf (vendor sparkplug_b.proto)
  • asyncua for OPC UA
  • pymodbus for Modbus
  • pylogix / pycomm3 / snap7 / pyads for direct PLC

Sparkplug B lifecycle implementation is non-negotiable:

# On startup:
1. Connect to broker with LWT = NDEATH topic (so broker auto-publishes our death)
2. Publish NBIRTH with ALL metric definitions and current values + bdSeq counter
3. For each device: publish DBIRTH with that device's metrics
4. Then start publishing DDATA on change

# On metric value change:
1. Increment seq number (0-255, wraps)
2. Publish DDATA with only the changed metrics (publish-on-change, NOT poll)

# On graceful shutdown:
1. Publish DDEATH for each device
2. Publish NDEATH for the edge node
3. Disconnect cleanly

# On broker reconnect:
1. Repeat NBIRTH/DBIRTH (consumers need fresh schema after death/birth)
2. Reset seq counter
3. Increment bdSeq (birth/death sequence — top-level continuity)

Common bugs to PREVENT by construction:

  • Missing NBIRTH after reconnect → consumer treats edge node as stale forever.
  • Seq counter not wrapping at 256 → spec violation, some consumers drop messages.
  • Forgetting LWT → ungraceful network drop leaves devices appearing alive.
  • bdSeq not in NDEATH payload → consumer can't correlate death to specific birth.

VALIDATION: Run the bridge against a local HiveMQ + Sparkplug B Inspector (or Chariot Edge); confirm NBIRTH appears, DDATA flows, and DDEATH publishes on graceful shutdown. Pull the network cable and verify NDEATH appears via LWT.

FALLBACK: If Sparkplug B is overkill for the use case, generate plain MQTT with the ISA-95 topic schema — but emit a warning that interop with industrial consumers (Ignition, HiveMQ Distributed Tracing) will be limited.


=== PHASE 3: SECURITY & CERTIFICATE PROVISIONING ===


Generate the security stack. Defaults that ship to production:

  • TLS 1.2+ on all broker connections (port 8883, not 1883).
  • X.509 mutual auth — client cert per edge node, signed by an issuing CA.
  • Certificate rotation scaffold using a 90-day validity and 30-day-before-expiry rotation hook.
  • RBAC at the broker — generate HiveMQ / EMQX ACL config with least-privilege publish/subscribe per edge node.
  • Secrets — never in code. Use env vars or, for AWS, the cert is fetched from IoT Core's provisioning flow.

Generate security/:

security/
├── ca/
│   ├── generate_ca.sh           # one-time root CA generation
│   └── sign_client.sh           # per-edge-node cert signing
├── certs/
│   └── .gitignore               # certs NEVER committed
├── broker_acl.yaml              # HiveMQ/EMQX ACL
└── README.md                    # rotation runbook

VALIDATION: Bridge fails closed if cert is missing or expired (does NOT silently fall back to plaintext). ACL prevents an edge node from publishing under another node's topic prefix.

FALLBACK: For air-gapped OT networks with no PKI, generate a PSK-based config — but mark explicitly as "lab/PoC only".


=== PHASE 4: STORE-AND-FORWARD BUFFERING ===


OT networks drop. Bridges that don't buffer lose data. Generate a persistent queue (SQLite or RocksDB) that:

  1. Writes every outbound message to disk before publishing.
  2. On broker disconnect, accumulates messages.
  3. On reconnect, drains the queue in order, respecting the original timestamps (not the replay time).
  4. Has a configurable retention cap (default 7 days) and overflow policy (drop-oldest with a logged warning).

This is the difference between a hobby script and a production bridge.

VALIDATION: Test by killing the broker for 60 seconds and confirming all messages arrive in order after reconnect with original timestamps preserved.


=== PHASE 5: DOCKER-COMPOSE TEST RIG ===


Generate docker-compose.yml so the entire stack runs locally for testing:

services:
  hivemq:
    image: hivemq/hivemq4:latest
    ports: ["1883:1883", "8883:8883", "8080:8080"]
    volumes: [./security/certs:/opt/hivemq/conf/certs:ro]

  modbus-sim: # mock PLC for testing
    image: oitc/modbus-server:latest

  opcua-sim:
    image: opensimroot/opcua-server:latest

  sparkplug-inspector:
    image: cirruslink/sparkplug-inspector:latest
    ports: ["3000:3000"]

  bridge:
    build: .
    environment:
      - MQTT_HOST=hivemq
      - SOURCE_TYPE=opcua
      - SOURCE_ENDPOINT=opc.tcp://opcua-sim:4840

VALIDATION: docker-compose up brings up the full stack; Sparkplug Inspector at localhost:3000 shows the bridge's NBIRTH/DDATA flow within 30 seconds.


=== PHASE 6: OBSERVABILITY ===


Generate basic observability so failures don't hide:

  • Metrics endpoint (Prometheus /metrics): messages_published_total, broker_reconnects_total, queue_depth, cert_expiry_days_remaining.
  • Structured logging (JSON) with consistent fields: ts, level, asset_id, event_type, msg_id.
  • Healthcheck endpoint (/healthz) returning 200 only if broker is connected AND source protocol session is active.

VALIDATION: Scrape /metrics and confirm at least messages_published_total increments after a source change.


=== SELF-REVIEW ===


Score 1–5:

  • Complete: NBIRTH → DDATA → DDEATH lifecycle implemented? TLS + mTLS scaffolded? Store-and-forward working? Test rig boots end-to-end?
  • Robust: Cert expiry handled? Broker reconnect re-publishes births? Queue persists across restarts? bdSeq increments correctly?
  • Clean: No hardcoded credentials, no commented-out code, structured logs, typed signatures, docker-compose works on a clean machine?
  • Industrial-correct: Would a Sparkplug-aware consumer (Ignition, HiveMQ Tahu Inspector) flag any spec violations?

Most common failure: forgetting to re-publish NBIRTH after reconnect → consumers see ghost edge nodes. Verify explicitly.


=== LEARNINGS CAPTURE ===


Append to ~/.claude/skills/iiot-bridge/LEARNINGS.md:

— <source → destination, e.g., "OPC UA → HiveMQ Sparkplug B">

  • What worked: <pattern, library, lifecycle handling that produced clean output>
  • What was awkward: <e.g., "Sparkplug protobuf encoding was a pain — vendored tahu-python helped">
  • Suggested patch: <e.g., "default to tahu-python over hand-rolled protobuf">
  • Verdict: [Smooth / Minor friction / Major friction]

=== STRICT RULES ===


  • Never skip Sparkplug B lifecycle. NBIRTH/DBIRTH/DDATA/DDEATH/NDEATH is the entire point of using Sparkplug — generating "MQTT + JSON payloads" defeats the standard.
  • Never default to plaintext MQTT. mTLS by default; insecure flag must be explicit.
  • Never commit certs, keys, or ACL files with real hostnames.
  • Never poll when publish-on-change is available. Polling defeats Sparkplug's bandwidth advantage.
  • Never assume the broker is always reachable. Store-and-forward is required.
  • If the user is already on Ignition's MQTT Transmission module, recommend config — don't regenerate a redundant bridge.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion to interfaces using modern CSS — scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.79 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.62 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.57 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.57 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..56 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..50 installs

More from Skills Hub

View source →
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.198 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.167 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content — eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..133 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.129 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..126 installs

More Analysis skills

Browse category →
web-research-agentA comprehensive autonomous web research agent that performs targeted searches, fetches and parses web content, summarizes findings, and generates structured reports, adhering to industry best practices for accuracy, security, and robustness.238 installsrecallReconstructs the development cycle from git history, distills sequential/parallel patterns, and produces actionable insights for improving future iterations. Triggers: recall, retrospective, development analysis, what happened, dev cycle analysis.20 installsseoAutonomous SEO + AI-search optimization agent for 2026. Audits and fixes technical SEO, on-page metadata, structured data, Core Web Vitals (LCP/INP/CLS), llms.txt, Generative Engine Optimization (GEO) for ChatGPT/Perplexity/AI Overviews, E-E-A-T author signals.10 installsapp-size-optimizerAnalyzes mobile app binary size -- asset audit for unused images and font subsetting, code stripping with ProGuard and tree-shaking, on-demand resources, dynamic feature modules, and app thinning strategies..6 installsbilibili-comment-insights当用户需要做 B站评论分析、B站评论洞察、B站用户反馈分析、B站需求挖掘、痛点总结、购买顾虑整理、FAQ 提炼、口碑分析、评论回复观察或内容讨论复盘时使用。基于用户提供的 B站视频、专栏、动态链接或对应内容 ID 下的评论结果,面向内容运营、产品调研、品牌调研和创作者。由社媒数据助手 SocialDataX 提供。5 installsbundle-analysisAnalyze frontend bundle size, detect heavy dependencies, find duplicates, evaluate tree-shaking, recommend code splitting, and generate size budget configs. Triggers: phrases: "analyze bundle size", "why is my bundle so big", "find heavy dependencies", "reduce bundle size".5 installs

Frequently asked questions about iiot-bridge

What does the iiot-bridge skill do?

Generate a production-grade Industrial IoT protocol bridge — OPC UA ↔ MQTT Sparkplug B, Modbus → MQTT, or direct PLC (Rockwell/Siemens/Beckhoff) → cloud (AWS IoT Core / Azure IoT Hub / GCP IoT / self-hosted HiveMQ).. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the iiot-bridge skill?

Run `npx @skills-hub-ai/cli install iiot-bridge` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/iiot-bridge/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does iiot-bridge work with?

iiot-bridge runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the iiot-bridge skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use iiot-bridge after installing it?

In Claude Code, type `/iiot-bridge` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the iiot-bridge skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.