jpskill.com
💬 コミュニケーション コミュニティ

htmx-skill

htmxに関する正確な構文や動作、リファレンスページを特定する必要がある際に、htmx JavaScriptライブラリの属性、イベント、APIなどの公式ドキュメントを参照し、適切な情報を提供するSkill。

📜 元の英語説明(参考)

Documentation for the htmx JavaScript library (attributes, events, headers, API, extensions, examples, migration guides, server examples). Use when you need accurate htmx syntax/behavior or to locate the right reference page for an htmx question.

🇯🇵 日本人クリエイター向け解説

一言でいうと

htmxに関する正確な構文や動作、リファレンスページを特定する必要がある際に、htmx JavaScriptライブラリの属性、イベント、APIなどの公式ドキュメントを参照し、適切な情報を提供するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o htmx-skill.zip https://jpskill.com/download/18899.zip && unzip -o htmx-skill.zip && rm htmx-skill.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18899.zip -OutFile "$d\htmx-skill.zip"; Expand-Archive "$d\htmx-skill.zip" -DestinationPath $d -Force; ri "$d\htmx-skill.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して htmx-skill.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → htmx-skill フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
82

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

htmx リファレンス

ユーザーの質問に対して最も適切なページを開くには、以下のインデックスを使用してください。 どのページに答えが含まれているか不明な場合は、ローカルの references/ フォルダーを rg で検索してください。

リファレンスインデックス

一般

  • Events: ドキュメントページ

  • Javascript API: このドキュメントでは、htmx の JavaScript API について説明しています。これには、htmx の動作設定、CSS クラスの操作、AJAX リクエスト、イベント処理、DOM 操作のためのメソッドとプロパティが含まれます。この API は、主に拡張機能の開発とイベント管理を目的としたヘルパー関数を提供しています。

属性

  • hx-boost: htmx の hx-boost 属性は、標準の HTML アンカーとフォームを AJAX リクエストに変換することでプログレッシブエンハンスメントを可能にします。これにより、JavaScript が無効なユーザーには優雅なフォールバックを維持しつつ、JavaScript が有効なユーザーには最新の動的なページ更新を提供します。

  • hx-confirm: htmx の hx-confirm 属性は、リクエストを実行する前に確認ダイアログを追加する方法を提供し、ユーザーを偶発的な破壊的アクションから保護します。このドキュメントでは、確認プロンプトの実装方法と、イベント処理による動作のカスタマイズ方法について説明します。

  • hx-delete: htmx の hx-delete 属性は、要素に指定された URL への DELETE リクエストを発行させ、返された HTML をスワップ戦略を使用して DOM にスワップします。

  • hx-disable: htmx の hx-disable 属性は、指定された要素とそのすべての子要素に対する htmx 処理を無効にします。

  • hx-disabled-elt: htmx の hx-disabled-elt 属性を使用すると、リクエストの期間中 disabled 属性が追加される要素を指定できます。

  • hx-disinherit: htmx の hx-disinherit 属性を使用すると、子要素が親から属性を継承する方法を制御できます。このドキュメントでは、特定の htmx 属性またはすべての属性の継承を選択的に無効にする方法を説明し、Web アプリケーションの動作をより細かく制御できるようにします。

  • hx-encoding: htmx の hx-encoding 属性を使用すると、リクエストのエンコーディングを通常の application/x-www-form-urlencoded エンコーディングから multipart/form-data に切り替えることができます。これは通常、AJAX リクエストでのファイルアップロードをサポートするために使用されます。

  • hx-ext: htmx の hx-ext 属性は、要素とそのすべての子要素に対して1つ以上の htmx 拡張機能を有効にします。この属性を使用して、親要素によって有効になっている拡張機能を無視することもできます。

  • hx-get: htmx の hx-get 属性は、要素に指定された URL への GET リクエストを発行させ、返された HTML をスワップ戦略を使用して DOM にスワップします。

  • hx-headers: htmx の hx-headers 属性を使用すると、AJAX リクエストとともに送信されるヘッダーを追加できます。

  • hx-history: htmx の hx-history 属性を使用すると、履歴ナビゲーション中に機密性の高いページデータがブラウザの localStorage キャッシュに保存されるのを防ぎ、履歴をナビゲートする際にページの状態が代わりにサーバーから取得されるようにします。

  • hx-history-elt: htmx の hx-history-elt 属性を使用すると、ナビゲーション中にページの状態をスナップショットして復元するために使用される要素を指定できます。ほとんどの場合、この要素の使用は推奨しません。

  • hx-include: htmx の hx-include 属性を使用すると、AJAX リクエストに追加の要素値を含めることができます。

  • hx-indicator: htmx の hx-indicator 属性を使用すると、リクエストの期間中 htmx-request クラスが追加される要素を指定できます。これは、リクエストが進行中にスピナーや進捗インジケーターを表示するために使用できます。

  • hx-inherit: htmx の hx-inherit 属性を使用すると、親要素と子要素間の属性継承の動作を明示的に制御でき、デフォルトの継承システムが設定によって無効になっている場合に、どの htmx 属性が継承されるかをきめ細かく制御できます。

  • hx-on: htmx の hx-on 属性を使用すると、標準の DOM イベントと htmx 固有のイベントの両方をサポートし、動作の局所性を向上させながら、HTML 要素に直接インライン JavaScript イベントハンドラーを記述できます。

  • hx-params: htmx の hx-params 属性を使用すると、AJAX リクエストとともに送信されるパラメーターをフィルタリングできます。

  • hx-patch: htmx の hx-patch 属性は、要素に指定された URL への PATCH リクエストを発行させ、返された HTML をスワップ戦略を使用して DOM にスワップします。

  • hx-post: htmx の hx-post 属性は、

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

