Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

htmxhtmx 搜索

Agent Skill

htmx 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,909

周安装

82

GitHub Stars

15

下载量

669
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:htmx(htmx 搜索)
来源仓库:https://github.com/damusix/skills
仓库路径:skills/htmx
安装命令:
npx skills add https://github.com/damusix/skills --skill htmx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/damusix/skills --skill htmx

简介

用于 HTMX 实现与集成,支持 HTML-first 开发模式。

  • 提供按钮加载内容、事件处理和服务器端片段返回机制。
  • 需确保服务端返回 HTML 片段而非 JSON,保持超媒体驱动特性。
  • 适用于需要轻量级前端交互增强的传统服务端渲染应用。
  • 可结合现有后端路由快速构建动态内容更新功能。htmx 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

HTMX

Use this skill for HTMX implementation and integration. Read only the reference file(s) needed for the task.

Quick Start

  1. Identify the domain of the task (attributes, requests, swapping, events, patterns).
  2. Open the matching file from references/.
  3. Implement using HTML-first, hypermedia-driven patterns.
  4. 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:

<!-- 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.

Critical Rules

  1. HTML responses - HTMX expects HTML responses from the server, not JSON
  2. Attribute inheritance - Most attributes inherit to children. Not inherited: hx-trigger, hx-on*, hx-swap-oob, hx-preserve, hx-history-elt, hx-validate. Use hx-disinherit or unset to stop inheritance
  3. Default swap is innerHTML - Always confirm the intended swap method
  4. Form values auto-included - Non-GET requests automatically include the closest enclosing form's values
  5. Progressive enhancement - Use hx-boost="true" — pages must work without JS
  6. Escape user content - Escape all user-supplied content server-side to prevent XSS. Wrap areas rendering user-generated content with hx-disable to prevent HTMX processing of injected attributes
  7. CSS lifecycle classes - HTMX adds/removes CSS classes during requests — use for transitions and indicators
  8. data-prefix supported - All hx-* attributes can also be written as data-hx-* for HTML validation compliance
  9. Stop polling with HTTP 286 - Server returns status 286 to stop every or load delay polling. Always use 286 for poll termination, not conditional client-side logic
  10. Error swaps need htmx:beforeSwap - Non-2xx responses (e.g., 422 validation errors) are not swapped by default. Add an htmx:beforeSwap listener to enable swapping for error status codes
  11. Decouple with HX-Trigger headers - Use HX-Trigger response headers to fire client-side events instead of hardcoding DOM element IDs in server responses
  12. Detect HTMX requests server-side - Check the HX-Request header to serve HTML fragments for HTMX requests and full pages for direct browser requests. Set Vary: HX-Request for caching

Reference Map

  • All hx-* attributes, values, and modifiers: references/attributes.md
  • Triggers, headers, parameters, CSRF, caching, CORS: references/requests.md
  • Swap methods, targets, OOB swaps, morphing, view transitions: references/swapping.md
  • Events, JS API, configuration, extensions, debugging: references/events-api.md
  • Common UI patterns and examples: references/patterns.md
  • Official extensions (WS, SSE, Idiomorph, response-targets, head-support, preload): references/extensions.md
  • Gotchas, pitfalls, and practical guidance: references/gotchas.md
  • Cross-file index and routing: references/REFERENCE.md

Task Routing

  • Adding HTMX behavior to elements -> references/attributes.md
  • Configuring how/when requests fire -> references/requests.md
  • Controlling where/how responses render -> references/swapping.md
  • Handling events, JS interop, or config -> references/events-api.md
  • Building common UI patterns (search, infinite scroll, modals, etc.) -> references/patterns.md
  • Using WebSockets, SSE, morphing, preloading, response targeting, or head merging -> references/extensions.md
  • Avoiding common pitfalls, accessibility, error handling, architecture decisions -> references/gotchas.md
  • Cross-cutting concerns or architecture -> references/REFERENCE.md then domain-specific files

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.66%
按下载量换算245

Claude

30.84%
按下载量换算206

Cursor

17.44%
按下载量换算117

Gemini CLI

8.74%
按下载量换算58

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills