perplexity-data-handling

Featured

Implement Perplexity query sanitization, citation validation, result caching, and conversation context management for search workflows. Trigger with phrases like "perplexity data", "perplexity PII", "perplexity citations", "perplexity cache", "perplexity context".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Perplexity Data Handling ## Overview Manage data flowing through Perplexity Sonar API. Critical concern: queries are sent to Perplexity for web search, so any PII in queries is exposed to external infrastructure. Responses contain citations (third-party URLs) that must be validated before displaying to users. ## Data Flow ``` User Input → Query Sanitization → Perplexity API → Response Parsing │ ┌─────────────┼──────────────┐ │ │ │ Answer Text Citations Search Results │ │ │ Format & Validate & Store for Display Deduplicate Analytics ``` ## Prerequisites - Perplexity API key configured - Understanding of PII regulations (GDPR/CCPA) - Cache storage (Redis or in-memory) ## Instructions ### Step 1: Query Sanitization ```typescript function sanitizeQuery(query: string): { clean: string; redacted: boolean } { let clean = query; let redacted = false; const patterns: Array<[RegExp, string]> = [ [/\b[\w.+-]+@[\w-]+\.[\w.]+\b/g, "[email]"], [/\b\d{3}[-.]?\d{3}[-.]?\d{4}\b/g, "[phone]"], [/\b\d{3}-\d{2}-\d{4}\b/g, "[ssn]"], [/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/g, "[card]"], [/\b(p...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

perplexity-security-basics

Apply Perplexity security best practices for API key management and query safety. Use when securing API keys, implementing query sanitization, or auditing Perplexity security configuration. Trigger with phrases like "perplexity security", "perplexity secrets", "secure perplexity", "perplexity API key security", "perplexity PII".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-policy-guardrails

Implement content moderation, model selection policy, citation quality enforcement, and per-user usage quotas for Perplexity Sonar API. Trigger with phrases like "perplexity policy", "perplexity guardrails", "perplexity content moderation", "perplexity usage limits", "perplexity safety".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-performance-tuning

Optimize Perplexity Sonar API performance with caching, streaming, model routing, and batching. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Perplexity integrations. Trigger with phrases like "perplexity performance", "optimize perplexity", "perplexity latency", "perplexity caching", "perplexity slow".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-reliability-patterns

Implement reliability patterns for Perplexity Sonar API: circuit breaker, model fallback, streaming timeout, and citation validation. Trigger with phrases like "perplexity reliability", "perplexity circuit breaker", "perplexity fallback", "perplexity resilience", "perplexity timeout".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-observability

Set up monitoring for Perplexity Sonar API with latency, cost, citation quality, and error tracking. Use when implementing monitoring dashboards, setting up alerts, or tracking Perplexity API health in production. Trigger with phrases like "perplexity monitoring", "perplexity metrics", "perplexity observability", "monitor perplexity", "perplexity dashboard".

2,266 Updated today
jeremylongshore