alpinejs-django
Skill by hashgraph-online
Guides AI assistants in adding, changing, or debugging Alpine.js behavior in Django-rendered templates, including Alpine running alongside HTMX partial updates.
Install alpinejs-django
Built from the published package, never by AI.
git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins /tmp/awesome-codex-plugins && mkdir -p ~/.claude/skills && cp -r /tmp/awesome-codex-plugins/plugins/LVTD-LLC/skills/skills/alpinejs-django ~/.claude/skills/alpinejs-djangoRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins /tmp/awesome-codex-plugins && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/awesome-codex-plugins/plugins/LVTD-LLC/skills/skills/alpinejs-django ~/.gemini/antigravity-cli/skills/alpinejs-djangoAntigravity 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
The alpinejs-django skill gives an AI assistant guidance for local browser state in Django-rendered templates, such as dropdowns, modals, tabs, disclosures, inline filters, and loading states. It sets out which layer owns what. Django handles persistence, authorization, validation, redirects, and rendered HTML. HTMX handles server round trips and DOM swaps. Alpine handles ephemeral state already present in the browser.
The skill also covers setup checks, such as confirming how the project loads Alpine and avoiding a second Alpine.start() call. It shows template patterns, passing structured Django data with json_script, and listening to HTMX lifecycle events from Alpine. It includes accessibility notes, CSP guidance, and validation steps. It is written for developers who work on Django projects that use Alpine.js, with or without HTMX partial updates.
Written from the project's SKILL.md and checked against it.
What it can do
- Setup checksIdentifies how the project loads Alpine and avoids double-starting it.
- Template patternsShows x-data usage and when to choose x-show, x-if, x-model, or x-cloak.
- Django data passingRecommends HTML attributes and json_script instead of complex Django interpolation in JavaScript.
- Alpine and HTMX eventsCovers HX-Trigger response headers and listening for htmx:after-swap from Alpine.
- AccessibilityCovers ARIA state binding, escape key handling, and click-outside behavior for overlays.
- Security and CSPAdvises on keeping secrets out of x-data, using CSRF headers, and choosing the CSP build.
- ValidationLists test and lint steps for template-only changes and HTMX interaction paths.
What you need
- Codex, Claude Code, or another Agent Skills-compatible client
- A Django project that uses Alpine.js templates
- npm, for the lint step when JavaScript modules change
Try asking
- Add a dropdown menu with aria-expanded to this Django template using Alpine.js
- Fix Alpine.js behavior that breaks after an HTMX partial swap in this page
- Use json_script to pass a list of rows into an Alpine x-for loop
Good to know
- The default Alpine CDN build is not the CSP build, so strict CSP needs a deliberate switch.
- Focus trapping should go in a plain JS module or Alpine plugin, not in attributes.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/LVTD-LLC/skills/skills/alpinejs-django/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to alpinejs-django
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
alpinejs-django: common questions
Does this skill work with Alpine.js and HTMX together?
Yes. The skill covers coexistence, including keeping persistent Alpine state outside HTMX targets that get replaced and listening for HTMX events from Alpine.
Can Alpine.js run under a strict Content Security Policy?
The skill says strict CSP without unsafe-eval requires switching to Alpine's CSP build and retesting expressions. The default cdn.min.js build is not the CSP build.
Where should durable data be stored when using this skill?
Django owns persistence, authorization, and validation. Alpine should only hold ephemeral browser state, and the skill advises against putting secrets in x-data or hidden inputs.
How do I install alpinejs-django?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is alpinejs-django free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is alpinejs-django safe to use?
It scores 71 of 100. Grades: maintenance A, licence A, quality A. 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 alpinejs-django?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
