Velt Comments implementation patterns and best practices for React, Next.js, and web applications. Use when adding collaborative commenting features, comment modes (Freestyle, Popover, Stream, Text, Page), rich text editor comments (TipTap, SlateJS, Lexical), media player comments, or chart comments.
Resources
5Install
npx skillscat add velt-js/agent-skills/velt-comments-best-practices Install via the SkillsCat registry.
SKILL.md
Velt Comments Best Practices
Comprehensive implementation guide for Velt's collaborative comments feature in React and Next.js applications. Contains 36 rules across 9 categories, prioritized by impact to guide automated code generation and integration patterns.
When to Apply
Reference these guidelines when:
- Adding collaborative commenting to a React/Next.js application
- Implementing any Velt comment mode (Freestyle, Popover, Stream, Text, Page, Inline)
- Integrating comments with rich text editors (TipTap, SlateJS, Lexical)
- Adding comments to media players (Video, Lottie animations)
- Adding comments to charts (Highcharts, ChartJS, Nivo)
- Building custom comment interfaces with standalone components
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Core Setup | CRITICAL | core- |
| 2 | Comment Modes | HIGH | mode- |
| 3 | Standalone Components | MEDIUM-HIGH | standalone- |
| 4 | Comment Surfaces | MEDIUM-HIGH | surface- |
| 5 | UI Customization | MEDIUM | ui- |
| 6 | Data Model | MEDIUM | data- |
| 7 | Debugging & Testing | LOW-MEDIUM | debug- |
| 8 | Moderation & Permissions | LOW | permissions- |
| 9 | Attachments & Reactions | MEDIUM | attach- |
Quick Reference
1. Core Setup (CRITICAL)
core-provider-setup- Initialize VeltProvider with API keycore-authentication- Authenticate users before using commentscore-document-setup- Configure document context for comments
2. Comment Modes (HIGH)
mode-freestyle- Pin comments anywhere on pagemode-popover- Google Sheets-style cell commentsmode-stream- Google Docs-style sidebar streammode-text- Text highlight commentsmode-page- Page-level comments via sidebarmode-inline-comments- Traditional inline thread stylemode-tiptap- TipTap editor integrationmode-slatejs- SlateJS editor integrationmode-lexical- Lexical editor integrationmode-canvas- Canvas/drawing commentsmode-lottie-player- Lottie animation frame commentsmode-video-player-prebuilt- Velt prebuilt video playermode-video-player-custom- Custom video player integrationmode-chart-highcharts- Highcharts data point commentsmode-chart-chartjs- ChartJS data point commentsmode-chart-nivo- Nivo charts data point commentsmode-chart-custom- Custom chart integration
3. Standalone Components (MEDIUM-HIGH)
standalone-comment-pin- Manual comment pin positioningstandalone-comment-thread- Render comment threadsstandalone-comment-composer- Add comments programmatically
4. Comment Surfaces (MEDIUM-HIGH)
surface-sidebar- Comments sidebar componentsurface-sidebar-button- Toggle sidebar button
5. UI Customization (MEDIUM)
ui-comment-dialog- Customize comment dialogui-comment-bubble- Customize comment bubbleui-wireframes- Use wireframe components
6. Data Model (MEDIUM)
data-context-metadata- Add custom metadatadata-comment-annotations- Work with annotationsdata-filtering-grouping- Filter and group comments
7. Debugging & Testing (LOW-MEDIUM)
debug-common-issues- Common issues and solutionsdebug-verification- Verification checklist
8. Moderation & Permissions (LOW)
permissions-private-mode- Control global comment visibility with enablePrivateMode/disablePrivateMode and update per-annotation visibility with updateVisibilitypermissions-comment-saved-event- Subscribe to the commentSaved event for reliable post-persist side-effects (webhooks, analytics, external sync)
9. Attachments & Reactions (MEDIUM)
attach-download-control- Control attachment download behavior and intercept clicks
How to Use
Read individual rule files for detailed explanations and code examples:
rules/shared/core/core-provider-setup.md
rules/shared/mode/mode-popover.mdEach rule file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Source pointers to official documentation
Compiled Documents
AGENTS.md— Compressed index of all rules with file paths (start here)AGENTS.full.md— Full verbose guide with all rules expanded inline