Download for MacApple silicon, macOS 14+
Skill

velt-rewriter-best-practices

@velt-js Updated 2026-06-24

Best practices for the Velt Rewriter — the AI text-rewriter feature that lets users select text and apply AI-generated rewrites or anchor AI-assisted comments. Use whenever the user is integrating the Velt Rewriter, calling enableRewriter/disableRewriter, subscribing to textSelected events, calling askAi (multi-provider AI generation auto-routed by model prefix across OpenAI/Anthropic/Gemini), calling replaceText to swap DOM text, calling addComment to anchor a Velt comment to a text range, toggling the default selection toolbar with enableDefaultUI/disableDefaultUI, building custom rewriter UI with the wireframe variables (componentConfig.* on velt-rewriter-text-portal-wireframe / velt-rewriter-dialog-wireframe / velt-rewriter-bottom-sheet-wireframe), or typing against RewriterAskAiRequest / RewriterReplaceTextRequest / RewriterAddCommentRequest / AiModel. Trigger even if the user does not say 'Velt' explicitly — any mention of an AI text rewriter, in-place text replacement after AI generation, selection-toolbar AI prompt, or AI rewrite suggestions anchored to text ranges should pull this skill.

Install

With your agent

Install OMGSkills skill "velt-js/velt-plugin-cursor:skills/velt-rewriter-best-practices" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/velt-js/velt-plugin-cursor /tmp/velt-plugin-cursor && ln -s /tmp/velt-plugin-cursor/skills/velt-rewriter-best-practices ~/.claude/skills/velt-rewriter-best-practices

From README

Velt Rewriter Best Practices Implementation guide for the Velt Rewriter — an AI text-rewriter primitive that lets users select text and apply AI-generated rewrites or anchor AI-assisted comments. Covers the full client-side pipeline (enableRewriter → on('textSelected') → askAi → replaceText / addComment), the default-toolbar toggle, AI model typing, and wireframe-driven custom UI. When to Apply Reference these guidelines when: Adding AI text-rewrite functionality to a React, Next.js, or web application Wiring the canonical Rewriter pipeline (enable → subscribe → generate → apply) Calling askAi and picking a model — Velt auto-routes the provider from the model prefix Replacing DOM text in-place after AI generation (replaceText) Anchoring AI suggestions as Velt comments on the selected text range (addComment) Controlling whether Velt's built-in selection toolbar shows (enableDefaultUI / disableDefaultUI) Building a custom Rewriter UI on top of the wireframe primitives (componentConfig.