stimulus — for Claude Code stimulus, symfony-web-template, community, for Claude Code, ide skills, ## Controller Skeleton, File naming convention, maps to, Subdirectories use, as separator

v1.0

Über diesen Skill

Geeigneter Einsatz: Ideal for AI agents that need data-controller="name" attach controller to element. Lokalisierte Zusammenfassung: # Stimulus Modest JavaScript framework that connects JS objects to HTML via data attributes. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Funktionen

data-controller="name" attach controller to element
data-name-target="item" mark element as a target
data-action="event- name#method" bind event to controller method
data-name-key-value="..." pass typed data to controller
data-name-key-class="..." configure CSS class names

# Core Topics

ineersa ineersa
[2]
[0]
Updated: 4/7/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 10/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
10/11
Quality Score
75
Canonical Locale
en
Detected Body Locale
en

Geeigneter Einsatz: Ideal for AI agents that need data-controller="name" attach controller to element. Lokalisierte Zusammenfassung: # Stimulus Modest JavaScript framework that connects JS objects to HTML via data attributes. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Warum diese Fähigkeit verwenden

Empfehlung: stimulus helps agents data-controller="name" attach controller to element. Stimulus Modest JavaScript framework that connects JS objects to HTML via data attributes. This AI agent skill supports Claude

Am besten geeignet für

Geeigneter Einsatz: Ideal for AI agents that need data-controller="name" attach controller to element.

Handlungsfähige Anwendungsfälle for stimulus

Anwendungsfall: Applying data-controller="name" attach controller to element
Anwendungsfall: Applying data-name-target="item" mark element as a target
Anwendungsfall: Applying data-action="event- name#method" bind event to controller method

! Sicherheit & Einschränkungen

  • Einschraenkung: Requires repository-specific context from the skill documentation
  • Einschraenkung: Works best when the underlying tools and dependencies are already configured

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is stimulus?

Geeigneter Einsatz: Ideal for AI agents that need data-controller="name" attach controller to element. Lokalisierte Zusammenfassung: # Stimulus Modest JavaScript framework that connects JS objects to HTML via data attributes. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

How do I install stimulus?

Run the command: npx killer-skills add ineersa/symfony-web-template/stimulus. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for stimulus?

Key use cases include: Anwendungsfall: Applying data-controller="name" attach controller to element, Anwendungsfall: Applying data-name-target="item" mark element as a target, Anwendungsfall: Applying data-action="event- name#method" bind event to controller method.

Which IDEs are compatible with stimulus?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for stimulus?

Einschraenkung: Requires repository-specific context from the skill documentation. Einschraenkung: Works best when the underlying tools and dependencies are already configured.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add ineersa/symfony-web-template/stimulus. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use stimulus immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

stimulus

# Stimulus Modest JavaScript framework that connects JS objects to HTML via data attributes. This AI agent skill supports Claude Code, Cursor, and Windsurf

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Stimulus

Modest JavaScript framework that connects JS objects to HTML via data attributes. Stimulus does not render HTML -- it augments server-rendered HTML with behavior.

The mental model: HTML is the source of truth, JavaScript controllers attach to elements, and data attributes are the wiring. No build step required with AssetMapper.

Quick Reference

data-controller="name"              attach controller to element
data-name-target="item"             mark element as a target
data-action="event->name#method"    bind event to controller method
data-name-key-value="..."           pass typed data to controller
data-name-key-class="..."           configure CSS class names
data-name-other-outlet=".selector"  reference another controller instance

Controller Skeleton

javascript
1// assets/controllers/example_controller.js 2import { Controller } from '@hotwired/stimulus'; 3 4export default class extends Controller { 5 static targets = ['input', 'output']; 6 static values = { url: String, delay: { type: Number, default: 300 } }; 7 static classes = ['loading']; 8 static outlets = ['other']; 9 10 connect() { 11 // Called when controller connects to DOM 12 } 13 14 disconnect() { 15 // Called when controller disconnects -- clean up here 16 } 17 18 submit(event) { 19 // Action method 20 } 21}

File naming convention: hello_controller.js maps to data-controller="hello". Subdirectories use -- as separator: components/modal_controller.js maps to data-controller="components--modal".

HTML Wiring Examples

Basic Controller

html
1<div data-controller="hello"> 2 <input data-hello-target="name" type="text"> 3 <button data-action="click->hello#greet">Greet</button> 4 <span data-hello-target="output"></span> 5</div>

Values from Server (Twig)

Pass server data to controllers via value attributes. Values are typed and automatically parsed.

html
1<div data-controller="map" 2 data-map-latitude-value="{{ place.lat }}" 3 data-map-longitude-value="{{ place.lng }}" 4 data-map-zoom-value="12"> 5</div>

