htmx
Skill15 starsChanged 2 months agoMITView on GitHub
Expert htmx assistance covering hypermedia-driven UIs, AJAX swaps, out-of-band updates, and SSE/WebSockets. Use when building dynamic web interfaces without writing complex client JavaScript.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Mindrally/skillstheir own version, first seen Oct 8, 2026
- damusix/skillstheir own version, first seen Jun 13, 2026
- dekoza/oh-my-sloptheir own version, first seen Mar 19, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Mindrally/skills★ 275same name
- damusix/skills★ 63same name
- dekoza/oh-my-slop★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 96
Use declarative htmx attributes on standard HTML input:
- Very specific: line 118
Use hx-indicator to provide visual loading indicators and spinners for every network interaction.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
htmx
High power tools for HTML. Allows you to build modern user interfaces with the simplicity of hypertext.
When to Use
- Hypermedia-Driven Web Architectures: Building dynamic user interfaces using server-rendered HTML over the wire without heavy SPA frameworks.
- CRUD Backends with Existing Templating: Django, Rails, Laravel, Go templates, or Spring Boot apps wanting SPA-like responsiveness.
- Instant Search, Inline Editing, and Polling: Enhancing HTML forms and tables with declarative AJAX attributes.
- Low-JavaScript Minimal Bundles: Drastically reducing client bundle sizes and eliminating frontend state management complexity.
Quick Start
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<!-- When clicked, issue GET to /clicked, swap outerHTML with response -->
<button hx-get="/clicked" hx-swap="outerHTML">Click Me</button>Core Concepts
Declarative AJAX with Trigger & Swap Directives
Making async requests and swapping server HTML directly into DOM targets:
<!-- Instant search input with debouncing -->
<div class="search-widget">
<input
type="text"
name="q"
placeholder="Search users..."
hx-post="/api/users/search"
hx-trigger="keyup changed delay:300ms, search"
hx-target="#search-results"
hx-indicator="#loading-spinner"
class="form-control"
/>
<div id="loading-spinner" class="htmx-indicator">Searching...</div>
<div id="search-results">
<!-- Server returns <ul> list HTML here -->
</div>
</div>Inline Editing with Target Swapping
Updating tabular records in-place without page reloads:
<!-- Table Row Component -->
<tr id="user-row-42">
<td>Alice Johnson</td>
<td>alice@example.com</td>
<td>
<button
class="btn btn-sm btn-primary"
hx-get="/users/42/edit"
hx-target="#user-row-42"
hx-swap="outerHTML"
>
Edit
</button>
</td>
</tr>Out-of-Band (OOB) Updates & Server-Sent Events
Updating multiple disconnected DOM regions from a single response:
<!-- Server response contains main payload and an OOB notification badge -->
<div id="order-details">
<h4>Order #1029 Confirmed</h4>
<p>Status: Processing</p>
</div>
<!-- Out-of-band swap updates the navbar cart badge automatically -->
<span id="cart-counter" hx-swap-oob="true" class="badge bg-danger"> 3 </span>Common Patterns
Inline Search with Debounced Active Search
Problem: Building responsive autocomplete search typically requires heavy React/Vue state machines.
Solution: Use declarative htmx attributes on standard HTML input:
<input
type="search"
name="q"
placeholder="Search users..."
hx-post="/api/users/search"
hx-trigger="keyup changed delay:300ms, search"
hx-target="#search-results"
hx-indicator="#loading-spinner"
/>
<div id="loading-spinner" class="htmx-indicator">Searching...</div>
<div id="search-results"></div>Best Practices
Do:
- Return clean HTML partials/fragments from the server instead of entire HTML document trees for htmx endpoints.
- Use
hx-indicatorto provide visual loading indicators and spinners for every network interaction. - Leverage
hx-boost="true"on root layout links and forms for instant progressive enhancement. - Validate and sanitize all server-rendered HTML to neutralize Cross-Site Scripting (XSS).
Don't:
- Return JSON from htmx endpoints; htmx is fundamentally designed for server-rendered HTML.
- Neglect accessibility; announce dynamic swaps to screen readers using
aria-live="polite". - Overuse client-side scripting when declarative htmx attributes can achieve the desired interaction.
Troubleshooting
| Error | Cause | Solution |
htmx:targetError: Target element does not exist | Element specified in hx-target ID selector is missing from DOM. | Verify ID in DOM: #search-results must exist before request triggers. |
Response received but nothing swapped | Server returned empty response or non-200 HTTP code. | Verify server returns HTML with HTTP 200, or configure hx-swap response codes. |
Infinite request loop | hx-trigger="load" placed inside swapped HTML fragment. | Move load trigger to outer persistent container or remove trigger on swap. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

