Implements HTMX interactions, configures swap behaviors, debugs hx-* requests, and builds hypermedia-driven UI components. Use when tasks involve hx-* attributes, HTMX AJAX requests, swap strategies, server-sent events, WebSockets, or hypermedia-driven UIs.
95
95%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Use this skill for HTMX implementation and integration. Read only the reference file(s) needed for the task.
references/.Minimal example — a button that loads content via GET:
<button hx-get="/contacts" hx-target="#results" hx-swap="innerHTML">
Load Contacts
</button>
<div id="results"></div>The server endpoint (/contacts) must return an HTML fragment, not JSON:
<!-- Server response (HTML fragment, no <html>/<body> wrappers) -->
<ul>
<li>Alice</li>
<li>Bob</li>
</ul>The default swap is innerHTML — the response replaces the target's children. Use hx-swap="outerHTML" to replace the target element itself.
hx-trigger, hx-on*, hx-swap-oob, hx-preserve, hx-history-elt, hx-validate. Use hx-disinherit or unset to stop inheritancehx-boost="true" — pages must work without JShx-disable to prevent HTMX processing of injected attributeshx-* attributes can also be written as data-hx-* for HTML validation compliance286 to stop every or load delay polling. Always use 286 for poll termination, not conditional client-side logichtmx:beforeSwap listener to enable swapping for error status codesHX-Trigger response headers to fire client-side events instead of hardcoding DOM element IDs in server responsesHX-Request header to serve HTML fragments for HTMX requests and full pages for direct browser requests. Set Vary: HX-Request for cachinghx-* attributes, values, and modifiers: references/attributes.mdreferences/requests.mdreferences/swapping.mdreferences/events-api.mdreferences/patterns.mdreferences/extensions.mdreferences/gotchas.mdreferences/REFERENCE.mdreferences/attributes.mdreferences/requests.mdreferences/swapping.mdreferences/events-api.mdreferences/patterns.mdreferences/extensions.mdreferences/gotchas.mdreferences/REFERENCE.md then domain-specific files