htmx Reference

Use the index below to open the most specific page for the user's question. Search the local references/ folder with rg when unsure which page contains the answer.

Reference Index

General

  • Events: Documentation page

  • Javascript API: This documentation describes the JavaScript API for htmx, including methods and properties for configuring the behavior of htmx, working with CSS classes, AJAX requests, event handling, and DOM manipulation. The API provides helper functions primarily intended for extension development and event management.

Attributes

  • hx-boost: The hx-boost attribute in htmx enables progressive enhancement by converting standard HTML anchors and forms into AJAX requests, maintaining graceful fallback for users without JavaScript while providing modern dynamic page updates for those with JavaScript enabled.

  • hx-confirm: The hx-confirm attribute in htmx provides a way to add confirmation dialogs before executing requests, allowing you to protect users from accidental destructive actions. This documentation explains how to implement confirmation prompts and customize their behavior through event handling.

  • hx-delete: The hx-delete attribute in htmx will cause an element to issue a DELETE request to the specified URL and swap the returned HTML into the DOM using a swap strategy.

  • hx-disable: The hx-disable attribute in htmx will disable htmx processing for a given element and all its children.

  • hx-disabled-elt: The hx-disabled-elt attribute in htmx allows you to specify elements that will have the disabled attribute added to them for the duration of the request.

  • hx-disinherit: The hx-disinherit attribute in htmx lets you control how child elements inherit attributes from their parents. This documentation explains how to selectively disable inheritance of specific htmx attributes or all attributes, allowing for more granular control over your web application's behavior.

  • hx-encoding: The hx-encoding attribute in htmx allows you to switch the request encoding from the usual application/x-www-form-urlencoded encoding to multipart/form-data, usually to support file uploads in an AJAX request.

  • hx-ext: The hx-ext attribute in htmx enables one or more htmx extensions for an element and all its children. You can also use this attribute to ignore an extension that is enabled by a parent element.

  • hx-get: The hx-get attribute in htmx will cause an element to issue a GET request to the specified URL and swap the returned HTML into the DOM using a swap strategy.

  • hx-headers: The hx-headers attribute in htmx allows you to add to the headers that will be submitted with an AJAX request.

  • hx-history: The hx-history attribute in htmx allows you to prevent sensitive page data from being stored in the browser's localStorage cache during history navigation, ensuring that the page state is retrieved from the server instead when navigating through history.

  • hx-history-elt: The hx-history-elt attribute in htmx allows you to specify the element that will be used to snapshot and restore page state during navigation. In most cases we do not recommend using this element.

  • hx-include: The hx-include attribute in htmx allows you to include additional element values in an AJAX request.

  • hx-indicator: The hx-indicator attribute in htmx allows you to specify the element that will have the htmx-request class added to it for the duration of the request. This can be used to show spinners or progress indicators while the request is in flight.

  • hx-inherit: The hx-inherit attribute in htmx allows you to explicitly control attribute inheritance behavior between parent and child elements, providing fine-grained control over which htmx attributes are inherited when the default inheritance system is disabled through configuration.

  • hx-on: The hx-on attributes in htmx allow you to write inline JavaScript event handlers directly on HTML elements, supporting both standard DOM events and htmx-specific events with improved locality of behavior.

  • hx-params: The hx-params attribute in htmx allows you to filter the parameters that will be submitted with an AJAX request.

  • hx-patch: The hx-patch attribute in htmx will cause an element to issue a PATCH request to the specified URL and swap the returned HTML into the DOM using a swap strategy.

  • hx-post: The hx-post attribute in htmx will cause an element to issue a POST request to the specified URL and swap the returned HTML into the DOM using a swap strategy.

  • hx-preserve: The hx-preserve attribute in htmx allows you to keep an element unchanged during HTML replacement. Elements with hx-preserve set are preserved by id when htmx updates any ancestor element.

  • hx-prompt: The hx-prompt attribute in htmx allows you to show a prompt before issuing a request. The value of the prompt will be included in the request in the HX-Prompt header.

  • hx-push-url: The hx-push-url attribute in htmx allows you to push a URL into the browser location history. This creates a new history entry, allowing navigation with the browser's back and forward buttons.

  • hx-put: The hx-put attribute in htmx will cause an element to issue a PUT request to the specified URL and swap the returned HTML into the DOM using a swap strategy.

  • hx-replace-url: The hx-replace-url attribute in htmx allows you to replace the current URL of the browser location history.

  • hx-request: The hx-request attribute in htmx allows you to configure the request timeout, whether the request will send credentials, and whether the request will include headers.

  • hx-select: The hx-select attribute in htmx allows you to select the content you want swapped from a response.

  • hx-select-oob: The hx-select-oob attribute in htmx allows you to select content from a response to be swapped in via an out-of-band swap. The value of this attribute is comma separated list of elements to be swapped out of band.

  • hx-swap: The hx-swap attribute in htmx allows you to specify the 'swap strategy', or how the response will be swapped in relative to the target of an AJAX request. The default swap strategy is innerHTML.

  • hx-swap-oob: The hx-swap-oob attribute in htmx allows you to specify that some content in a response should be swapped into the DOM somewhere other than the target, that is 'out-of-band'. This allows you to piggyback updates to other elements on a response.

  • hx-sync: The hx-sync attribute in htmx allows you to synchronize AJAX requests between multiple elements.

  • hx-target: The hx-target attribute in htmx allows you to target a different element for swapping than the one issuing the AJAX request.

  • hx-trigger: The hx-trigger attribute in htmx allows you to specify what triggers an AJAX request. Supported triggers include standard DOM events, custom events, polling intervals, and event modifiers. The hx-trigger attribute also allows specifying event filtering, timing controls, event bubbling, and multiple trigger definitions for fine-grained control over when and how requests are initiated.

  • hx-validate: The hx-validate attribute in htmx will cause an element to validate itself using the HTML5 Validation API before it submits a request.

  • hx-vals: The hx-vals attribute in htmx allows you to add to the parameters that will be submitted with an AJAX request.

  • hx-vars: The hx-vars attribute in htmx allows you to dynamically add to the parameters that will be submitted with an AJAX request. This attribute has been deprecated. We recommend you use the hx-vals attribute that provides the same functionality with safer defaults.

Examples

Extensions

Headers

  • HX-Location Response Header: Use the HX-Location response header in htmx to trigger a client-side redirection without reloading the whole page.

  • HX-Push Response Header (Deprecated): The HX-Push response header in htmx is deprecated. Use HX-Push-Url instead.

  • HX-Push-Url Response Header: Use the HX-Push-Url response header in htmx to push a URL into the browser location history.

  • HX-Redirect Response Header: Use the HX-Redirect response header in htmx to trigger a client-side redirection that will perform a full page reload.

  • HX-Replace-Url Response Header: Use the HX-Replace-Url response header in htmx to replace the current URL in the browser location history without creating a new history entry.

  • HX-Trigger Response Headers: Use the HX-Trigger family of response headers in htmx to trigger client-side actions from an htmx response.

Usage Notes

  • Prefer attribute/event/header-specific pages over general guides.
  • For API or configuration questions, check api.md in addition to specific pages.
  • Open the referenced file to confirm details before answering if the description seems too brief.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。