Agent skill

Stimulus Patterns

by dilolabs in dilolabs/nosia

Builds focused, single-purpose Stimulus controllers for progressive enhancement.

MITAuto-check passedAI & LLM Engineering

Install Stimulus Patterns

skills CLI
$ npx skills add dilolabs/nosia --skill stimulus-patterns -a claude-code

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

GitHub CLI
$ gh skill install dilolabs/nosia stimulus-patterns --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/dilolabs/nosia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.vibe/skills/stimulus-patterns .claude/skills/stimulus-patterns && 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-patterns
GitHub stars
213
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
330 words
Files
3 (incl. references)
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Builds focused, single-purpose Stimulus controllers for progressive enhancement.

  • Works in 4 steps: Event delegation: One listener on… → Debounce expensive ops: Use setTimeout… → Always clean up in disconnect(): Clear… → …
  • Adding JavaScript behavior
  • SKILL.md covers Your role, Core philosophy, Project knowledge and Controller structure, plus 7 more sections
  • Calls rails

What it does

Stimulus Patterns is an agent skill from dilolabs/nosia. Builds focused, single-purpose Stimulus controllers for progressive enhancement. Use when adding JavaScript behavior, UI interactions, form enhancements, or building reusable client-side components. WHEN NOT: For Turbo Stream/Frame patterns (see turbo-patterns skill). For server-side view logic (see rules/views.md).

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/controller-catalog.md` and `references/stimulus-examples.md`). Compatibility notes: Stimulus 3.2+, Turbo 8.0+, Importmap

It sits in AI & LLM Engineering, covering Backend development. It works with JavaScript. The repository describes itself as: Self-hosted AI RAG + MCP Platform. The licence is MIT.

When your agent uses it

  • Adding JavaScript behavior
  • UI interactions
  • Form enhancements
  • Building reusable client-side components

Example prompts

  • “Use the stimulus-patterns skill to build focused, single-purpose Stimulus controllers for progressive enhancement”
  • “/stimulus-patterns”

Requirements

  • Compatibility (from SKILL.md): Stimulus 3.2+, Turbo 8.0+, Importmap

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Event delegation: One listener on parent, not many on children
  2. Debounce expensive ops: Use setTimeout with clear pattern
  3. Always clean up in disconnect(): Clear timeouts, observers, listeners
  4. Use IntersectionObserver: For visibility-based behavior

What it can do on your machine

Read from SKILL.md and the folder at commit 0ef5e5d. 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

    Shell commands in SKILL.md call:

    • rails

    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.

  • Compatibility

    Stimulus 3.2+, Turbo 8.0+, Importmap

    From compatibility in the SKILL.md frontmatter.

Context cost

Stimulus Patterns loads about 1.2k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 330 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.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 dilolabs/nosia at commit 0ef5e5d, republished under its MIT licence (© dilolabs). 330 words, ~1,232 tokens.

Download SKILL.mdSave it as .claude/skills/stimulus-patterns/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
stimulus-patterns
description
Builds focused, single-purpose Stimulus controllers for progressive enhancement. Use when adding JavaScript behavior, UI interactions, form enhancements, or building reusable client-side components. WHEN NOT: For Turbo Stream/Frame patterns (see turbo-patterns skill). For server-side view logic (see rules/views.md).
compatibility
Stimulus 3.2+, Turbo 8.0+, Importmap
license
MIT

You are an expert Stimulus architect specializing in building focused, reusable JavaScript controllers.

Your role

  • Build small, single-purpose Stimulus controllers (most under 50 lines)
  • Use Stimulus for progressive enhancement, not application logic
  • Favor configuration via values/classes over hardcoding
  • Output: Reusable controllers that work anywhere, with any backend

Core philosophy

Stimulus for sprinkles, not frameworks. Add behavior to server-rendered HTML, don't build SPAs.

What Stimulus IS for:
  • Progressive enhancement (works without JS)
  • DOM manipulation (show/hide, toggle, animate)
  • Form enhancements (auto-submit, validation UI)
  • UI interactions (dropdowns, modals, tooltips)
  • Library integration (Sortable, Trix, etc.)
What Stimulus is NOT for:
  • Business logic (belongs in models)
  • Data fetching (use Turbo)
  • Client-side routing (use Turbo)
  • State management (server is source of truth)
Controller size: 62% reusable/generic, 38% domain-specific. Most under 50 lines.

Project knowledge

Tech Stack: Stimulus 3.2+, Turbo 8+, Importmap (no bundler) Location: app/javascript/controllers/ Generate: bin/rails generate stimulus [name]

Controller structure

javascript
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static targets = ["input", "output"]
  static classes = ["active", "hidden"]
  static values = {
    url: String,
    timeout: { type: Number, default: 5000 }
  }

  connect() { /* Setup */ }
  disconnect() { /* Cleanup -- always clean up! */ }

  actionMethod(event) {
    event.preventDefault()
    this.element.classList.toggle(this.activeClass)
  }

  #privateHelper() { /* Use # prefix */ }
}

Naming conventions

  • HTML: data-controller="auto-submit" (kebab-case)
  • Filename: auto_submit_controller.js (snake_case)
  • Targets: data-auto-submit-target="input" (camelCase)
  • Values: data-auto-submit-url-value="/path" (camelCase)
  • Classes: data-auto-submit-active-class="is-active" (camelCase)

Composition patterns

Multiple controllers on one element
erb
<div data-controller="dropdown modal">
  <%# Both controllers active %>
</div>
Nested controllers
erb
<div data-controller="sortable">
  <div data-controller="card">
    <div data-controller="dropdown">
      <%# Three controllers in hierarchy %>
    </div>
  </div>
</div>
Controller communication via events
javascript
// Publisher dispatches
this.dispatch("published", { detail: { content: "data" } })

// Subscriber listens via data-action
// data-action="publisher:published->subscriber#handleEvent"

Performance tips

  1. Event delegation: One listener on parent, not many on children
  2. Debounce expensive ops: Use setTimeout with clear pattern
  3. Always clean up in disconnect(): Clear timeouts, observers, listeners
  4. Use IntersectionObserver: For visibility-based behavior
javascript
disconnect() {
  clearTimeout(this.timeout)
  this.observer?.disconnect()
  document.removeEventListener("click", this.boundClose)
}

Testing

ruby
# System tests are the primary way to test Stimulus controllers
test "toggle card details" do
  visit card_path(cards(:logo))
  assert_no_selector ".card__details"
  click_button "Show Details"
  assert_selector ".card__details"
end

Reusable controller library

UI: toggle, dropdown, modal, tabs, tooltip Forms: auto-submit, character-counter, form-validation, password-visibility Utility: clipboard, auto-dismiss, confirm, disable Integration: sortable, trix, flatpickr Tracking: beacon, visibility, scroll

Boundaries

  • Always: Keep controllers under 50 lines, single responsibility, use values/classes for config, clean up in disconnect(), use # private methods, provide no-JS fallback
  • Ask first: Before adding business logic, before fetching data (use Turbo), before managing complex state, before creating domain-specific controllers (favor generic + composition)
  • Never: Build SPAs, put business logic in controllers, manage app state client-side, skip disconnect() cleanup, hardcode values, create god controllers, forget CSRF tokens in fetch

Reference files

  • references/controller-catalog.md -- Common controller patterns (toggle, modal, dropdown, form enhancement)
  • references/stimulus-examples.md -- Full controller implementations with HTML integration

© dilolabs, 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 2 other files (references) in .vibe/skills/stimulus-patterns of dilolabs/nosia.

  • SKILL.md
  • references/controller-catalog.md
  • references/stimulus-examples.md

Open the folder on GitHubat commit 0ef5e5d

Used in 1 other repository

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dilolabs/nosia, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Stimulus Patterns 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 Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stimulus Patterns this skilldilolabs/nosia2131 repos~1.2kAutomated safety check: PassMIT
Dr Jskilljdubois/dr-jskill342—~4.6kAutomated safety check: NotesApache-2.0
Add AI Chat Toolryokun6/ryos1.3k—~2.2kAutomated safety check: PassAGPL-3.0
Holm Webvolfpeter/holm132—~1.2kAutomated safety check: PassMIT
Documentation Guidevolfpeter/holm132—~1.4kAutomated safety check: PassMIT
Pocketbase Jsvmpockethost/pockethost1.4k—~2.7kAutomated safety check: PassMIT

Similar skills

  • Dr Jskill

    jdubois/dr-jskill

    Creates Java + Spring Boot projects: Web applications, full-stack apps with Vue.js or Angular or React or vanilla JS, PostgreSQL, REST APIs, and Docker.

    342 GitHub stars~4.6k tokensUpdated 8 days ago
    Backend & APIsAuto-check: notes
  • Add AI Chat Tool

    ryokun6/ryos

    Add or modify an AI chat tool ("Ask Ryo" capability) in ryOS.

    1.3k GitHub stars~2.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Holm Web

    volfpeter/holm

    A skill your agent uses when working on web apps built with holm, or to answer questions about holm.

    132 GitHub stars~1.2k tokensUpdated 21 days ago
    Backend & APIsAuto-check passed
  • Documentation Guide

    volfpeter/holm

    A skill your agent uses when writing or modifying documentation, guides, or example READMEs.

    132 GitHub stars~1.4k tokensUpdated 21 days ago
    Backend & APIsAuto-check passed
  • Pocketbase Jsvm

    pockethost/pockethost

    Writes PocketBase server-side JavaScript in the Goja JSVM: pbhooks, routerAdd, record hooks, cron jobs, and synchronous $app APIs.

    1.4k GitHub stars~2.7k tokensUpdated 10 days ago
    Backend & APIsAuto-check passed
  • Use JS Interop

    dotnet/skills

    Official

    Add, review, or fix JavaScript interop in Blazor components.

    5.6k GitHub starsUsed in 1 repo~2.7k tokens
    Backend & APIsAuto-check passed

More from dilolabs/nosia

All 15 skills in this repo
  • API Patterns

    dilolabs/nosia

    Builds REST APIs using respondto blocks with Jbuilder templates following the 37signals same-controllers-different-formats philosophy.

    213 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Auth Setup

    dilolabs/nosia

    Implements custom passwordless authentication without Devise.

    213 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Caching Patterns

    dilolabs/nosia

    Implements HTTP caching with ETags, fragment caching, Russian doll caching, and Solid Cache configuration.

    213 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Concern Patterns

    dilolabs/nosia

    Creates and refactors model and controller concerns for shared behavior.

    213 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Event Tracking

    dilolabs/nosia

    Builds event tracking, activity feeds, and webhook systems following 37signals patterns with a generic Event model and Eventable concern.

    213 GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Job Patterns

    dilolabs/nosia

    Implements shallow background jobs with later/now conventions using Solid Queue.

    213 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Works with

Questions about Stimulus Patterns

What does Stimulus Patterns do?

Builds focused, single-purpose Stimulus controllers for progressive enhancement. Stimulus Patterns is an agent skill from dilolabs/nosia. Builds focused, single-purpose Stimulus controllers for progressive enhancement.

When should I use Stimulus Patterns?

Stimulus Patterns fits situations like: adding JavaScript behavior; UI interactions; form enhancements; building reusable client-side components.

How do I install Stimulus Patterns in Claude Code?

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

How do I install Stimulus Patterns in Codex?

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

Can I use Stimulus Patterns 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 dilolabs/nosia --skill stimulus-patterns -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-patterns, .gemini/skills/stimulus-patterns, .github/skills/stimulus-patterns and .opencode/skills/stimulus-patterns in your project.

What does Stimulus Patterns need to run?

Going by SKILL.md and its folder, Stimulus Patterns needs the command-line tools its instructions call (rails). Compatibility (from SKILL.md): Stimulus 3.2+, Turbo 8.0+, Importmap.

Does Stimulus Patterns 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 Patterns 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 Patterns use?

Stimulus Patterns 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 Patterns use?

About 1.2k tokens (SKILL.md is roughly 4.9k 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 3.7k tokens, read only when the agent opens those files.

What are the alternatives to Stimulus Patterns?

Skills that share tags, products or a category with Stimulus Patterns: Dr Jskill (jdubois/dr-jskill, 342 stars), Add AI Chat Tool (ryokun6/ryos, 1.3k stars), Holm Web (volfpeter/holm, 132 stars) and Documentation Guide (volfpeter/holm, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stimulus Patterns?

dilolabs (a GitHub organization) maintains it in dilolabs/nosia, which has 213 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 9, 2026.

Source: dilolabs/nosia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.