npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

htmx-skill

v1.0.1

Published

Modular HTMX expert skill v2 for Claude, Cursor, and Codex. Enforces HTML-over-the-wire, fragment rendering, server-driven UI, and production patterns.

Readme

HTMX Expert Skill v2

Stop building CRUD apps like it's 2018.

A modular, AI-optimized, production-grade HTMX skill for Claude, Cursor and Codex.

This skill enforces:

  • HTML-over-the-wire architecture
  • Server-driven UI
  • Fragment-based rendering
  • Correct swap strategies
  • Progressive enhancement
  • Security-first mindset
  • Anti-SPA discipline

If you are serious about HTMX, this is not optional.


Why This Exists

Most AI-generated HTMX code:

  • Returns JSON ❌
  • Rebuilds DOM manually ❌
  • Mimics React patterns ❌
  • Ignores swap strategies ❌
  • Breaks browser history ❌

This skill fixes that.

It forces AI to think like a server-driven architect.


What Makes This Different?

Unlike generic HTMX snippets, this skill:

✔ Enforces HTML-over-the-wire
✔ Prevents SPA anti-patterns
✔ Designs fragment architecture
✔ Uses OOB swaps correctly
✔ Handles validation properly
✔ Maintains browser history
✔ Mentions CSRF and security
✔ Includes production performance advice

This is opinionated on purpose.


Who Is This For?

  • SaaS founders
  • Backend-heavy teams
  • Internal tool builders
  • Admin panel developers
  • Teams migrating away from SPA
  • Engineers tired of unnecessary frontend complexity

Who Should NOT Use This?

  • Canvas-heavy apps
  • WebGL apps
  • Offline-first SPA
  • Complex client-side state apps

This skill is server-first.


Included

  • Modular skill layout: core rules (skill/skills.md), activation (skill/activation.md), reference docs (skill/reference/)
  • Reference: attributes, triggers, swap, events, server-patterns, validation, security, performance, headers, anti-patterns
  • Enterprise Strict Version (ENTERPRISE.SKILL.md)
  • Express + HTMX Production Demo
  • Real-world patterns
  • Anti-pattern enforcement
  • Test suite
  • Semantic versioning
  • Release workflow

Installation

For Cursor

  1. Copy the skill files to your Cursor skills directory:

    cp -r . ~/.cursor/skills/htmx-expert/
  2. Or install via npm (when published):

    npm install -g htmx-skill

For Codex

  1. Copy the skill files to your Codex skills directory:
    cp -r . $CODEX_HOME/skills/htmx-expert/

Usage

The skill automatically activates when you:

  • Use or ask about hx- attributes and HTMX patterns
  • Build server-driven UIs and CRUD with minimal JS
  • Work with HTML fragments, HX-Request, or partial templates
  • Migrate from React/Vue to HTMX or implement progressive enhancement

See skill/activation.md for full activation rules.


Example: Correct HTMX CRUD

Instead of:

fetch("/todos")
  .then(res => res.json())
  .then(data => buildDOM(data))

Do this:

<div id="todo-list" 
     hx-get="/todos"
     hx-trigger="load">
  <!-- Server returns HTML fragments -->
</div>
// Server returns HTML, not JSON
app.get('/todos', (req, res) => {
  res.render('_todo_list', { todos });
});

Quick Start

Run the Express Demo

cd examples/express-demo
npm install
npm start

Visit http://localhost:3000 to see HTMX in action.

Explore Patterns

Check out the pattern examples in examples/ (e.g. examples/express-demo/). For detailed attribute, swap, and server guidance see skill/reference/.


Project Structure

htmx-skill/
├── SKILL.md                 # Entry point → skill/skills.md
├── ENTERPRISE.SKILL.md      # Enterprise patterns
├── skill/
│   ├── skills.md            # Core HTMX expert (rules, activation context)
│   ├── activation.md        # When to activate this skill
│   └── reference/           # Detailed reference docs
│       ├── attributes.md
│       ├── triggers.md
│       ├── swap.md
│       ├── events.md
│       ├── server-patterns.md
│       ├── validation.md
│       ├── security.md
│       ├── performance.md
│       ├── headers.md
│       └── anti-patterns.md
├── examples/                # Express demo, pattern examples
├── tests/                   # Validation tests
└── .github/workflows/       # CI/CD

Testing

Run the test suite:

npm test

This validates:

  • Skill file format compliance
  • Example file structure
  • HTMX pattern correctness

Contributing

Contributions welcome! Please ensure:

  • Skills follow the format guidelines
  • Examples demonstrate correct HTMX patterns
  • Tests pass before submitting PRs

License

MIT License - see LICENSE file


Related Resources