Agent skill

Djhtmx Setup

by edelvalle in edelvalle/djhtmx

Read this to install djhtmx in a Django project, to change a DJHTMX setting, or when a component renders but nothing responds.

MITAuto-check passedBackend & APIs

Install Djhtmx Setup

skills CLI
$ npx skills add edelvalle/djhtmx --skill djhtmx-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install edelvalle/djhtmx djhtmx-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/edelvalle/djhtmx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/djhtmx-setup .claude/skills/djhtmx-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
djhtmx-setup
GitHub stars
150
Token cost
~1k tokens
SKILL.md length
446 words
Files
4 (incl. references)
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Read this to install djhtmx in a Django project, to change a DJHTMX setting, or when a component renders but nothing responds.

  • Tasks that involve Backend development
  • SKILL.md covers Redis, The app, The middleware, last and The context processor, plus 5 more sections
  • Calls python, rg and make

What it does

Djhtmx Setup is an agent skill from edelvalle/djhtmx. Read this to install djhtmx in a Django project, to change a DJHTMX setting, or when a component renders but nothing responds.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/settings.md`, `references/sse-deployment.md` and `references/troubleshooting.md`).

It sits in Backend & APIs, covering Backend development. It works with Django and Redis. The repository describes itself as: Interactive UI components for Django using htmx.org. The licence is MIT.

When your agent uses it

  • Tasks that involve Backend development

Example prompts

  • “/djhtmx-setup”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 82da27c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • rg
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Djhtmx Setup loads about 1k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 35 tokens; SKILL.md has 446 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from edelvalle/djhtmx at commit 82da27c, republished under its MIT licence (© edelvalle). 446 words, ~1,005 tokens.

Download SKILL.mdSave it as .claude/skills/djhtmx-setup/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
djhtmx-setup
description
Read this to install djhtmx in a Django project, to change a DJHTMX_* setting, or when a component renders but nothing responds.

Setting up djhtmx

djhtmx needs six things wired, and every one of them fails quietly on its own. Do them in this order and check the result; troubleshooting reads the symptoms backwards when something is already broken.

Read the djhtmx-components skill to write components, and djhtmx-testing to test them.

Redis

Component state lives in Redis, not in the database or the Django session. djhtmx connects at import time, so a project without a reachable Redis fails at startup rather than at the first interaction. Point DJHTMX_REDIS_URL at it -- the default is redis://localhost/0, which is right only for a laptop.

The app

python
INSTALLED_APPS = [
    ...,
    "djhtmx",
]

Its ready() imports, for every installed app, an htmx module or an htmx package -- the package recursively. A component in a module neither of those reaches is never registered: {% htmx "Name" %} will not find it, and it gets no URL.

The middleware, last

python
MIDDLEWARE = [
    ...,
    "djhtmx.middleware",
]

It flushes the session the request touched and answers a LoginRequired raised while rendering a page with a redirect to the login page. Last is not decoration: Django calls process_exception from the innermost middleware outward, so the last entry is the first to see the exception, before anything outer turns it into a 500.

The context processor

python
TEMPLATES = [{
    ...,
    "OPTIONS": {"context_processors": [
        ...,
        "django.template.context_processors.request",
        "djhtmx.context.component_repo",
    ]},
}]

component_repo is what puts the repository in the template context, and every djhtmx tag reads it from there. request has to be there too -- {% htmx-headers %} renders nothing at all without it, which is the quietest failure in this list.

The URLs

python
urlpatterns = [
    ...,
    path("_htmx/", include("djhtmx.urls")),
]

The prefix is yours. What the include brings is one URL per registered component plus the SSE endpoint, and it builds that list from the registry at import time: a component registered after djhtmx.urls is imported has no URL, whatever the template says.

Show full SKILL.md (161 more words)Show less

The headers

html
{% load htmx %}
<!doctype html>
<html>
  <head>
    {% htmx-headers %}
  </head>
</html>

This loads htmx itself, the SSE extension and djhtmx's own script, and it carries the CSRF header name. Without it the page renders correctly and does nothing at all when clicked -- there is no error anywhere.

The SSE router, if the project uses SSE

html
{% htmx "SSEEventRouter" %}

Once per page, normally in the base template. It opens the single SSE connection and routes what arrives into the DOM. SSE also needs an ASGI server: the endpoint answers 501 SSE requires ASGI under WSGI. See sse-deployment.

Checking it

bash
python manage.py htmx check-shadowing
python manage.py htmx check-unused-non-public
rg --pcre2 --type html -o --no-heading --no-filename "{% htmx [\"'](\w+)" . \
  | awk '{print $3}' | cut -b2- | sort -u \
  | python manage.py htmx check-missing -

check-shadowing finds two components answering to the same name, check-missing a {% htmx "Name" %} that names no component, and check-unused-non-public a non-public component nothing subclasses. Put them behind a make check-htmx target and run them after adding, renaming or removing a component.

Reference

  • settings -- every DJHTMX_* setting and what changing it costs.
  • sse-deployment -- what SSE asks of the server, and the render pool's database connections.
  • troubleshooting -- symptom to cause, for a setup that is already wrong.

© edelvalle, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in .agents/skills/djhtmx-setup of edelvalle/djhtmx.

  • SKILL.md
  • references/settings.md
  • references/sse-deployment.md
  • references/troubleshooting.md

Open the folder on GitHubat commit 82da27c

Compare with similar skills

Djhtmx Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Djhtmx Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Djhtmx Setup this skilledelvalle/djhtmx150—~1kAutomated safety check: PassMIT
Funboost Faas Deployydf0509/funboost892—~956Automated safety check: PassNone
Python PatternsxenitV1/Antigravity-Workflows1307 repos~2.2kAutomated safety check: PassMIT
Django Celeryaffaan-m/ECC275k—~240Automated safety check: PassMIT
Django Q2hashgraph-online/awesome-codex-plugins1.2k—~1.7kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT

Similar skills

  • Funboost Faas Deploy

    ydf0509/funboost

    当需要将 funboost 任务部署为 HTTP 微服务时使用。触发场景:通过 FastAPI/Flask/Django 暴露发布和查询接口、使用内置 FaaS router、无需手写 API 代码。关键词:FaaS, 微服务, FastAPI, Flask, Django, HTTP API, REST, fastapirouter, flaskblueprint, web deploy。

    892 GitHub stars~956 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Python Patterns

    xenitV1/Antigravity-Workflows

    Python development principles and decision-making. An agent skill from xenitV1/Antigravity-Workflows.

    130 GitHub starsUsed in 7 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • Django Celery

    affaan-m/ECC

    DjangoおよびCeleryを使用した非同期タスク処理。タスクキューイング、ワーカー管理、エラー処理、スケジューリング。Redis/RabbitMQ ブローカー統合。

    275k GitHub stars~240 tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Django Q2

    hashgraph-online/awesome-codex-plugins

    A skill your agent uses when adding, changing, testing, or debugging Django Q2 background tasks, scheduled jobs, qcluster workers, Redis broker configuration, or ORM broker fallback in Django…

    1.2k GitHub stars~1.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Generates and splits Django schema migrations for Saleor with manage.py makemigrations, enforcing one new model or one field change per migration file.

    23k GitHub stars~1k tokensUpdated today
    Backend & APIsAuto-check passed

More from edelvalle/djhtmx

  • Djhtmx Testing

    edelvalle/djhtmx

    Read this before writing or changing a test of an HtmxComponent: how to drive a component with djhtmx.testing.Htmx, what goes stale between sends, and how to assert on what never reaches the DOM.

    150 GitHub stars~856 tokensUpdated yesterday
    Auto-check passed
  • Commit

    edelvalle/djhtmx

    Read this skill before making git commits. An agent skill from edelvalle/djhtmx.

    150 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes
  • Djhtmx Components

    edelvalle/djhtmx

    Read this before writing or changing a subclass of HtmxComponent: what belongs in the state, what a handler takes, how a component reports a failure, and the checks to run afterwards.

    150 GitHub stars~957 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Djhtmx Setup

What does Djhtmx Setup do?

Read this to install djhtmx in a Django project, to change a DJHTMX setting, or when a component renders but nothing responds. Djhtmx Setup is an agent skill from edelvalle/djhtmx. Read this to install djhtmx in a Django project, to change a DJHTMX setting, or when a component renders but nothing responds.

When should I use Djhtmx Setup?

Djhtmx Setup fits situations like: tasks that involve Backend development.

How do I install Djhtmx Setup in Claude Code?

Run `npx skills add edelvalle/djhtmx --skill djhtmx-setup -a claude-code`. Or copy the skill folder (.agents/skills/djhtmx-setup in edelvalle/djhtmx) into .claude/skills/djhtmx-setup in your project. Claude Code loads it when a task matches its description.

How do I install Djhtmx Setup in Codex?

Run `npx skills add edelvalle/djhtmx --skill djhtmx-setup -a codex`. Or copy the skill folder (.agents/skills/djhtmx-setup in edelvalle/djhtmx) into .agents/skills/djhtmx-setup in your project. Codex loads it when a task matches its description.

Can I use Djhtmx Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add edelvalle/djhtmx --skill djhtmx-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/djhtmx-setup, .gemini/skills/djhtmx-setup, .github/skills/djhtmx-setup and .opencode/skills/djhtmx-setup in your project.

What does Djhtmx Setup need to run?

Going by SKILL.md and its folder, Djhtmx Setup needs the command-line tools its instructions call (python, rg and make). Our summary lists: Python 3.

Does Djhtmx Setup access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Djhtmx Setup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Djhtmx Setup use?

Djhtmx Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Djhtmx Setup use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.

What are the alternatives to Djhtmx Setup?

Skills that share tags, products or a category with Djhtmx Setup: Funboost Faas Deploy (ydf0509/funboost, 892 stars), Python Patterns (xenitV1/Antigravity-Workflows, 130 stars), Django Celery (affaan-m/ECC, 275k stars) and Django Q2 (hashgraph-online/awesome-codex-plugins, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Djhtmx Setup?

edelvalle (a GitHub user) maintains it in edelvalle/djhtmx, which has 150 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 6, 2026.

Source: edelvalle/djhtmx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.