agentsclimarketplace

Hotwire native path config

Skill davidteren/hotwire-codex-skills/skills/hotwire-native-path-config

Author and validate Hotwire Native path configuration (the JSON that drives native push/replace/modal/tab navigation on iOS + Android), and the Rails-side turbo_native_app? + request-variant setup. Use when a native screen opens with the wrong presentation (pushed instead of modal, doesn't switch tabs), when adding a new native route, when setting up native navigation for one Rails app across iOS + Android, or when web chrome (top nav) leaks into the native apps. Provides a starter config, a schema/footgun validator, and an iOS↔Android drift check.From its SKILL.md

Install
npx -y skills add davidteren/hotwire-codex-skills --skill hotwire-native-path-config

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 3 commands, including `sed 's/__SCHEME__/yourapp/g' templates/path_configuration.json.tmpl > path_configuration.json` and 2 more.

SKILL.md

3.9 KB, 848 tokens by cl100k_base, as published. Nobody here has run it

Hotwire Native path configuration

One Rails app, two native shells. A path configuration JSON maps URL patterns to native navigation rules (push / replace / modal / tab roots / image viewer) on iOS and Android; the Rails side detects native via turbo_native_app? and serves trimmed markup via request variants. This skill helps you author both correctly and keep the two platform configs in sync.

Full schema + the server setup: references/path-config-guide.md. Real-world note: piazza-web/wip/analysis/05-hotwire-native-variants.md.

When to use

  • A native screen opens with the wrong presentation (pushed when it should be modal, or doesn't switch the bottom tab).
  • Adding a new native route / screen.
  • Setting up native navigation for a Rails app across iOS + Android.
  • Web chrome (top navbar) shows up inside the native apps.

The model (1-minute version)

{ "settings": {}, "rules": [
  { "patterns": ["/.*"],            "properties": { "context": "default", "uri": "app://fragment/web" } },
  { "patterns": ["^/$", "/profile$"], "properties": { "presentation": "replace_root", "uri": "app://fragment/web/tab" } },
  { "patterns": ["/new$", "/edit$"], "properties": { "context": "modal", "uri": "app://fragment/web/modal" } }
] }
  • Rules match top-to-bottom, later wins → catch-all FIRST, specifics BELOW.
  • context: default | modal. presentation: default|push|pop|replace|replace_root|clear_all|refresh|none.
  • Android rules need a uri (deep-link to a registered destination). iOS uses view_controller / modal_style instead.
  • Modal in 1.x = context: "modal". presentation: "modal" is a Strada-beta-ism.
  • Tab switching: tab-root URLs use replace/replace_root; a server redirect to a tab URL then selects that native tab instead of pushing. Keep tab-root patterns in sync with the native tab bar's URLs.

Server side (don't forget)

# strip web chrome + serve mobile markup for the native apps
def set_request_variant
  request.variant = turbo_native_app? ? :mobile : (Browser.new(request.user_agent).device.mobile? ? :mobile : :desktop)
end

turbo_native_app? (turbo-rails) is true because Hotwire Native appends Turbo Native / Hotwire Native to the WebView User-Agent. Guard web-only nav with unless turbo_native_app?.

Start a config

sed 's/__SCHEME__/yourapp/g' templates/path_configuration.json.tmpl > path_configuration.json

Bundle it (iOS Piazza/path_configuration.json, Android assets/json/configuration.json) or serve it from Rails (e.g. /configurations/ios.json) so you can change native navigation without an app-store release — keep the bundled file as the offline fallback.

Validate

scripts/lint_path_config.sh path_configuration.json           # one file
scripts/lint_path_config.sh --compare ios.json android.json   # cross-platform drift

Validation: valid JSON; rules present; each rule has patterns + properties; regex patterns compile; property keys/values are in the 1.x schema; flags the presentation: "modal" beta-ism; flags unanchored short patterns (/new also matches /renew → use /new$); checks the catch-all is first. --compare normalizes anchors and reports paths handled on one platform but not the other (heuristic, names its ceiling). Needs ruby.

What ships with it: 3 files

12.0 KB alongside SKILL.md, 1 of them executable

references/

scripts/

Gives 0 of the 12 instructions most project setup skills give in 848 tokens

Counted across 1,553 of the 3,091 authors here whose files we hold, read 2026-09-06

  • Write the configuration filein 36 of 1553
  • Create the directory structurein 35 of 1553, across 33 files
  • Verify the setupin 31 of 1553, across 28 files
  • Run the setup scriptin 30 of 1553, across 29 files
  • Pre-determine the required sample sizein 29 of 1553, across 12 files
  • Check if the configuration already existsin 29 of 1553
  • Document every testin 26 of 1553, across 10 files
  • Start with a hypothesisin 26 of 1553, across 11 files
  • Ask one question at a timein 22 of 1553
  • Test a single variable per testin 21 of 1553, across 9 files
  • Read product marketing context before asking questionsin 19 of 1553, across 8 files
  • Do not peek and stop earlyin 18 of 1553, across 7 files

Said here and by no other author read

  • Place the catch-all rule first
  • Keep tab-root patterns in sync with native tab bars
  • Guard web-only navigation with turbo native app
  • Lint the path configuration file
  • Compare cross platform drift

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.