rails-tiptap-autosave

rails-tiptap-autosave is a skill for Claude Code from zarpay/rails-template. It costs 57 tokens per session (1,689 once invoked), scanned A, original, MIT.

A recipe for adding Tiptap, a rich-text editor, to Rails forms with automatic saving. It uses Stimulus and stores the formatted content as Markdown in a normal database text field, rather than Rails Action Text.

In plain words
What is it for?
Use it to build content editors that save while someone types, with formatting toolbars, Markdown storage, save-status indicators, and optional change tracking.
Why use it?
It removes the need to design autosave behaviour, editor setup, shared form pieces, and handling for Turbo page caching from scratch.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to build content editors that save while someone types, with formatting toolbars, Markdown storage, save-status indicators, and optional change tracking.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zarpay/rails-template/rails-tiptap-autosave
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zarpay/rails-template --skill rails-tiptap-autosave
Clone the repo
git clone --depth 1 https://github.com/zarpay/rails-template

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rails-tiptap-autosave

README.md
[![agentmods](https://agentmods.dev/badge/skills/zarpay/rails-template/rails-tiptap-autosave/github.svg)](https://agentmods.dev/skills/zarpay/rails-template/rails-tiptap-autosave)
Your own site
<a href="https://agentmods.dev/skills/zarpay/rails-template/rails-tiptap-autosave"><img src="https://agentmods.dev/badge/skills/zarpay/rails-template/rails-tiptap-autosave/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rails-tiptap-autosave

Your own site · 80×15
<a href="https://agentmods.dev/skills/zarpay/rails-template/rails-tiptap-autosave"><img src="https://agentmods.dev/badge/skills/zarpay/rails-template/rails-tiptap-autosave.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01689
Opus 5 $0.00028 $0.00844
Sonnet 5 $0.00011 $0.00338
Haiku 4.5 $0.00006 $0.00169

Measured 11d ago against content hash b680aa3417df, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rails-tiptap-autosave scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

files/.claude/skills/rails-tiptap-autosave/SKILL.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rails Tiptap Autosave

Add rich text editing with automatic background saving to any Rails model using Tiptap, Stimulus, and markdown stored in plain text columns.

When to Use This Skill

Invoke this skill when:

  1. Adding rich text editing to Rails models without ActionText
  2. Implementing inline autosave for text fields
  3. Integrating Tiptap editor with Stimulus controllers
  4. Building content editing UIs with formatting toolbars
  5. Debugging Tiptap + Turbo cache conflicts

Architecture Overview

Key decision: Markdown in text columns, NOT ActionText.

Why this approach:

  • No extra tables or polymorphic attachments
  • Content is plain text -- easy to query, diff, and version
  • Markdown renders cleanly in non-browser contexts (emails, APIs, CLI)
  • Simpler mental model than ActionText's rich text blobs

How it works:

  1. Tiptap editor (initialized via Stimulus) converts user input to markdown
  2. On every keystroke (debounced 1 second), PATCH to autosave endpoint
  3. Controller saves markdown to a text column via update_column
  4. Status indicator shows "Saving..." -> "Saved" -> fades

Key Files

File Purpose
app/javascript/controllers/rich_text_editor_controller.js Tiptap Stimulus controller
app/views/shared/_rich_text_field.html.erb Reusable editor partial
app/views/shared/_bubble_menu.html.erb Formatting toolbar

Core Patterns

1. Installation & Build Pipeline

npm packages, @rails/request.js for CSRF, JS bundler setup (Tiptap does NOT work with importmap), and editor CSS.

See: references/installation.md

2. Stimulus Controller

The full rich_text_editor_controller.js -- handles Tiptap initialization, debounced autosave, BubbleMenu target relocation, Turbo cache cleanup, and bubble menu formatting commands.

See: references/stimulus-controller.md

3. View Partials

Reusable _rich_text_field.html.erb and _bubble_menu.html.erb partials with Stimulus data attributes.

See: references/partials.md

Read the full file on GitHub · 202 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 202 lines · 57 tokens per session scan A b680aa3417df

Subscribe to this mod's changes

rails-tiptap-autosave is a skill published in the GitHub repository zarpay/rails-template (9 stars, last pushed 29d ago), licensed MIT. It adds 57 tokens to every session and 1,689 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ralph with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 50 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

menu-transitions-rtl

Animate react-horizontal-scrolling-menu scrolling and build right-to-left menus: noPolyfill defaults to true since v8, so transitionDuration (default 500), a custom-easing-function transitionBehavior, and per-call ScrollOptions { duration, boundary } on scrollToItem/scrollNext/scrollPrev are silently ignored unless…

asmyshlyaev177/react-horizontal-scrolling-menu · 137 tokens