openrouter-data-privacy
Skill by jeremylongshore
Implements data privacy controls for OpenRouter API calls. It helps developers detect and redact PII, route sensitive prompts to approved providers, and handle GDPR and CCPA requirements.
Install openrouter-data-privacy
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/openrouter-data-privacy ~/.claude/skills/openrouter-data-privacyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install openrouter-data-privacy in Claude Code
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/openrouter-data-privacy ~/.gemini/antigravity-cli/skills/openrouter-data-privacyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install openrouter-data-privacy in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill adds privacy controls to code that sends prompts through OpenRouter to upstream LLM providers. It provides regex-based PII detection and redaction for emails, phone numbers, SSNs, credit card numbers, OpenRouter API keys and IP addresses. It also includes a placeholder substitution pattern that replaces PII before the API call and restores it in the model's reply.
The skill covers provider selection by data sensitivity, using a provider order with fallbacks disabled, and a middleware class that can either block or redact PII on every call. It also suggests hashing logged prompts with SHA-256 for GDPR right-to-erasure and using BYOK for the most sensitive workloads. It is aimed at developers building Python applications that handle personal or sensitive data through OpenRouter.
Written from the project's SKILL.md and checked against it.
What it can do
- PII detection and redactionScans text for emails, phones, SSNs, card numbers, API keys and IP addresses and replaces them with placeholders.
- Placeholder substitutionReplaces PII with placeholders before a request and restores the original values in the model's response.
- Provider selection for privacyMaps each sensitivity level to a model and a provider order with fallbacks turned off.
- Privacy middlewareRuns PII checks on every message and either raises an error or redacts the content, depending on settings.
- Prompt hashing for erasureSuggests hashing logged prompts with SHA-256 to support GDPR right-to-erasure.
What you need
- OpenRouter API key set as OPENROUTER_API_KEY
- Python 3.8 or later
- OpenAI Python SDK
- A sensitivity classification for workloads
- A list of providers approved for sensitive data
Try asking
- Scan this support message for PII and show me the redacted version.
- Set up a privacy-aware completion that routes sensitive prompts to Anthropic only.
- Add PII middleware that blocks requests containing emails or SSNs.
Good to know
- PII detection uses regex patterns, which can produce false positives.
- OpenRouter does not train on API data, but each upstream provider has its own retention and training policy.
- Example routing uses Anthropic as the only approved provider for standard and sensitive data.
Security check
B- Allowed to use Write, Edit without limitsIn
SKILL.md
Checked automatically: skills/.curated/openrouter-data-privacy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadWriteEditGrepBash(python3:*)
Alternatives to openrouter-data-privacy
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
openrouter-data-privacy: common questions
Does OpenRouter train on my API data?
The source says OpenRouter itself does not train on API data. Each upstream provider has its own data retention and training policies that you need to check separately.
Can the skill restore PII after the model responds?
Yes. The placeholder substitution pattern keeps a map of placeholders to original values and uses deanonymize() to restore them in the reply.
How does the skill help with GDPR right-to-erasure?
The source recommends not logging raw prompts and hashing them with SHA-256 instead.
How do I install openrouter-data-privacy?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is openrouter-data-privacy free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is openrouter-data-privacy safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.
What are alternatives to openrouter-data-privacy?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
