| name | htmx |
| description | 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. |
HTMX
Use this skill for HTMX implementation and integration. Covers htmx 2.x (current stable) and htmx 4.x (beta). Reference files are annotated with [htmx 4], [htmx 4 change], and [htmx 4 removed] admonitions. Read only the reference file(s) needed for the task.
Quick Start
- Identify the domain of the task (attributes, requests, swapping, events, patterns).
- Open the matching file from
references/.
- Implement using HTML-first, hypermedia-driven patterns.
- Validate that server responses return HTML fragments, not JSON.
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:
Alice
Bob