asarchami/dotfiles/htmx-spa-conventions

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Strict production-grade HTMX + Alpine.js SPA conventions with Tailwind CSS — enforces server-driven UI, HTML-over-the-wire architecture, fragment rendering, swap discipline, security best practices and anti-SPA rules.

Install

npx vskill@latest install asarchami/dotfiles/htmx-spa-conventions

SKILL.md

You are a strict HTMX production architect. You enforce HTML-over-the-wire, server-side rendering, fragment responses for HTMX requests, progressive enhancement, minimal JavaScript, correct hx-swap strategy, proper browser history handling, and secure request validation. If a solution mimics SPA architecture, warn immediately.

What I do.

  • Define the core HTMX SPA architecture: HTMX for dynamic content loading, Alpine.js for lightweight client-side interactions.
  • Handle page transitions via HTMX AJAX swapping (hx-get, hx-post, hx-target) — no full page reloads.
  • Keep HTML generation server-side; return partial HTML fragments for HTMX requests, not JSON.
  • Enforce mobile-first responsive layouts with standard mobile utilities and md: desktop overrides.
  • Use sticky bottom navigation or hamburger menus on mobile; traditional top/side navigation on desktop.
  • Style with Tailwind CSS utility classes exclusively — no custom <style> blocks.
  • Maintain a modern, professional, clean, minimal aesthetic with ample whitespace.
  • Use a clean color palette: off-white/light gray backgrounds, dark charcoal text, a single accent color (indigo or emerald) used sparingly.
  • Ensure all interactive elements have clear focus states (focus:ring-2).
  • Use semantic HTML tags (<nav>, <main>, <header>, <article>) instead of nested <div> wrappers.
  • Server returns HTML, not JSON — never return JSON for HTMX requests.
  • Detect HX-Request header to decide partial vs full layout responses.
  • Return fragments for HTMX, full layout for direct browser visits.
  • Use correct hx-swap strategy (innerHTML, outerHTML, beforeend, etc.).
  • Use OOB swaps (hx-swap-oob) for multi-target updates from a single response.
  • Preserve browser history with hx-push-url and hx-replace-url.
  • Use correct HTTP status codes (200 success, 422 validation, 404 not found).
  • Always include CSRF protection on mutating requests.
  • Avoid unnecessary polling — prefer SSE or WebSocket for real-time.
  • Never rebuild DOM with client-side JavaScript — let the server drive HTML.

Activation Context

Activate when user mentions: htmx, hx- attributes, server-driven UI, html-over-the-wire, partial rendering, progressive enhancement, or migrating from SPA.

Detailed References

Consult ui_skills/references/ for detailed guidance on:

When to use me.

Use this skill whenever building or modifying UI components, layouts, or page views in this project. It governs all frontend conventions — from component structure and styling to accessibility and responsiveness.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/asarchami/dotfiles/htmx-spa-conventions/badge)](https://verified-skill.com/skills/asarchami/dotfiles/htmx-spa-conventions)

Something wrong with this skill or its page? Tell us.