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,944 stars 440 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
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category