Agent skill

Stimulus

by smnandre in smnandre/symfony-ux-skills

Stimulus JS framework for Symfony UX -- client-side behavior via HTML data attributes, zero server round-trips.

MITAuto-check passedFrontend & Design

Install Stimulus

skills CLI
$ npx skills add smnandre/symfony-ux-skills --skill stimulus -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install smnandre/symfony-ux-skills stimulus --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/smnandre/symfony-ux-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/stimulus .claude/skills/stimulus && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stimulus
GitHub stars
180
Token cost
~2.1k tokens
SKILL.md length
414 words
Files
4 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Stimulus JS framework for Symfony UX -- client-side behavior via HTML data attributes, zero server round-trips.

  • Creating controllers for DOM manipulation
  • SKILL.md covers Quick Reference, Controller Skeleton, HTML Wiring Examples and Symfony / Twig Integration, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Handling click/input/submit events

What it does

Stimulus is an agent skill from smnandre/symfony-ux-skills. Stimulus JS framework for Symfony UX -- client-side behavior via HTML data attributes, zero server round-trips. Use when creating controllers for DOM manipulation, handling click/input/submit events, managing targets and values, wiring outlets between controllers, wrapping third-party JS libraries, or building toggles, dropdowns, modals, tabs, clipboard interactions. Code triggers: data-controller, data-action, data-target, data--value, data--class, data--outlet, stimulusFetch lazy, connect(), disconnect()…

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/api.md`, `references/gotchas.md` and `references/patterns.md`).

It sits in Frontend & Design. It works with Symfony and Google Gemini. The repository describes itself as: Symfony UX skills for Claude, Gemini, Codex, ... Live Component, Twig Component, Turbo, Stimulus. The licence is MIT.

When your agent uses it

  • Creating controllers for DOM manipulation
  • Handling click/input/submit events
  • Managing targets and values
  • Wiring outlets between controllers

Example prompts

  • “how do I add a click handler”
  • “how to toggle a class”
  • “how to build a dropdown/modal/tabs”
  • “/stimulus”

What it can do on your machine

Read from SKILL.md and the folder at commit 1e99301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are html, javascript and twig).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Stimulus loads about 2.1k tokens when it runs, and up to ~9.9k if it reads all its reference files. Until then it costs about 249 tokens; SKILL.md has 414 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~249
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from smnandre/symfony-ux-skills at commit 1e99301, republished under its MIT licence (© smnandre). 414 words, ~2,065 tokens.

Download SKILL.mdSave it as .claude/skills/stimulus/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
stimulus
description
Stimulus JS framework for Symfony UX -- client-side behavior via HTML data attributes, zero server round-trips. Use when creating controllers for DOM manipulation, handling click/input/submit events, managing targets and values, wiring outlets between controllers, wrapping third-party JS libraries, or building toggles, dropdowns, modals, tabs, clipboard interactions. Code triggers: data-controller, data-action, data-target, data-*-value, data-*-class, data-*-outlet, stimulusFetch lazy, connect(), disconnect(), static targets, static values. Also trigger when the user asks "how do I add a click handler", "how to toggle a class", "how to build a dropdown/modal/tabs", "how to wrap a JS library in Symfony", "add keyboard shortcuts", "lazy-load a controller", "listen to global events", "communicate between controllers". Do NOT trigger for partial page updates without JS (use turbo), server-rendered reactivity (use live-component), or reusable Twig templates (use twig-component).
license
MIT
metadata.author
Simon Andre
metadata.email
smn.andre@gmail.com
metadata.url
https://smnandre.dev
metadata.version
1.2.0

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
// assets/controllers/example_controller.js
import { Controller } from '@hotwired/stimulus';

export default class extends Controller {
    static targets = ['input', 'output'];
    static values = { url: String, delay: { type: Number, default: 300 } };
    static classes = ['loading'];
    static outlets = ['other'];

    connect() {
        // Called when controller connects to DOM
    }

    disconnect() {
        // Called when controller disconnects -- clean up here
    }

    submit(event) {
        // Action method
    }
}

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
<div data-controller="hello">
    <input data-hello-target="name" type="text">
    <button data-action="click->hello#greet">Greet</button>
    <span data-hello-target="output"></span>
</div>
Values from Server (Twig)

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

html
<div data-controller="map"
     data-map-latitude-value="{{ place.lat }}"
     data-map-longitude-value="{{ place.lng }}"
     data-map-zoom-value="12">
</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
{# Explicit event #}
<button data-action="click->hello#greet">Greet</button>

{# Default event (click for button) #}
<button data-action="hello#greet">Greet</button>

{# Multiple actions on same element #}
<input type="text"
       data-action="focus->field#highlight blur->field#normalize input->field#validate">

{# Prevent default #}
<form data-action="submit->form#validate:prevent">

{# Keyboard shortcuts #}
<div data-action="keydown.esc@window->modal#close">
<input data-action="keydown.enter->modal#submit keydown.ctrl+s->modal#save">

{# Global events (window/document) #}
<div data-action="resize@window->sidebar#adjust click@document->sidebar#closeOutside">
CSS Classes

Externalize CSS class names so controllers stay generic:

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

An element can have multiple controllers:

html
<div data-controller="dropdown tooltip"
     data-action="mouseenter->tooltip#show mouseleave->tooltip#hide">
    <button data-action="click->dropdown#toggle">Menu</button>
    <ul data-dropdown-target="menu" hidden>...</ul>
</div>
Outlets (Cross-Controller Communication)

Reference other controller instances by CSS selector:

html
<div data-controller="player"
     data-player-playlist-outlet="#playlist">
    <button data-action="click->player#playNext">Next</button>
</div>

<ul id="playlist" data-controller="playlist">
    <li data-playlist-target="track">Song 1</li>
    <li data-playlist-target="track">Song 2</li>
</ul>
javascript
// In player controller
static outlets = ['playlist'];

playNext() {
    const tracks = this.playlistOutlet.trackTargets;
    // ...
}
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
/* stimulusFetch: 'lazy' */
import { Controller } from '@hotwired/stimulus';
import Chart from 'chart.js';

export default class extends Controller {
    connect() {
        // Chart.js is only loaded when this element enters the viewport
    }
}

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
{# Raw attributes (preferred) #}
<div data-controller="search"
     data-search-url-value="{{ path('api_search') }}">

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

twig
{# Twig helper #}
<div {{ stimulus_controller('search', { url: path('api_search') }) }}>

{# Chaining multiple controllers #}
<div {{ stimulus_controller('a')|stimulus_controller('b') }}>

{# Target and action helpers #}
<input {{ stimulus_target('search', 'query') }}>
<button {{ stimulus_action('search', 'submit') }}>
Show full SKILL.md (184 more words)Show less

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

See Also

  • UX Map dispatches Stimulus-compatible events (ux:map:connect, ux:map:marker:after-create, etc.) on the map container element. Use a custom Stimulus controller to extend map behavior.
  • UX Icons are pure SVG and need no Stimulus integration, but you can use Stimulus to dynamically swap icon names via value changes.

© smnandre, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/stimulus of smnandre/symfony-ux-skills.

  • SKILL.md
  • references/api.md
  • references/gotchas.md
  • references/patterns.md

Open the folder on GitHubat commit 1e99301

Compare with similar skills

Stimulus next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stimulus compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stimulus this skillsmnandre/symfony-ux-skills180—~2.1kAutomated safety check: PassMIT
Antigravity ManagerDraculabo/AntigravityManager2.4k—~793Automated safety check: PassCustom licence
Ask Sonnerleepokai/Codync1774 repos~1.8kAutomated safety check: WarnMIT
Jtackanner/jta133—~2.4kAutomated safety check: NotesMIT
SEO Landingaleksandr-alhoff/seo-landing165—~3.4kAutomated safety check: PassMIT
Creating Oneshot Landing Pagesnroadley/Creating-Oneshot-Hero-Landing-Pages134—~3.5kAutomated safety check: PassMIT

Similar skills

  • Antigravity Manager

    Draculabo/AntigravityManager

    Comprehensive guide to Antigravity Manager architecture, workflows, and development.

    2.4k GitHub stars~793 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Ask Sonner

    leepokai/Codync

    Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and persisting toasts, styling, theming and…

    177 GitHub starsUsed in 4 repos~1.8k tokens
    Frontend & DesignAuto-check: warnings
  • Jta

    ckanner/jta

    Translate JSON i18n files to multiple languages with AI-powered quality optimization.

    133 GitHub stars~2.4k tokensUpdated 11 mo ago
    Frontend & DesignAuto-check: notes
  • SEO Landing

    aleksandr-alhoff/seo-landing

    Generates fast, SEO-optimized static HTML landing pages targeting 100/100 PageSpeed (LCP < 2.5s, INP < 100ms, CLS < 0.1), full schema.org JSON-LD, AVIF images, critical CSS, zero external…

    165 GitHub stars~3.4k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Creating Oneshot Landing Pages

    nroadley/Creating-Oneshot-Hero-Landing-Pages

    Designs and builds video-driven parallax hero landing pages with smooth video scrubbing, progress-locked typography, and clean navigation.

    134 GitHub stars~3.5k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Collaborating With Gemini

    bkywksj/knowledge-base

    当用户明确点名要用 Google Gemini CLI 协同时使用此 Skill,把指定任务委托给 Gemini 执行并整合结果。

    330 GitHub stars~1.5k tokensUpdated 5 days ago
    Frontend & DesignAuto-check passed

More from smnandre/symfony-ux-skills

  • Live Component

    smnandre/symfony-ux-skills

    Symfony UX LiveComponent for reactive server-rendered UI -- components that re-render via AJAX on user interaction, zero JavaScript required.

    180 GitHub stars~3.3k tokensUpdated 3 mo ago
    Auto-check passed
  • Turbo

    smnandre/symfony-ux-skills

    Hotwire Turbo for Symfony UX -- SPA-like speed with zero JavaScript.

    180 GitHub stars~2.9k tokensUpdated 3 mo ago
    Auto-check passed
  • Twig Component

    smnandre/symfony-ux-skills

    Symfony UX TwigComponent for reusable UI building blocks -- server-rendered components with PHP classes and Twig templates.

    180 GitHub stars~2.5k tokensUpdated 3 mo ago
    Auto-check passed
  • UX Icons

    smnandre/symfony-ux-skills

    Symfony UX Icons for rendering SVG icons in Twig templates. An agent skill from smnandre/symfony-ux-skills.

    180 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • UX Map

    smnandre/symfony-ux-skills

    Symfony UX Map for interactive maps with Leaflet or Google Maps in Symfony.

    180 GitHub stars~3k tokensUpdated 3 mo ago
    Auto-check: notes
  • Symfony UX

    smnandre/symfony-ux-skills

    Symfony UX frontend stack -- decision tree and orchestrator for choosing between Stimulus, Turbo, TwigComponent, LiveComponent, UX Icons, and UX Map.

    180 GitHub stars~3.4k tokensUpdated 3 mo ago
    Auto-check passed

Questions about Stimulus

What does Stimulus do?

Stimulus JS framework for Symfony UX -- client-side behavior via HTML data attributes, zero server round-trips. Stimulus is an agent skill from smnandre/symfony-ux-skills. Stimulus JS framework for Symfony UX -- client-side behavior via HTML data attributes, zero server round-trips.

When should I use Stimulus?

Stimulus fits situations like: creating controllers for DOM manipulation; handling click/input/submit events; managing targets and values; wiring outlets between controllers.

How do I install Stimulus in Claude Code?

Run `npx skills add smnandre/symfony-ux-skills --skill stimulus -a claude-code`. Or copy the skill folder (skills/stimulus in smnandre/symfony-ux-skills) into .claude/skills/stimulus in your project. Claude Code loads it when a task matches its description.

How do I install Stimulus in Codex?

Run `npx skills add smnandre/symfony-ux-skills --skill stimulus -a codex`. Or copy the skill folder (skills/stimulus in smnandre/symfony-ux-skills) into .agents/skills/stimulus in your project. Codex loads it when a task matches its description.

Can I use Stimulus in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add smnandre/symfony-ux-skills --skill stimulus -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stimulus, .gemini/skills/stimulus, .github/skills/stimulus and .opencode/skills/stimulus in your project.

What does Stimulus need to run?

SKILL.md names no scripts, command-line tools or credentials: Stimulus is instructions for the agent only.

Does Stimulus access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Stimulus safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Stimulus use?

Stimulus is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Stimulus use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.8k tokens, read only when the agent opens those files.

What are the alternatives to Stimulus?

Skills that share tags, products or a category with Stimulus: Antigravity Manager (Draculabo/AntigravityManager, 2.4k stars), Ask Sonner (leepokai/Codync, 177 stars), Jta (ckanner/jta, 133 stars) and SEO Landing (aleksandr-alhoff/seo-landing, 165 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stimulus?

smnandre (a GitHub user) maintains it in smnandre/symfony-ux-skills, which has 180 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on June 14, 2026.

Source: smnandre/symfony-ux-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.