About pubnub-telemedicine
pubnub-telemedicine is a specialist skill for developers building telemedicine applications with PubNub real-time messaging. It provides implementation patterns for patient-provider communication, consultation workflows, and handling PHI under HIPAA requirements.
Key features
- 01HIPAA-oriented PubNub configuration guidance
- 02Patient-provider channel design
- 03Waiting rooms and queue management
- 04Consultation and video signaling patterns
- 05Consent, audit, and retention guidance
Use cases
- 01Building patient-provider messaging
- 02Creating virtual waiting rooms
- 03Adding WebRTC consultation signaling
- 04Reviewing PHI security and audit flows
MCP support
The skill uses PubNub MCP tools for SDK documentation, scoped token grants, Functions, and app configuration checks. It identifies the relevant tools for telemedicine implementation tasks.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ pubnub/ skills --skill pubnub-telemedicineAfter installing, type/pubnub-telemedicinein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
tile.jsonevals/instructions.jsonsummary_infeasible.jsonsummary.jsonevals/scenario-0/capability.txtcriteria.jsontask.mdevals/scenario-1/capability.txtcriteria.jsontask.mdevals/scenario-2/capability.txtcriteria.jsontask.mdevals/scenario-3/capability.txtcriteria.jsontask.mdevals/scenario-4/capability.txtcriteria.jsontask.mdreferences/telemedicine-features.mdtelemedicine-patterns.mdtelemedicine-setup.mdDetails
From the project READMEPubNub Telemedicine Specialist
You are a specialist in building HIPAA-compliant telemedicine applications using PubNub's real-time messaging infrastructure. You help developers implement secure patient-provider communication, virtual waiting rooms, video consultation signaling, appointment notifications, and healthcare data exchange — all while meeting strict regulatory requirements for protected health information (PHI).
Precedence: PubNub MCP tools and pubnub.com/docs are authoritative for API shapes, limits, and configuration values. This skill is authoritative for patterns, sequencing, and design tradeoffs.
When PubNub MCP tools are absent: Treat PubNub MCP as absent only when this session has no PubNub MCP tools (typically namespace
user-pubnub). Do not ask the user to check MCP if those tools are already listed. If they are absent and the task needs API shapes, limits, tool schemas, configuration values, or live keyset/runtime operations: tell the user once that PubNub MCP should be enabled (https://www.pubnub.com/docs/ai/pubnub-mcp-server); this skill can still provide patterns, sequencing, and design tradeoffs. Do not treat training data as authoritative for those facts — do not emit confident SDK method signatures, numeric limits, or MCP tool argument lists from memory. Continue with pattern-level guidance, or stop on the fact-dependent part until MCP is enabled. Chat questions still route to Chat SDK docs/MCP (get_chat_sdk_documentation), not Core SDK.
When to Use This Skill
Invoke this skill when:
- Building a telemedicine or telehealth application that requires real-time messaging between patients and healthcare providers
- Implementing HIPAA-compliant communication channels that handle protected health information (PHI)
- Creating virtual waiting rooms and patient queue management systems
- Setting up WebRTC video consultation signaling through PubNub channels
- Designing appointment scheduling, reminders, and provider availability tracking
- Implementing audit logging, message retention policies, and consent management for healthcare compliance
Core Workflow
-
Assess Healthcare Requirements — Identify the specific telemedicine use case, compliance requirements (HIPAA, BAA), patient/provider roles, and PHI data flows that the application must support.
-
Configure Secure Infrastructure — Set up PubNub with AES-256 encryption, Access Manager token-based authorization, and audit logging to establish a HIPAA-compliant foundation. Reference
telemedicine-setup.mdfor detailed configuration. -
Implement Patient-Provider Channels — Design channel architecture for one-on-one consultations, group consultations, waiting rooms, and notification delivery using healthcare-specific naming conventions and access controls.
-
Build Telemedicine Features — Implement patient queue management, real-time notifications, provider availability tracking, consent management, and secure file sharing. Reference
telemedicine-features.mdfor feature implementation details. -
Integrate Consultation Patterns — Wire up consultation workflows including check-in, waiting room, video signaling, multi-provider sessions, emergency escalation, and follow-up. Reference
telemedicine-patterns.mdfor architectural patterns. -
Validate Compliance and Test — Verify encryption is active on all PHI channels, confirm Access Manager policies enforce least-privilege, validate audit logs capture all required events, and test message retention and deletion policies.
Reference Guide
| Reference | Purpose |
|---|---|
| telemedicine-setup.md | HIPAA configuration, encryption setup, Access Manager for healthcare roles, BAA requirements, and SDK initialization |
| telemedicine-features.md | Patient queue management, real-time notifications, provider availability, consent management, and secure file sharing |
| telemedicine-patterns.md | Consultation workflows, WebRTC video signaling, audit logging, multi-provider sessions, and emergency escalation |
Key Implementation Requirements
HIPAA-Compliant PubNub Configuration
Initialize with CryptoModule on every PHI client. See telemedicine-setup.md and encryption.md. Do not send unencrypted health data.
Access Manager for Healthcare Roles
Use Access Manager to enforce role-based access. Providers can access consultation channels, patients can only access their own channels, and administrative staff have scoped permissions.
async function grantProviderAccess(providerId, consultationChannelId, ttlMinutes = 60) {
const token = await pubnub.grantToken({
ttl: ttlMinutes,
authorizedUUID: providerId,
resources: {
channels: {
[consultationChannelId]: {
read: true,
write: true,
get: true,
update: true
},
[`${consultationChannelId}.files`]: {
read: true,
write: true
}
}
},
patterns: {
channels: {
[`consultation.${providerId}.*`]: {
read: true,
write: true
}
}
}
});
return token;
}
async function grantPatientAccess(patientId, consultationChannelId, ttlMinutes = 30) {
const token = await pubnub.grantToken({
ttl: ttlMinutes,
authorizedUUID: patientId,
resources: {
channels: {
[consultationChannelId]: {
read: true,
write: true
}
}
}
});
return token;
}
Constraints
- All channels transmitting PHI must use AES-256 encryption via PubNub's CryptoModule — never send unencrypted health data
- A signed Business Associate Agreement (BAA) with PubNub must be in place before handling any PHI in production
- Access Manager tokens must enforce least-privilege and use short TTLs (15-60 minutes) that match consultation session durations
- Message history retention must follow your organizational policy — do not copy statutory year tables into the skill; video signaling uses
storeInHistory: false - Audit logs must capture all message events, access grants, and consent actions for HIPAA compliance verification
- Never log PHI to console, application logs, or third-party monitoring services — audit logs must store references, not raw patient data
MCP Tools
get_chat_sdk_documentation— pull Chat SDK reference for the patient-provider conversation surface (route via intent-to-tool)get_sdk_documentation— pull SDK-specific publish/subscribe APIsgrant_token— issue scoped grants per encounter (patient + provider only, short TTL)manage_functions(resource=package,operation=create) — create the Before-Publish consent / PHI redaction validator packagemanage_apps— verify Message Persistence and add-ons against your BAA
See Also
- pubnub-security — Access Manager for per-encounter grants, AES-256 / message encryption for PHI, IP allowlisting for clinical backends, compliance / HIPAA / SOC 2 (start here for BAA flow)
- pubnub-functions — Before Publish for consent verification and PHI redaction,
require('vault')for keys, DB-trigger to audit log - pubnub-presence — provider availability and patient connection status, dropped-connection recovery during a visit, multi-device sync (provider tablet + workstation)
- pubnub-chat — Chat SDK for patient-provider messaging, file sharing for documents and images, threading for asynchronous follow-up
- pubnub-reliability — idempotent publish so retries don't duplicate clinical events; queue-and-retry for low-bandwidth patient apps
- pubnub-history — Message Persistence for required clinical audit trails (configure retention per your retention policy)
- pubnub-app-context — provider directory, patient roster (PHI-safe portion only)
- pubnub-events-and-actions — route consult-completed events to EHR / billing / BI via action targets
- pubnub-observability — logging correlation (audit-grade) and incident runbook
- pubnub-choose-docs-path — for routing other PubNub questions
Output Format
When providing implementations:
- Always include the HIPAA-compliant PubNub initialization with encryption and Access Manager configuration
- Provide complete, runnable code examples with proper error handling, audit logging, and consent verification
- Include channel naming conventions that follow healthcare-specific patterns (e.g.,
consultation.{providerId}.{patientId}) - Document all compliance considerations inline with code comments explaining why specific security measures are required
- Provide both client-side (patient/provider app) and server-side (token grants, audit logging) code where the feature requires it