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

v1.0

이 스킬 정보

적합한 상황: Ideal for AI agents that need 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 Code, Cursor, and Windsurf workflows.

기능

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

# 핵심 주제

ineersa ineersa
[4]
[0]
업데이트: 4/1/2026

Skill Overview

Start with fit, limitations, and setup before diving into the repository.

적합한 상황: Ideal for AI agents that need 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 Code, Cursor, and Windsurf workflows.

이 스킬을 사용하는 이유

추천 설명: 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 Code

최적의 용도

적합한 상황: Ideal for AI agents that need data-controller="name" attach controller to element.

실행 가능한 사용 사례 for stimulus

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

! 보안 및 제한 사항

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

About The Source

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Labs 데모

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 및 설치 단계

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

? 자주 묻는 질문

stimulus은 무엇인가요?

적합한 상황: Ideal for AI agents that need 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 Code, Cursor, and Windsurf workflows.

stimulus은 어떻게 설치하나요?

다음 명령을 실행하세요: npx killer-skills add ineersa/re-search/stimulus. Cursor, Windsurf, VS Code, Claude Code와 19개 이상의 다른 IDE에서 동작합니다.

stimulus은 어디에 쓰이나요?

주요 활용 사례는 다음과 같습니다: 사용 사례: Applying data-controller="name" attach controller to element, 사용 사례: Applying data-name-target="item" mark element as a target, 사용 사례: Applying data-action="event- name#method" bind event to controller method.

stimulus 와 호환되는 IDE는 무엇인가요?

이 스킬은 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 와 호환됩니다. 통합 설치에는 Killer-Skills CLI를 사용하세요.

stimulus에 제한 사항이 있나요?

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

이 스킬 설치 방법

  1. 1. 터미널 열기

    프로젝트 디렉터리에서 터미널 또는 명령줄을 여세요.

  2. 2. 설치 명령 실행

    npx killer-skills add ineersa/re-search/stimulus 를 실행하세요. CLI가 IDE 또는 에이전트를 자동으로 감지하고 스킬을 설정합니다.

  3. 3. 스킬 사용 시작

    스킬이 이제 활성화되었습니다. 현재 프로젝트에서 stimulus을 바로 사용할 수 있습니다.

! Source Notes

This page is still useful for installation and source reference. Before using it, compare the fit, limitations, and upstream repository notes above.

Upstream Repository Material

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

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 comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.
Upstream Source

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

관련 스킬

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

모두 보기

openclaw-release-maintainer

Logo of openclaw
openclaw

현지화된 요약: 🦞 # 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
인공지능

widget-generator

Logo of f
f

현지화된 요약: 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, Cursor, and Windsurf

149.6k
0
인공지능

flags

Logo of vercel
vercel

현지화된 요약: 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
브라우저

pr-review

Logo of pytorch
pytorch

현지화된 요약: 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
개발자