KS
Killer-Skills

docs-htmx — how to use docs-htmx how to use docs-htmx, docs-htmx setup guide, HTMX helper functions, Kotlin HTMX integration, docs-htmx alternative, HTMX patterns reference

v1.0.0
GitHub

About this Skill

Ideal for Kotlin-based AI Agents requiring efficient HTMX development and interaction patterns. docs-htmx is a collection of HTMX helper functions and interaction patterns for MC-ORG, utilizing Kotlin for enhanced development.

Features

Provides HTMX helper functions via hx.kt
Supports HTTP methods like hxGet, hxPost, hxPut, hxPatch, and hxDelete
Includes hxDeleteWithConfirm for delete operations with confirmation modals
Utilizes Kotlin for HTMX interaction patterns
Offers a reference for HTMX patterns in MC-ORG

# Core Topics

evengul evengul
[0]
[0]
Updated: 3/4/2026

Quality Score

Top 5%
39
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add evengul/mc-org/docs-htmx

Agent Capability Analysis

The docs-htmx MCP Server by evengul is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use docs-htmx, docs-htmx setup guide, HTMX helper functions.

Ideal Agent Persona

Ideal for Kotlin-based AI Agents requiring efficient HTMX development and interaction patterns.

Core Value

Empowers agents to leverage HTMX helper functions for HTTP methods like hxGet, hxPost, hxPut, hxPatch, and hxDelete, streamlining development with Kotlin and facilitating seamless interaction with HTMX components, including custom confirmation modals for delete operations.

Capabilities Granted for docs-htmx MCP Server

Implementing hxGet for data retrieval
Utilizing hxPost for form submissions
Creating custom delete confirmation modals with hxDeleteWithConfirm

! Prerequisites & Limits

  • Requires Kotlin compatibility
  • Specific to HTMX development
  • Dependent on MC-ORG component for custom delete confirmation modals
Project
SKILL.md
5.7 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

HTMX Patterns Reference

HTMX helper functions and interaction patterns for MC-ORG.


HTMX Helper Functions (hx.kt)

kotlin
1// HTTP methods 2fun HTMLTag.hxGet(value: String) 3fun HTMLTag.hxPost(value: String) 4fun HTMLTag.hxPut(value: String) 5fun HTMLTag.hxPatch(value: String) 6fun HTMLTag.hxDelete(value: String) 7 8// Delete with confirmation modal (custom MC-ORG component) 9fun HTMLTag.hxDeleteWithConfirm( 10 url: String, 11 title: String, 12 description: String, 13 warning: String, 14 confirmText: String? = null // if set, user must type this to confirm 15) 16 17// Targeting and swapping 18fun HTMLTag.hxTarget(value: String) // CSS selector for swap target 19fun HTMLTag.hxSwap(value: String) // swap strategy (see table below) 20 21// Additional attributes 22fun HTMLTag.hxConfirm(value: String) // simple confirm dialog 23fun HTMLTag.hxTrigger(value: String) // e.g., "load", "click", "change" 24fun HTMLTag.hxPushUrl(value: String) // update browser URL 25 26// Include additional form data 27fun HTMLTag.hxInclude(value: String) // CSS selector for extra inputs to include 28 29// Out-of-band swaps (update multiple elements in one response) 30fun HTMLTag.hxOutOfBands(locator: String) // "true" or element spec 31 32// Error targeting 33fun HTMLTag.hxErrorTarget(target: String) 34fun HTMLTag.hxErrorTarget(target: String, errorCode: String) 35 36// Extensions 37fun HTMLTag.hxExtension(value: String)

HTMX Swap Strategies

ValueEffect
innerHTMLReplace inner content (default)
outerHTMLReplace entire element
beforeendAppend to end of target
afterbeginPrepend to beginning of target
deleteRemove target element

Response Helpers (htmxResponseUtils.kt)

