form-auto-save

Automatically save form input changes with a configurable debounce delay.

6|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/RoleModel/rolemodel-skills --skill form-auto-save
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: form-auto-save
Source: https://github.com/RoleModel/rolemodel-skills/tree/main/skills/form-auto-save
Command: npx skills add https://github.com/RoleModel/rolemodel-skills --skill form-auto-save

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @hotwired/stimulus, and includes scripts (resource) components.

What problem does it solve?

The Form Auto Save pattern automatically saves form input changes after the user stops typing, reducing server load and preventing data loss on navigation.

Core Features & Use Cases

  • Automatic form-saving after changes with a configurable debounce delay.
  • Works with standard inputs and rich text editors, including custom components that emit lexxy:change events.
  • Preserves form state across page transitions when turbo_permanent is enabled.

Quick Start

Attach the Stimulus controller to the form element and adjust the debounce time to fit your UX. Example: data-controller="form-auto-save" data-turbo_permanent="true" to preserve state across navigation.

Frequently Asked Questions about form-auto-save

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

FAQPage Schema
How do I auto-save form inputs in a Hotwire application?

To auto-save form inputs, you can use a Stimulus controller that debounces user typing and automatically submits changes to reduce server requests. This prevents data loss during navigation without requiring manual save actions.

How does debouncing prevent excessive server requests when saving forms?

Debouncing prevents excessive server requests by delaying the save action until the user stops typing for a configured period. This batches rapid input events into a single automated request rather than triggering on every keystroke.

Can I preserve unsaved form state across page navigation with Turbo?

Yes, you can preserve unsaved form state across page navigation by enabling turbo_permanent on the form element. This keeps the form state intact during page transitions while the auto-save controller syncs changes in the background.

Do I need Stimulus to implement automatic form saving?

Yes, you need the Stimulus framework to implement this specific auto-save pattern. The Skill provides a Stimulus controller that manages the configurable debounce logic and integrates with Turbo for state persistence.

Does auto-saving work with rich text editors or only standard inputs?

Auto-saving works with both standard inputs and rich text editors. The controller supports custom components that emit lexxy:change events, allowing debounced saving across diverse form element types.