skills/add-session-recording/SKILL.md
Add privacy-aware session recording and replay to React applications using Temps SDK. Captures user interactions for playback while respecting privacy through input masking, element blocking, and GDPR-compliant consent flows. Use when the user wants to: (1) Add session recording to their app, (2) Implement session replay functionality, (3) Record user sessions for debugging, (4) Add privacy-compliant screen recording, (5) Debug user issues with visual replay, (6) Implement rrweb-based recording, (7) Set up GDPR-compliant session capture. Triggers: "session recording", "session replay", "record sessions", "user replay", "screen recording", "rrweb", "session capture".
npx skillsauth add gotempsh/temps add-session-recordingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Implement privacy-aware session recording with Temps SDK using rrweb under the hood.
npm install @temps-sdk/react-analytics
// app/providers.tsx or app/layout.tsx
'use client';
import {
TempsAnalyticsProvider,
SessionRecordingProvider
} from '@temps-sdk/react-analytics';
export function Providers({ children }) {
return (
<TempsAnalyticsProvider basePath="/api/_temps">
<SessionRecordingProvider
enabled={true}
maskAllInputs={true}
blockClass="sensitive"
>
{children}
</SessionRecordingProvider>
</TempsAnalyticsProvider>
);
}
<SessionRecordingProvider
enabled={true} // Enable recording
maskAllInputs={true} // Mask all input values (recommended)
maskAllText={false} // Mask all text content
blockClass="sensitive" // CSS class to block elements
ignoreClass="no-record" // CSS class to ignore elements
sampling={{
mousemove: true,
mouseInteraction: true,
scroll: true,
input: 'last', // 'all' | 'last' | false
}}
>
{children}
</SessionRecordingProvider>
'use client';
import { useSessionRecordingControl } from '@temps-sdk/react-analytics';
function RecordingControls() {
const {
isRecording,
startRecording,
stopRecording,
toggleRecording
} = useSessionRecordingControl();
return (
<div>
<span>Recording: {isRecording ? 'Active' : 'Paused'}</span>
<button onClick={toggleRecording}>
{isRecording ? 'Stop' : 'Start'} Recording
</button>
</div>
);
}
// Method 1: CSS class (configured in provider)
<div className="sensitive">
<CreditCardForm />
</div>
// Method 2: Data attribute
<input type="password" data-rr-block />
// Method 3: Mask text (shows asterisks in replay)
<span data-rr-mask>{socialSecurityNumber}</span>
// Payment forms - block entirely
<form className="sensitive">
<input name="card" />
<input name="cvv" />
</form>
// Personal data - mask individual fields
<input name="ssn" data-rr-block />
<input name="dob" data-rr-mask />
// Entire sections
<section data-rr-block>
<MedicalRecords />
</section>
'use client';
import { useSessionRecordingControl } from '@temps-sdk/react-analytics';
import { useState, useEffect } from 'react';
function ConsentBanner() {
const [showBanner, setShowBanner] = useState(false);
const { startRecording, stopRecording } = useSessionRecordingControl();
useEffect(() => {
const consent = localStorage.getItem('session_recording_consent');
if (consent === null) {
setShowBanner(true);
} else if (consent === 'true') {
startRecording();
}
}, []);
const handleAccept = () => {
localStorage.setItem('session_recording_consent', 'true');
startRecording();
setShowBanner(false);
};
const handleDecline = () => {
localStorage.setItem('session_recording_consent', 'false');
stopRecording();
setShowBanner(false);
};
if (!showBanner) return null;
return (
<div className="fixed bottom-4 right-4 p-4 bg-white shadow-lg rounded">
<p>We record sessions to improve your experience.</p>
<div className="flex gap-2 mt-2">
<button onClick={handleAccept}>Accept</button>
<button onClick={handleDecline}>Decline</button>
</div>
</div>
);
}
// Only record in production
<SessionRecordingProvider
enabled={process.env.NODE_ENV === 'production'}
>
// Only record for specific users
<SessionRecordingProvider
enabled={user?.plan === 'enterprise'}
>
// Disable for specific pages
function CheckoutPage() {
const { stopRecording, startRecording } = useSessionRecordingControl();
useEffect(() => {
stopRecording();
return () => startRecording();
}, []);
return <CheckoutForm />;
}
/api/_temps/recordingstools
Build external plugins for the Temps deployment platform. Use when the user wants to create, modify, or debug a Temps plugin binary — a standalone Rust process that communicates with Temps over a Unix domain socket. Also use when the user mentions "temps plugin", "external plugin", "plugin binary", "plugin for temps", "plugin UI", or asks about plugin architecture, plugin events, plugin manifest, or plugin SDK. Covers the full lifecycle: project scaffolding, manifest, router, events, SQLite persistence, embedded React UI, build.rs, testing, and deployment into the plugins directory.
tools
Install, configure, and manage the Temps deployment platform and CLI. Covers self-hosted Temps installation, CLI setup (bunx @temps-sdk/cli), initial configuration, user management, and platform administration. Use when the user wants to: (1) Install Temps on their server, (2) Set up the Temps CLI, (3) Configure Temps for the first time, (4) Manage Temps platform settings, (5) Create admin users, (6) Configure DNS providers, (7) Set up TLS certificates. Triggers: "install temps", "setup temps", "temps cli", "configure temps", "temps platform", "self-hosted deployment platform".
tools
Configure the Temps MCP server to enable AI assistants to interact with the Temps platform. Provides tools for listing projects, viewing project details, and managing deployments directly from Claude or other MCP-compatible clients. Use when the user wants to: (1) Set up Temps MCP server, (2) Configure Claude to manage Temps projects, (3) Add Temps tools to their AI assistant, (4) Enable AI-powered deployment management, (5) Connect Claude Desktop to Temps, (6) Use MCP to interact with Temps API. Triggers: "temps mcp", "configure temps tools", "add temps to claude", "temps ai assistant", "mcp server setup".
tools
Complete command-line reference for managing the Temps deployment platform. Covers all 54+ CLI commands including projects, deployments, environments, services, domains, monitoring, backups, security scanning, error tracking, and platform administration. Use when the user wants to: (1) Find CLI command syntax, (2) Manage projects and deployments via CLI, (3) Configure services and infrastructure, (4) Set up monitoring and logging, (5) Automate deployments with CI/CD, (6) Manage domains and DNS, (7) Configure notifications and webhooks. Triggers: "temps cli", "temps command", "how to use temps", "@temps-sdk/cli", "bunx temps", "npx temps", "temps deploy", "temps projects", "temps services".