velt-activity-best-practices

Implement Velt Activity Logs with real-time feeds, custom events, and audit trails.

1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/velt-js/agent-skills --skill velt-activity-best-practices-velt-js
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: velt-activity-best-practices
Source: https://github.com/velt-js/agent-skills/tree/main/skills/velt-activity-best-practices
Command: npx skills add https://github.com/velt-js/agent-skills --skill velt-activity-best-practices-velt-js

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @veltdev/react.

What problem does it solve? Integrating Velt's Activity Logs into React, Next.js, or other web apps involves many failure points: feeds returning null because logs were not enabled in the Velt Console, memory leaks from uncleaned subscriptions, noisy feeds from unbatched CRDT edits, and broken UI from conditionally rendering the VeltActivityLog web component. This Skill provides evidence-backed rules that prevent these mistakes. ## Core Features & Use Cases - Real-time activity feeds: Subscribe with useAllActivities or getAllActivities, with correct null loading-state handling, document/feature/action-type filtering, and subscription cleanup. - Custom activity records: Emit application events (deployments, status changes, escalations) via useActivityUtils or createActivity with displayMessageTemplate and template data. - Configuration & compliance: Configure CRDT debounce batching, enable immutability for SOX/SOC 2/HIPAA audit trails, and use exported action type constants for type-safe filtering. - UI customization: Compose the VeltActivityLogWireframe sub-component tree and bind slots with velt-data, velt-if, and velt-class template variables. - Use Case: Add a toggleable activity sidebar to a Next.js document page that shows all collaboration events, keeps the web component mounted with display:none, and logs custom task-status events into the same feed. ## Quick Start Ask the agent to add a Velt activity feed sidebar to your document page using the VeltActivityLog component with proper toggle behavior.

Frequently Asked Questions about velt-activity-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a real-time activity feed to a React app with Velt?▼

Use the useAllActivities hook from @veltdev/react after enabling Activity Logs in the Velt Console. It returns null while loading, so check for null before rendering, and pass documentIds or featureTypes to scope the feed.

How to create custom activity records in Velt activity logs?▼

Call createActivity via the useActivityUtils hook in React or getActivityElement() in other frameworks. Provide featureType, actionType, targetEntityId, and a displayMessageTemplate with matching displayMessageTemplateData keys for each template variable.

Why is my Velt activity feed always null or empty?▼

Activity Logs are disabled by default and must be enabled in the Velt Console under Dashboard > Configuration > Activity Logs. Also verify VeltProvider uses the authProvider pattern and the SDK is @veltdev/react 5.0.2-beta.13 or later.

Can I use Velt activity logs with Vue or Angular instead of React?▼

Yes, use Velt.getActivityElement().getAllActivities() which returns an Observable for framework-agnostic subscriptions. Store the subscription and call unsubscribe() when done to prevent memory leaks.

How do I make Velt activity records immutable for compliance audits?▼

Enable Immutability in the Velt Console under Activity Logs settings; it is off by default. Once enabled, records cannot be updated or deleted via SDK or REST API, making them suitable as tamper-evident audit trails for SOX, SOC 2, or HIPAA workflows.

Why does my Velt activity feed flood with one record per keystroke?▼

CRDT edits generate an activity record per change by default. Call setActivityDebounceTime(milliseconds) on the CRDT element to batch edits within a time window into a single record; the minimum effective value is 10 seconds.