Add Comments
Add collaborative commenting to a React or Next.js application.
Trigger
Use when the user wants to add any type of comment feature: freestyle (click-anywhere), popover (cell/element-bound), text (highlight), stream (Google Docs-style), page (sidebar), or editor-integrated (TipTap, Lexical, Slate).
Workflow
- •Ask which comment mode the user wants. Explain the options briefly:
- •Freestyle: Click anywhere to pin comments (default, good for design feedback)
- •Popover: Google Sheets-style, bound to specific elements
- •Text: Highlight text to comment (Google Docs-style)
- •Stream: Comments in side column, scroll-synced with content
- •Page: Page-level comments via sidebar
- •TipTap/Lexical/Slate: Editor-integrated text comments
- •Verify Velt is set up (VeltProvider, auth, document). If not, run /install-velt first.
- •Use the
install_velt_interactiveMCP tool with the selected comment type. - •Follow the guided installation flow (plan → approve → apply).
- •Validate the installation.
Guardrails
- •Follow embedded velt-comments rules for correct component placement.
- •For popover mode: every commentable element needs a unique ID + matching targetElementId.
- •For editor integrations: MUST set
textMode={false}on VeltComments. - •VeltCommentTool is required for freestyle mode — users can't initiate comments without it.
- •Consult reference agent-skills at /references/agent-skills/skills/velt-comments-best-practices/ for detailed patterns.
Output
- •VeltComments component added with correct mode
- •Comment tool/trigger added to UI
- •Comment sidebar configured (if applicable)
- •Working comment creation and display