37signals-stimulus

Build focused Stimulus controllers for progressive enhancement in Rails apps.

1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/joshyorko/agent-skills --skill 37signals-stimulus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 37signals-stimulus
Source: https://github.com/joshyorko/agent-skills/tree/main/plugins/rails-37signals-patterns/skills/37signals-stimulus
Command: npx skills add https://github.com/joshyorko/agent-skills --skill 37signals-stimulus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds focused, single-purpose Stimulus controllers to add UI behavior to server-rendered HTML without bloating business logic.

Core Features & Use Cases

  • Small, reusable controllers (mostly under 50 lines) designed for progressive enhancement.
  • One controller per file with a clear, single-responsibility focus; use data-controller, targets, and values for flexible configuration.
  • Composition: combine controllers on a page for rich interactions (dropdowns, modals, tooltips) without coupling code.

Quick Start

Create a small Stimulus controller file under app/javascript/controllers, register it as data-controller on your element, and progressively enhance the UI.

Frequently Asked Questions about 37signals-stimulus

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

FAQPage Schema
How do I add UI interactions to server-rendered HTML without a large frontend framework?

Stimulus controllers provide progressive enhancement for server-rendered HTML by using small, single-responsibility files configured with data attributes. This adds lightweight UI behavior without requiring large frontend frameworks or bloating business logic.

What is the best way to structure Stimulus controllers for Rails applications?

The best way to structure Stimulus controllers is maintaining one single-responsibility file per controller, keeping each mostly under 50 lines. Use data-controller, data-targets, and data-values for flexible configuration without coupling business logic.

Can I use Stimulus with Rails, Turbo, and Importmap?

Yes, Stimulus works with Rails, Turbo, and Importmap. It is specifically designed to enable UI interactions and form enhancements across server-rendered HTML apps using this stack without needing heavy JavaScript frameworks.

How do I combine multiple Stimulus controllers for complex UI behaviors?

You combine multiple Stimulus controllers on a single page to create rich interactions like dropdowns, modals, and tooltips. This composition layers individual single-responsibility controllers without coupling their underlying code.

Why should I clean up resources in a Stimulus controller disconnect method?

Cleaning up resources in a Stimulus controller disconnect method prevents memory leaks and ensures progressive enhancement remains lightweight. Proper cleanup guarantees single-purpose controllers leave no lingering side effects when removed from the DOM.