Skip to content
Back to skills

Htmx

ASecurity

HTMX hypermedia-driven interactions, HX-* attributes, and backend integration patterns. Use when building dynamic web UIs with minimal JavaScript and server-rendered HTML.

  • 47 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 12, 2026
developmentjavascriptjavabackend

Works with

  • cli

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add skeletorflet/opencode-supreme-setup --skill htmx --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Htmx?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Htmx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/skeletorflet-htmx/badge)](https://www.skillsdirectory.com/skills/skeletorflet-htmx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: htmx
description: HTMX hypermedia-driven interactions, HX-* attributes, and backend integration patterns. Use when building dynamic web UIs with minimal JavaScript and server-rendered HTML.
---

## htmx

### Core Concepts
- Core attributes: hx-get, hx-post, hx-put, hx-delete, hx-patch for AJAX
- Triggers: hx-trigger (click, change, load, reveal, intersect, every)
- Target swapping: hx-target, hx-swap (innerHTML, outerHTML, beforebegin, afterend)
- Indicators: hx-indicator and hx-request for loading states
- History: hx-push-url and hx-replace-url for URL management

### Common Patterns
- Infinite scroll with hx-trigger="revealed" on last list item
- Form submission with hx-post and hx-target for inline validation
- Lazy loading with hx-trigger="load" for below-fold content
- Polling with hx-trigger="every 5s" for live data updates
- Delete button with hx-delete and hx-confirm for confirmation

### Best Practices
- Return HTML fragments from server, never JSON for HTMX routes
- Use hx-swap-oob for updating multiple parts of page at once
- Combine with Alpine.js for complex client-side interactions
- Set HX-Request header detection on server for partial vs full responses
- Use hx-boost for converting all links/forms to AJAX

### Common Code Patterns
- Search input with hx-get, hx-trigger="keyup delay:300ms", hx-target="#results"
- Todo list with hx-post form, hx-target="#todo-list", hx-swap="beforeend"
- Modal with hx-get loading content and hx-swap="innerHTML" on dialog

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.