stimulus-patterns

Standardize reusable Stimulus controller patterns for Rails and Hotwire apps.

1|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/LaunchPadLab/ai-bank --skill stimulus-patterns-launchpadlab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stimulus-patterns
Source: https://github.com/LaunchPadLab/ai-bank/tree/main/claude/skills/stimulus-patterns
Command: npx skills add https://github.com/LaunchPadLab/ai-bank --skill stimulus-patterns-launchpadlab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Stimulus controller development often becomes inconsistent and overcomplicated, making UI behavior harder to reuse, maintain, and keep aligned with Hotwire best practices.

Core Features & Use Cases

  • Reusable controller patterns for common UI interactions like toggles, modals, dropdowns, tooltips, clipboard copy, and confirmation flows.
  • Stimulus structure and conventions covering lifecycle callbacks, targets, values, classes, actions, naming, and composition patterns.
  • Performance and safety guidance including event delegation, debouncing, proper cleanup in disconnect(), and progressive enhancement boundaries for Rails + Hotwire.

Quick Start

Ask for Stimulus 3.2+ controller scaffolding and a reusable pattern for a specific interaction (for example, a modal with Escape-to-close and backdrop click) that follows the repository’s naming, targets, values, and cleanup conventions.

Frequently Asked Questions about stimulus-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build reusable Stimulus controllers for common UI patterns in Rails?

You scaffold reusable Stimulus controllers by applying standardized conventions for targets, values, classes, and lifecycle callbacks, ensuring consistent UI behavior like toggles, modals, and dropdowns across Rails and Hotwire applications.

What is the best way to manage Stimulus controller cleanup and performance in Hotwire?

Managing Stimulus controller performance and safety requires event delegation, debouncing, and proper cleanup within the disconnect lifecycle callback to prevent memory leaks and maintain progressive enhancement boundaries in Hotwire.

Can I compose multiple Stimulus controllers together for complex form enhancements?

You can compose multiple Stimulus controllers by following composition patterns that coordinate targets and actions across controllers, enabling complex progressive-enhancement behaviors like form validations and third-party integrations without bloating controller logic.

When do I need Stimulus-specific conventions for progressive enhancement behaviors?

You need Stimulus-specific conventions for progressive enhancement when implementing UI behaviors like modals, tooltips, clipboard copy, and confirmation flows that must remain maintainable, reusable, and lifecycle-safe within Rails and Hotwire applications.

Why does my Stimulus controller logic become inconsistent and hard to maintain?

Stimulus controller logic becomes inconsistent and hard to maintain when development lacks standardized patterns for naming, lifecycle callbacks, and composition, leading to bloated UI behavior that diverges from Hotwire best practices.

Does this Stimulus controller pattern require a specific Rails or Hotwire version?

The Stimulus controller patterns require Stimulus 3.2 or higher for scaffolding and convention support, integrating with Rails and Hotwire to deliver progressive-enhancement behaviors with proper lifecycle-safe cleanup and event delegation.