djhtmx-components
Skill by edelvalle
Guides an AI assistant through writing or changing djhtmx HtmxComponent subclasses. It covers component state, handler parameters, error reporting, and the registry checks to run afterwards.
Install djhtmx-components
Built from the published package, never by AI.
git clone --depth 1 https://github.com/edelvalle/djhtmx /tmp/djhtmx && mkdir -p ~/.claude/skills && cp -r /tmp/djhtmx/.agents/skills/djhtmx-components ~/.claude/skills/djhtmx-componentsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/edelvalle/djhtmx /tmp/djhtmx && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/djhtmx/.agents/skills/djhtmx-components ~/.gemini/antigravity-cli/skills/djhtmx-componentsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a guide for writing djhtmx components, which are HTMX components built as subclasses of HtmxComponent. The source says HtmxComponent is a pydantic BaseModel, so annotated class attributes are stored as state. Interactions hydrate that state from a Redis database, so the skill tells the assistant to keep state small. Properties that do not start with an underscore are exposed to the template as context.
The main file is an overview that links to reference files for authentication, model prefetching and laziness, query strings, events, subscriptions, SSE events, partial rendering, child components, lazy components, DOM interactions, and errors. It also lists the djhtmx modules to import from and the registry checks to run after adding, renaming or removing a component. It is aimed at developers building Django projects with djhtmx.
Written from the project's SKILL.md and checked against it.
What it can do
- Component declarationExplains how to declare a component by inheriting from HtmxComponent and setting a _template_name.
- State rulesDescribes what belongs in the component state and why it should stay small.
- HandlersCovers the handler parameters and the default render with SkipRender.
- AuthenticationShows how to use the user field and refuse to exist without a logged-in user.
- Model loadingCovers ModelConfig prefetching, select_related, cache and lazy options.
- Query string stateExplains using Query for state that belongs in the URL.
- Events between componentsDescribes Emit, _handle_event and Execute for components on one page.
- Subscriptions and SSECovers redrawing on model changes and events that cross processes and sessions.
- Partial rendering and childrenCovers Render with a template, oob swaps, BuildAndRender, parent_id and Destroy.
- Registry checksLists the make check-htmx and manage.py htmx check commands to run after changes.
What you need
- Django project using djhtmx
- Redis database for component state
Try asking
- Write a djhtmx component that shows a counter with increment and reset handlers
- Check my djhtmx component state and suggest what to remove to keep it small
- Add a djhtmx component that emits an event for another component on the page
Good to know
- Component state is stored in Redis, so state should be kept as small as workable
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/djhtmx-components/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to djhtmx-components
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
djhtmx-components: common questions
What is the djhtmx-components skill for?
It guides an assistant when writing or changing djhtmx HtmxComponent subclasses. It covers state, handlers, error reporting and the checks to run afterwards.
Where does djhtmx store component state?
The source says interactions hydrate the state from a Redis DB. It also says to keep the state as small as workable.
Which checks should be run after changing a component?
The source says to run make check-htmx, or the manage.py htmx check-missing, check-shadowing and check-unused-non-public commands, after adding, renaming or removing a component.
How do I install djhtmx-components?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is djhtmx-components free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is djhtmx-components safe to use?
It scores 72 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to djhtmx-components?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
