Adds Tiptap rich text editing with debounced autosave to Rails models using Stimulus, storing markdown in text columns. Covers installation, Stimulus controller, shared partials, Turbo cache handling, and optional change tracking.
Ships in obie-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Add rich text editing with automatic background saving to any Rails model using Tiptap, Stimulus, and markdown stored in plain text columns.
Invoke this skill when:
Key decision: Markdown in text columns, NOT ActionText.
Why this approach:
How it works:
text column via update_column| 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 |
npm packages, @rails/request.js for CSRF, JS bundler setup (Tiptap does NOT work with importmap), and editor CSS.
See: references/installation.md
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
Reusable _rich_text_field.html.erb and _bubble_menu.html.erb partials with Stimulus data attributes.
See: references/partials.md
Debounced change tracking that groups rapid edits into single audit events.
See: references/audit-trail.md
Quick step-by-step for any model (Article, Post, Page, etc.):
class AddBodyToArticles < ActiveRecord::Migration[7.1]
def change
add_column :articles, :body, :text
end
end
Use text, NOT string. The string type has a 255-character limit -- far too small for rich text content.
# config/routes.rb
resources :articles do
member do
patch :autosave
end
end
class ArticlesController < ApplicationController
before_action :set_article, only: [:show, :edit, :update, :autosave]
AUTOSAVE_FIELDS = %w[body summary notes].freeze
def autosave
field = params[:field].to_s
unless AUTOSAVE_FIELDS.include?(field)
return render json: { error: "field not allowed" }, status: :bad_request
end
@article.update_column(field.to_sym, params[:value])
render json: { status: "saved" }
end
end
Key details:
update_column bypasses validations and callbacks -- important for autosave performanceset_article must include :autosave in the only: list<%= render "shared/rich_text_field",
url: autosave_article_path(@article),
field: "body",
content: @article.body,
placeholder: "Write your article...",
label: "Body",
subtitle: "-- supports markdown formatting" %>
text, not string (255 char limit will silently truncate content)patch :autosave member route must exist or you get 404s on saveset_article (or equivalent) must include :autosave in its only: listbroadcasts_refreshes on models with Tiptap -- Turbo morphing destroys editor state mid-edit. If you need real-time updates, scope broadcasts to exclude the editing user.has_rich_text declarations.references/installation.md for setup.this.bubbleMenuTarget unreachable after initialization. The controller must save a reference before calling new Editor(). This is the #1 source of "target not found" errors. See references/stimulus-controller.md.turbo:before-cache handling, back-button navigation shows a broken editor that won't reinitialize. The controller must destroy the editor and restore the DOM before Turbo caches the page. See references/stimulus-controller.md.Each field gets its own controller instance via its own render call. The field value tells the autosave endpoint which column to update:
<%= render "shared/rich_text_field",
url: autosave_article_path(@article),
field: "body",
content: @article.body,
placeholder: "Article body...",
label: "Body" %>
<%= render "shared/rich_text_field",
url: autosave_article_path(@article),
field: "summary",
content: @article.summary,
placeholder: "Brief summary...",
label: "Summary" %>
Each instance is fully independent -- separate editor, separate autosave, separate status indicator.
Since content is stored as markdown, you need to render it to HTML for display. Common approaches:
# Gemfile
gem "redcarpet"
# or
gem "commonmarker"
# app/helpers/markdown_helper.rb
module MarkdownHelper
def render_markdown(text)
return "" if text.blank?
renderer = Redcarpet::Render::HTML.new(hard_wrap: true, filter_html: true)
markdown = Redcarpet::Markdown.new(renderer,
autolink: true,
tables: true,
fenced_code_blocks: true,
strikethrough: true
)
markdown.render(text).html_safe
end
end
<%# In your show view %>
<div class="prose prose-sm max-w-none">
<%= render_markdown(@article.body) %>
</div>
What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/ai-character-imagingUse when generating a consistent AI character or persona across many images and short motion loops — a virtual artist, mascot, brand persona or recurring character — and the face must stay the same person from plate to plate. Covers the canon identity pack, prompt slots, model choice, content-filter workarounds, owner review rounds, upscaling without waxy skin, seamless Kling motion loops, and patching logos or defects without drifting the face./beat-the-benchmark-websiteBuild or overhaul a showcase, portfolio, artist, product or character website so it measurably meets or exceeds a named benchmark site, and prove it instead of claiming it. Runs a per-area benchmark audit, a single generated source of truth for every figure, an owner voting gallery for assets, parallel builds with one integrator, parallel independent QC and Codex adversarial review against immutable preview deployments, a scope freeze, and a parity-checked production ship ending in owner sign-off. Use when the user names a site to beat or match, asks for world-class or pixel-perfect fit and finish, says a launch looks off, or wants extensive desktop and phone testing before shipping./better-stimulusApply Better Stimulus best practices for writing maintainable, reusable StimulusJS controllers following SOLID principles/decision-docketKeep one standing page of every decision you need from the user, each written so it can be answered cold: what happened, why it's their call, the options with their cost and gain, your recommendation, and what happens if they do nothing. The user records answers on the page; you read them back on each check-in, act, log the ruling, and remove the card. Use during long-running or autonomous work, when the user moves between threads and a question buried in a chat reply would be lost, when they say "keep a questions page", "put it on the docket" or "decision docket", or for /decision-docket./deletion-testRun the regenerative-software deletion test on one component: extract its intent and decision records from code, history, and tickets; write a durable contract spec that asserts promises rather than pinned numbers; mutation-test both oracles; delete the implementation and regenerate it in isolated arms from the intent alone; score every candidate by behavioral diff; write findings that name evaluation gaps, leaked provenance, dead decisions, and compaction candidates. Use when asked to run the deletion test, regenerate a module from its spec, make a component replaceable, extract the reasons buried in a legacy file, or find out whether a test suite is a real oracle. Ruby/Rails tooling, framework-agnostic method./graphs-and-shitPull the latest data from wherever it lives (a survey, a spreadsheet, an API, a database query, a CSV) and turn it into a shareable, editable Claude Doc with hand-drawn charts: a lead that states the answer, short sections, one chart per finding, every chart checked in a screenshot before you call it done. Also refreshes a doc it made earlier with new data. Use when asked to make graphs, chart some results, turn data into something shareable, build a report with nice graphs, or for /graphs-and-shit./obie-skills:rails-tiptap-autosavefrom obie-skills
obie-skills@cascade-code-general-misc-2 is listed by joshuarweaver/cascade-code-general-misc-2 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-2 --plugin obie-skillsOther plugins' skills for the same job