openrouter-data-privacy

Featured

Implement data privacy controls for OpenRouter API usage. Use when handling PII, meeting GDPR/CCPA requirements, or protecting sensitive data in prompts. Triggers: 'openrouter privacy', 'openrouter pii', 'openrouter gdpr', 'openrouter data handling'.

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

# OpenRouter Data Privacy ## Overview When sending data through OpenRouter to upstream LLM providers, you're responsible for ensuring prompts don't leak PII inappropriately. OpenRouter itself does not train on API data, but each upstream provider has its own data retention and training policies. This skill covers PII detection and redaction, placeholder substitution, provider selection for privacy, and consent tracking. ## PII Detection and Redaction ```python import re from dataclasses import dataclass from typing import Optional @dataclass class PiiScanResult: clean_text: str findings: list[dict] has_pii: bool PII_RULES = [ ("email", r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b'), ("phone", r'\b(?:\+1[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}\b'), ("ssn", r'\b\d{3}-\d{2}-\d{4}\b'), ("credit_card", r'\b(?:\d{4}[- ]?){3}\d{4}\b'), ("api_key", r'\bsk-or-v1-[a-zA-Z0-9]+\b'), ("ip_address", r'\b(?:\d{1,3}\.){3}\d{1,3}\b'), ] REPLACEMENTS = { "email": "[EMAIL]", "phone": "[PHONE]", "ssn": "[SSN]", "credit_card": "[CARD]", "api_key": "[API_KEY]", "ip_address": "[IP]", } def scan_and_redact(text: str) -> PiiScanResult: """Scan text for PII and return redacted version with findings.""" findings = [] clean = text for pii_type, pattern in PII_RULES: matches = re.findall(pattern, clean) for match in matches: findings.append({"type": pii_type, "value_prefix": match[:4] + "..."}) ...

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 Solid

pii-redaction

PII detection and redaction utilities for privacy-compliant conversational AI

1,034 Updated today
a5c-ai
AI & Automation Featured

anth-data-handling

Implement data privacy, PII handling, and compliance patterns for Claude API. Use when handling sensitive data, implementing PII redaction, or configuring data retention for GDPR/CCPA compliance with Claude. Trigger with phrases like "anthropic data privacy", "claude PII", "anthropic gdpr", "claude data handling", "redact data claude".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-data-handling

Implement data privacy for Cohere API calls with PII redaction and compliance. Use when handling sensitive data, implementing PII redaction before API calls, or ensuring GDPR/CCPA compliance with Cohere integrations. Trigger with phrases like "cohere data", "cohere PII", "cohere GDPR", "cohere data retention", "cohere privacy", "cohere redact".

2,266 Updated today
jeremylongshore
AI & Automation Listed

privacy-check

Evaluates product assumptions and plans for PII handling, user tracking, and data retention risks. Triggered during 'research' and 'blueprint' stages to enforce privacy-by-design.

0 Updated today
Gladisintelligible706
AI & Automation Featured

mistral-data-handling

Implement Mistral AI PII handling, data retention, and GDPR/CCPA compliance patterns. Use when handling sensitive data, implementing data redaction, configuring retention policies, or ensuring compliance with privacy regulations for Mistral AI integrations. Trigger with phrases like "mistral data", "mistral PII", "mistral GDPR", "mistral data retention", "mistral privacy".

2,266 Updated today
jeremylongshore