Available types: String, Number, Boolean, Array, Object. Values trigger {name}ValueChanged() callbacks when mutated.

Actions

The format is event->controller#method. Default events exist per element type (click for buttons, input for inputs, submit for forms) so the event can be omitted.

html
1{# Explicit event #} 2<button data-action="click->hello#greet">Greet</button> 3 4{# Default event (click for button) #} 5<button data-action="hello#greet">Greet</button> 6 7{# Multiple actions on same element #} 8<input type="text" 9 data-action="focus->field#highlight blur->field#normalize input->field#validate"> 10 11{# Prevent default #} 12<form data-action="submit->form#validate:prevent"> 13 14{# Keyboard shortcuts #} 15<div data-action="keydown.esc@window->modal#close"> 16<input data-action="keydown.enter->modal#submit keydown.ctrl+s->modal#save"> 17 18{# Global events (window/document) #} 19<div data-action="resize@window->sidebar#adjust click@document->sidebar#closeOutside">

CSS Classes

Externalize CSS class names so controllers stay generic:

html
1<button data-controller="button" 2 data-button-loading-class="opacity-50 cursor-wait" 3 data-button-active-class="bg-blue-600" 4 data-action="click->button#submit"> 5 Submit 6</button>
javascript
1// In controller 2this.element.classList.add(...this.loadingClasses);

Multiple Controllers

An element can have multiple controllers:

html
1<div data-controller="dropdown tooltip" 2 data-action="mouseenter->tooltip#show mouseleave->tooltip#hide"> 3 <button data-action="click->dropdown#toggle">Menu</button> 4 <ul data-dropdown-target="menu" hidden>...</ul> 5</div>

Outlets (Cross-Controller Communication)

Reference other controller instances by CSS selector:

html
1<div data-controller="player" 2 data-player-playlist-outlet="#playlist"> 3 <button data-action="click->player#playNext">Next</button> 4</div> 5 6<ul id="playlist" data-controller="playlist"> 7 <li data-playlist-target="track">Song 1</li> 8 <li data-playlist-target="track">Song 2</li> 9</ul>
javascript
1// In player controller 2static outlets = ['playlist']; 3 4playNext() { 5 const tracks = this.playlistOutlet.trackTargets; 6 // ... 7}

Lazy Loading (Heavy Dependencies)

Load controller JS only when the element appears in the viewport. Use for controllers with heavy dependencies (chart libs, editors, maps).

javascript
1/* stimulusFetch: 'lazy' */ 2import { Controller } from '@hotwired/stimulus'; 3import Chart from 'chart.js'; 4 5export default class extends Controller { 6 connect() { 7 // Chart.js is only loaded when this element enters the viewport 8 } 9}

The /* stimulusFetch: 'lazy' */ comment must be the very first line of the file.

Symfony / Twig Integration

Raw data attributes are the recommended approach -- they work everywhere, are easy to read, and need no special helpers.

twig
1{# Raw attributes (preferred) #} 2<div data-controller="search" 3 data-search-url-value="{{ path('api_search') }}">

Twig helpers exist for complex cases or when generating attributes programmatically:

twig
1{# Twig helper #} 2<div {{ stimulus_controller('search', { url: path('api_search') }) }}> 3 4{# Chaining multiple controllers #} 5<div {{ stimulus_controller('a')|stimulus_controller('b') }}> 6 7{# Target and action helpers #} 8<input {{ stimulus_target('search', 'query') }}> 9<button {{ stimulus_action('search', 'submit') }}>

Key Principles

HTML drives, JS responds. Controllers don't create markup -- they attach behavior to existing HTML. If you find yourself generating DOM in a controller, consider whether a TwigComponent or LiveComponent would be better.

One controller, one concern. A dropdown controller handles dropdowns. A tooltip controller handles tooltips. Compose multiple controllers on the same element rather than building mega-controllers.

Clean up in disconnect(). If connect() adds event listeners, timers, or third-party library instances, disconnect() must remove them. Turbo navigation will disconnect and reconnect controllers as pages change.

Values over data attributes. Use Stimulus values (typed, with change callbacks) rather than raw data-* attributes for data that the controller needs to read or watch.

References

Verwandte Fähigkeiten

Looking for an alternative to stimulus or another community skill for your workflow? Explore these related open-source skills.

Alle anzeigen

openclaw-release-maintainer

Logo of openclaw
openclaw

Lokalisierte Zusammenfassung: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

333.8k
0
Künstliche Intelligenz

widget-generator

Logo of f
f

Lokalisierte Zusammenfassung: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code

149.6k
0
Künstliche Intelligenz

flags

Logo of vercel
vercel

Lokalisierte Zusammenfassung: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Lokalisierte Zusammenfassung: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
Entwickler