hotwire-native-bridge

hotwire-native-bridge is a skill for Claude Code from davidteren/hotwire-codex-skills. It costs 127 tokens per session (1,269 once invoked), scanned A, original, MIT.

A guide for Strada, also called Hotwire Native bridge components, which connect web Stimulus code with native Swift and Kotlin code.

In plain words
What is it for?
Use it to add or debug native menus, toolbars, sharing, form submission, and pickers driven by web pages.
Why use it?
It keeps the component name, events, and data format consistent across all three parts, preventing controls from disappearing or receiving incomplete data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hotwire-codex-skills plugin — 8 skills shipped together

Good fit Use it to add or debug native menus, toolbars, sharing, form submission, and pickers driven by web pages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davidteren/hotwire-codex-skills/hotwire-native-bridge
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add davidteren/hotwire-codex-skills --skill hotwire-native-bridge
Clone the repo
git clone --depth 1 https://github.com/davidteren/hotwire-codex-skills

Made for: Claude Code.

Or install hotwire-codex-skills, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hotwire-native-bridge

README.md
[![agentmods](https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/hotwire-native-bridge/github.svg)](https://agentmods.dev/skills/davidteren/hotwire-codex-skills/hotwire-native-bridge)
Your own site
<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/hotwire-native-bridge"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/hotwire-native-bridge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hotwire-native-bridge

Your own site · 80×15
<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/hotwire-native-bridge"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/hotwire-native-bridge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00127 $0.01269
Opus 5 $0.00063 $0.00634
Sonnet 5 $0.00025 $0.00254
Haiku 4.5 $0.00013 $0.00127

Measured 10d ago against content hash ae5711c79490, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

hotwire-native-bridge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/lint_bridge_contract.sh, scripts/new_bridge_component.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hotwire-native-bridge/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hotwire Native bridge components (Strada)

A Strada bridge component has three halves that must agree: a web Stimulus controller (BridgeComponent), an iOS BridgeComponent (Swift), and an Android BridgeComponent (Kotlin). They are bound by an implicit contract:

  1. A component name string (e.g. "nav-menu") — identical on all three sides.
  2. Message eventsconnect / disconnect plus any custom events.
  3. A JSON payload shape — every key the web sends must be decoded on both native sides, or it is silently dropped (no error).

Getting any of these subtly wrong is the #1 time-sink: a name typo makes the component invisible; a payload key missing from one native struct vanishes with no crash. This skill generates the three halves consistently and lints the contract.

See references/bridge-contract.md for the full contract + the real Piazza nav-menu example, and the gotcha catalogue.

When to use

  • Adding a native component backed by web markup (menu, toolbar, share sheet, native submit button, native picker).
  • Debugging "works on web, broken/missing in the native app", a duplicated native control after navigation, or a value that doesn't reach the native side.
  • Reviewing a PR that touches any *Component.swift / *Component.kt / controllers/bridge/*.js — run the linter.

Generate a new component

scripts/new_bridge_component.sh <name-in-kebab> \
  --web   path/to/piazza-web \
  --ios   path/to/piazza-ios \
  --android path/to/piazza-android \
  --package com.yourco.app

Writes (refuses to overwrite):

  • web/app/javascript/controllers/bridge/<snake>_controller.js
  • ios/<App>/Bridge/<Pascal>Component.swift
  • android/.../<Pascal>Component.kt

Then register it (the generator prints these — it does NOT edit registries). Hotwire Native 1.x (default — templates target this):

  • iOS: Hotwire.registerBridgeComponents([<Pascal>Component.self]) in AppDelegate, before any Navigator is created (make the navigator lazy, else the component never attaches — hotwire-native-ios #35). import HotwireNative.
  • Android: Hotwire.registerBridgeComponents(BridgeComponentFactory("<name>", ::<Pascal>Component)) in your Application subclass (also set Hotwire.config.jsonConverter = KotlinXJsonConverter()). Imports from dev.hotwire.core.bridge; destination type HotwireDestination.
  • Web: install @hotwired/hotwire-native-bridge; Stimulus auto-registers the controller as bridge--<name> if it lives under app/javascript/controllers/bridge/.

Read the full file on GitHub · 99 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 99 lines · 127 tokens per session scan A ae5711c79490

Subscribe to this mod's changes

hotwire-native-bridge is a skill published in the GitHub repository davidteren/hotwire-codex-skills (3 stars, last pushed 2mo ago), licensed MIT. It adds 127 tokens to every session and 1,269 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

create-mobile-app

Use when the user wants to start a new Power Apps mobile app (Expo / React Native / TypeScript, targeting iOS and Android) from scratch.

microsoft/power-platform-skills · 35 tokens

generate-pcf-companion

Generate the dispatcher PCF for a third-party .ppmplugin (wrap-runtime) control. Runs pac pcf init in the pcf/ subfolder, rewrites ControlManifest.Input.xml from ARCHITECTURE §6, and writes index.ts derived from ARCHITECTURE §4 (message contract), §8 (PCF surface), §9 (error UX) — no placeholders. The bridge…

microsoft/power-platform-skills · 206 tokens

test-native-extension

Validate a third-party control repo across four automated layers plus one printed manual recipe. Layer 1 asserts native-source structure (Android getName() and iOS +moduleName to manifest nativeModule; @ReactMethod / RCTEXPORTMETHOD to methods; no @ReactModule) plus load/init readiness (ReactPackage public no-arg…

microsoft/power-platform-skills · 211 tokens

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

edit-app

Use when the user wants to iterate on an existing generated Power Apps mobile app after /create-mobile-app: update the plan, data model, native capabilities, design, screens, generated app code, and preview without restarting the full project flow.

microsoft/power-platform-skills · 51 tokens

setup-offline-profile

Use when the user wants to enable offline mode for a Power Apps mobile app and create a Mobile Offline Profile in Dataverse — designs per-table row scope, relationships, columns, and sync frequency through a 3-gate approval flow.

microsoft/power-platform-skills · 52 tokens