kotlin
1// HTMX redirect — sets HX-Redirect header (no full page reload) 2suspend fun ApplicationCall.clientRedirect(path: String) 3 4// Error responses — sets HX-ReTarget and HX-ReSwap for error display 5suspend fun ApplicationCall.respondBadRequest( 6 errorHtml: String = "An error occurred", 7 target: String = "#error-message", 8 swap: String = "innerHTML" 9) 10suspend fun ApplicationCall.respondNotFound(errorHtml: String = "Not found", ...)

Common Patterns

Form submission

kotlin
1// Template 2form { 3 id = "create-project-form" 4 hxPost("/app/worlds/${worldId}/projects") 5 hxTarget("#create-project-form") 6 7 input(classes = "form-control") { name = "name"; placeholder = "Project name" } 8 button(classes = "btn btn--action") { type = ButtonType.submit; +"Create" } 9} 10 11// Handler response (replaces the form) 12respondHtml(createHTML().div { 13 id = "create-project-form" 14 div("notice notice--success") { +"Project created successfully!" } 15})

Update action (button trigger)

kotlin
1// Template 2button(classes = "btn btn--action") { 3 hxPut("/app/worlds/${worldId}/projects/${projectId}/stage") 4 hxTarget("#project-stage") 5 +"Advance Stage" 6} 7 8// Handler response 9respondHtml(createHTML().div { 10 id = "project-stage" 11 span("badge badge--success") { +"Building" } 12})

Delete with confirmation

kotlin
1// Template 2button(classes = "btn btn--danger") { 3 hxDeleteWithConfirm( 4 url = "/app/worlds/${worldId}/projects/${projectId}", 5 title = "Delete Project", 6 description = "Are you sure you want to delete this project?", 7 warning = "This will also delete all tasks and cannot be undone.", 8 confirmText = "DELETE" // user must type this 9 ) 10 +"Delete Project" 11} 12 13// Handler response (after deletion) 14respondHtml(createHTML().div { 15 id = "project-card" // replaced/removed element 16 div("notice notice--success") { +"Project deleted." } 17})

Dynamic content load on page load

kotlin
1div { 2 id = "task-list" 3 hxGet("/app/worlds/${worldId}/projects/${projectId}/tasks") 4 hxTrigger("load") 5 +"Loading tasks..." 6}

Out-of-band swap (update multiple elements)

kotlin
1// Response updates both #project-list (main) and #notification-count (OOB) 2respondHtml(createHTML().div { 3 id = "project-list" 4 projectListContent(projects) 5 6 span { 7 id = "notification-count" 8 hxOutOfBands("true") 9 +"${notificationCount}" 10 } 11})

Include extra inputs in request

kotlin
1button(classes = "btn btn--action") { 2 hxPost("/app/worlds/${worldId}/tasks") 3 hxTarget("#task-list") 4 hxInclude("#task-form-inputs") // include inputs from another element 5 +"Add Task" 6}

Inline editing

kotlin
1// View mode 2div { 3 id = "project-description" 4 span { +project.description } 5 button(classes = "btn btn--ghost btn--sm") { 6 hxGet("/app/worlds/${worldId}/projects/${projectId}/edit/description") 7 hxTarget("#project-description") 8 +"Edit" 9 } 10} 11 12// Handler returns edit form (replaces #project-description) 13respondHtml(createHTML().div { 14 id = "project-description" 15 form { 16 hxPut("/app/worlds/${worldId}/projects/${projectId}/description") 17 hxTarget("#project-description") 18 textarea(classes = "form-control") { name = "description"; +project.description } 19 div("cluster cluster--sm") { 20 button(classes = "btn btn--action") { +"Save" } 21 button(classes = "btn btn--neutral") { 22 hxGet("/app/worlds/${worldId}/projects/${projectId}") 23 hxTarget("#project-description") 24 +"Cancel" 25 } 26 } 27 } 28})

Rules

  • GET endpoints return full pages via createPage(user, "Title") { ... }
  • PUT/PATCH/POST/DELETE endpoints return HTML fragments (NOT full pages)
  • Response element id must match hxTarget selector
  • Always specify hxTarget — never rely on defaults
  • Use semantic HTTP: GET=read, POST=create, PUT=replace, PATCH=partial, DELETE=remove

Related Skills

Looking for an alternative to docs-htmx or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication