
Hwc Stimulus Fundamentals
This is your Stimulus controller workhorse when you're focused on the framework itself rather than a specific domain like forms or navigation. It walks you through lifecycle hooks, value callbacks, targets, outlets, action parameters, and keyboard event filters with enough guardrails to keep controllers composable and idempotent across connect/disconnect cycles. The references cover practical patterns like MutationObserver sorting, Web Share API integration, and target callback orchestration. It's opinionated about declarative action parameters over manual dataset parsing and knows when to escalate to neighbor skills for form validation, Turbo navigation, or real-time streaming concerns. If you're building a non-trivial Stimulus controller and need the API details at hand, this is the one to reach for.
- skills.sh installs
- 254
- GitHub stars
- 153
- last updated
- Aug 21, 2026
Install
$ npx -y skills add thehotwireclub/hotwire_club-skills --skill hwc-stimulus-fundamentals --agent claude-codeInstalls into .claude/skills of the current project.
Files
Stimulus Fundamentals
Implement robust Stimulus controllers with clear lifecycle and state boundaries.
Core Workflow
- Define controller contract first: targets, values, outlets, actions, and expected lifecycle.
- Keep state transitions in value callbacks when reactive updates are required.
- Guard callbacks that can run before
connect()completes. - Use
connect()/disconnect()for setup and teardown symmetry. - Isolate DOM event handling from business rules; keep controllers composable.
Guardrails
- Prefer declarative action parameters over manual dataset parsing.
- Use outlets for controller-to-controller communication instead of private internals.
- Keep target callbacks idempotent; account for repeated connect/disconnect cycles.
- Use MutationObserver only when DOM-driven reactivity is required.
- Feature-detect browser APIs before exposing UI affordances.
Load References Selectively
Open only the file needed for the current request.
Sponsors
Details
- Repository
- github.com/thehotwireclub/hotwire_club-skills
- Categories
- Frontend Development, Backend & APIs, Code Review & Quality, Design & UI/UX
- First seen
- Jun 3, 2026