Download for macOS
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: use the OMGSkills MCP get_skill tool, install only the pinned_install commit and path, verify SKILL.md against pinned_install.skill_md_sha, 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.