Agent skill

Djhtmx Testing

by edelvalle in 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.

MITAuto-check passed

Install Djhtmx Testing

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

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

GitHub CLI
$ gh skill install edelvalle/djhtmx djhtmx-testing --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-testing .claude/skills/djhtmx-testing && 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-testing
GitHub stars
150
Token cost
~856 tokens
SKILL.md length
257 words
Files
7 (incl. references)
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

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.

  • SKILL.md covers Two rules, A test and Reference
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Djhtmx Testing is an agent skill from 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.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/assertions.md`, `references/basic.md` and `references/interactions.md`).

The repository describes itself as: Interactive UI components for Django using htmx.org. The licence is MIT.

Example prompts

  • “/djhtmx-testing”

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    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 Testing loads about 856 tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 53 tokens; SKILL.md has 257 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~856
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.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). 257 words, ~856 tokens.

Download SKILL.mdSave it as .claude/skills/djhtmx-testing/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
djhtmx-testing
description
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.

Testing djhtmx components

djhtmx.testing.Htmx wraps a Django test client and runs the same dispatch the browser does: it navigates to a real page, keeps the rendered DOM, and applies everything a handler produces -- renders, out-of-band swaps, destroys, URL changes, pending SSE events.

Read the djhtmx-components skill for the component under test.

Two rules

Drive the real page. A component built by hand -- constructed directly, with model_construct, or through a factory of your own -- has no repository, no session and no rendered DOM. The test then passes over the placement, the state round-trip and the render, which is where the bugs are.

Never call a handler yourself. editor.toggle_item(item) skips the command processor: the arguments are never coerced, the commands are never processed, the state is never stored, and nothing renders. Send it instead.

A test

python
class TestTheItemEditor(TestCase):
    @classmethod
    def setUpTestData(cls):
        cls.owner = OwnerFactory.create()
        cls.first = ItemFactory.create(owner=cls.owner, name="First item")
        cls.second = ItemFactory.create(owner=cls.owner, name="Second item")

    def setUp(self):
        client = Client()
        client.force_login(UserFactory.create(is_staff=True))
        self.htmx = Htmx(client)
        self.htmx.navigate_to(reverse("owner-detail", args=[self.owner.id]))

    def test_choosing_an_item_marks_it(self):
        editor = self.htmx.get_component_by_type(ItemEditor)
        self.htmx.send(editor.open_the_item, item=self.first)
        self.htmx.send(editor.toggle_item, item=self.second)
        # `editor` is stale -- read the component again
        editor = self.htmx.get_component_by_type(ItemEditor)
        chosen = [row.name for row in editor.items if row.chosen]
        self.assertEqual(chosen, ["Second item"])

    def test_it_asks_for_an_open_item_first(self):
        editor = self.htmx.get_component_by_type(ItemEditor)
        with self.htmx.assertEmits(ItemsRebuildRefused) as captured:
            self.htmx.send(editor.rebuild_the_items)
        self.assertEqual(captured.get_event().reason, "no-open-item")

Reference

Read the file for what the test is about to do:

  • basic -- building the client, navigating, finding components, logging in, the reference that goes stale, and the placeholder a lazy component renders first.
  • interactions -- send through the bound method, type_into and trigger for going through the template, dispatch_event as the escape hatch.
  • assertions -- assertEmits, assertYields, capturing, and why the assertions go after the block.
  • the-dom -- select, find_by_text, print, the lxml truthiness trap, and what to assert on the DOM rather than on the component.
  • urls -- starting a component from the query string, asserting that a handler moved the URL, and what a Redirect does to a test.
  • sse -- drain_sse_events, emitting from a test, and telling "from this page" apart from "from elsewhere".

© 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 6 other files (references) in .agents/skills/djhtmx-testing of edelvalle/djhtmx.

  • SKILL.md
  • references/assertions.md
  • references/basic.md
  • references/interactions.md
  • references/sse.md
  • references/the-dom.md
  • references/urls.md

Open the folder on GitHubat commit 82da27c

Compare with similar skills

Djhtmx Testing 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 Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Djhtmx Testing this skilledelvalle/djhtmx150—~856Automated safety check: PassMIT
Make Changesremix-run/remix33k—~2.4kAutomated safety check: PassMIT
Orch Change Featureaffaan-m/ECC275k1 repos~420Automated safety check: PassMIT
Change Managementsickn33/agentic-awesome-skills47k2 repos~3.5kAutomated safety check: PassMIT
Implement Changepnpm/pnpm37k—~1.1kAutomated safety check: PassMIT
Testing Changespnpm/pnpm37k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Make Changes

    remix-run/remix

    Create or update Remix repo change files under packages//.changes.

    33k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Orchestrate altering an existing, working feature to new desired behavior — update its tests to the new spec, change the implementation to match, review, and gated commit.

    275k GitHub starsUsed in 1 repo~420 tokens
    Auto-check passed
  • Change Management

    sickn33/agentic-awesome-skills

    Implement change management processes. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3.5k tokens
    DevOps & CloudAuto-check passed
  • Implement a pnpm feature, bug fix, or refactor by checking existing capabilities, prioritizing code reuse and deduplication, assessing architecture impact, and validating the final change.

    37k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Run the tests that cover a change in the pnpm repository, in the Rust workspace (pnpm/, pnpr/) or the TypeScript CLI (pnpm11/), and recognize the cases where a scoped run passes without testing…

    37k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Change Management

    alirezarezvani/claude-skills

    Framework for rolling out organizational changes without chaos.

    28k GitHub starsUsed in 2 repos~2.9k tokens
    Auto-check passed

More from edelvalle/djhtmx

  • Djhtmx Setup

    edelvalle/djhtmx

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

    150 GitHub stars~1k tokensUpdated 2 days ago
    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 2 days ago
    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 2 days ago
    Auto-check passed

Questions about Djhtmx Testing

What does Djhtmx Testing do?

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. Djhtmx Testing is an agent skill from edelvalle/djhtmx.Htmx, what goes stale between sends, and how to assert on what never reaches the DOM.

How do I install Djhtmx Testing in Claude Code?

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

How do I install Djhtmx Testing in Codex?

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

Can I use Djhtmx Testing 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-testing -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-testing, .gemini/skills/djhtmx-testing, .github/skills/djhtmx-testing and .opencode/skills/djhtmx-testing in your project.

What does Djhtmx Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: Djhtmx Testing is instructions for the agent only. Our summary lists: Python 3.

Does Djhtmx Testing 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 Testing 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 Testing use?

Djhtmx Testing 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 Testing use?

About 856 tokens (SKILL.md is roughly 3.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 4k tokens, read only when the agent opens those files.

What are the alternatives to Djhtmx Testing?

Skills that share tags, products or a category with Djhtmx Testing: Make Changes (remix-run/remix, 33k stars), Orch Change Feature (affaan-m/ECC, 275k stars), Change Management (sickn33/agentic-awesome-skills, 47k stars) and Implement Change (pnpm/pnpm, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Djhtmx Testing?

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.