deepread-pii
安装 / 下载方式
TotalClaw CLI推荐
totalclaw skills install shop:github:LeoYeAI~openclaw-master-skills~deepread-piicURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/github%3ALeoYeAI~openclaw-master-skills~deepread-pii/file -o deepread-pii.md---
name: deepread-pii
title: DeepRead PII Redaction
description: Redact PII from documents before sharing or sending to LLMs. 14 PII types (names, SSN, credit cards, medical records, etc.) detected with context-aware AI — not regex. Knows patient vs. doctor, personal vs. institutional. Black bar redaction on PDFs, scanned images, and text files. Free tier: 2,000 pages/month.
metadata:
openclaw:
requires:
env:
- DEEPREAD_API_KEY
primaryEnv: DEEPREAD_API_KEY
homepage: https://www.deepread.tech
---
# DeepRead PII — Document Redaction API
Your agent processes documents. Some of those documents contain names, SSNs, medical records, credit card numbers. Before that data flows to another API, a database, a teammate, or an LLM — **it needs to be clean.**
```
Input: "Invoice to: John Smith, 123 Oak St, SSN: 456-78-9012, Card: 4532-1234-5678-9012"
Output: "Invoice to: ██████████, ██████████, SSN: ███████████, Card: ███████████████████"
```
**One API call. Document in, redacted copy + detection report back.**
DeepRead PII detects 14 types of personally identifiable information using context-aware AI — not regex. It knows "Dr. Sarah Chen" on a hospital letterhead is the physician (skip), but "Sarah Chen" on a patient intake form is the patient (redact). No regex rules to write. No word lists to maintain. No false positive floods.
> This skill instructs the agent to POST your file to `https://api.deepread.tech`, poll for results, and download the redacted copy. No system files are modified and no elevated permissions are requested.
## What This Skill Does
- **14 PII types detected**: Names, SSNs, credit cards, emails, phones, addresses, dates of birth, passport numbers, driver's licenses, bank accounts, IBANs, IPs, URLs, medical record numbers
- **Black bar redaction**: PII replaced with solid black bars — text physically removed from the PDF content stream, irreversible, not just a visual overlay
- **Any document format**: PDF (digital + scanned), PNG, JPEG, plain text
- **Context-aware**: AI distinguishes personal vs. institutional, patient vs. provider, form labels vs. actual values
- **Audit trail**: Every redaction logged with detection counts per type. See DeepRead's [privacy policy](https://www.deepread.tech/privacy) for data handling details.
- **Copy-paste proof**: Redacted text cannot be recovered via copy-paste, text selection, or PDF parsing
- **Free tier**: 2,000 pages/month (no credit card required)
- **Works with other DeepRead skills**: Extract data with `deepread-ocr`, fill forms with `deepread-form-fill`, then redact the originals
## Setup
### 1. Get Your API Key
Sign up and create an API key:
```bash
# Visit the dashboard
https://www.deepread.tech/dashboard
# Or use this direct link
https://www.deepread.tech/dashboard/?utm_source=clawhub
```
Save your API key:
```bash
export DEEPREAD_API_KEY="sk_live_your_key_here"
```
### 2. Configuration (Optional)
Add to your `clawdbot.config.json5`:
```json5
{
skills: {
entries: {
"deepread-pii": {
enabled: true
// API key is read from DEEPREAD_API_KEY environment variable
// Do NOT hardcode your API key here
}
}
}
}
```
### 3. Redact Your First Document
**Option A: With Webhook (Recommended)**
```bash
curl -X POST https://api.deepread.tech/v1/pii/redact \
-H "X-API-Key: $DEEPREAD_API_KEY" \
-F "file=@document.pdf" \
-F "webhook_url=https://your-app.com/webhooks/pii"
# Returns immediately:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued"
}
# Your webhook receives results when processing completes
```
**Option B: Poll for Results**
```bash
curl -X POST https://api.deepread.tech/v1/pii/redact \
-H "X-API-Key: $DEEPREAD_API_KEY" \
-F "file=@patient_record.pdf"
# Returns immediately:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued"
}
# Poll until completed:
curl https://api.deepread.tech/v1/pii/550e8400-e29b-41d4-a716-446655440000 \
-H "X-API-Key: $DEEPREAD_API_KEY"
```
## Usage Examples
### Redact a PDF
Replaces all detected PII with solid black bars. Text is physically removed from the PDF content stream. Copy-paste cannot recover it.
```bash
curl -X POST https://api.deepread.tech/v1/pii/redact \
-H "X-API-Key: $DEEPREAD_API_KEY" \
-F "file=@contract.pdf"
```
**Response when completed:**
```json
{
"id": "550e8400-...",
"status": "completed",
"progress_percent": 100,
"redacted_file_url": "https://...(signed URL)...",
"report": {
"id": "550e8400-...",
"page_count": 5,
"processing_time_ms": 3421,
"pii_detected": {
"NAME": {
"count": 3,
"pages": [1, 2],
"confidence_avg": 0.92
},
"PHONE": {
"count": 2,
"pages": [1],
"confidence_avg": 0.89
},
"EMAIL": {
"count": 1,
"pages": [2],
"confidence_avg": 0.97
}
},
"total_redactions": 6,
"redaction_policy": "black_bar",
"confidence_threshold_used": 0.85,
"below_threshold_count": 0
}
}
```
### Redact an Image
Works on scanned documents, photos of IDs, screenshots — any PNG or JPEG.
```bash
curl -X POST https://api.deepread.tech/v1/pii/redact \
-H "X-API-Key: $DEEPREAD_API_KEY" \
-F "file=@drivers_license.png"
```
Vision AI detects PII in the image, locates exact positions, and draws black bars over the text.
### Redact Plain Text
```bash
curl -X POST https://api.deepread.tech/v1/pii/redact \
-H "X-API-Key: $DEEPREAD_API_KEY" \
-F "file=@notes.txt"
```
**Before:** `Patient John Smith, SSN 456-78-9012, called from (555) 867-5309`
**After:** `Patient ██████████, SSN ███████████, called from ██████████████`
### Multi-Language Support
Supports documents in English, Chinese, Spanish, Hindi, and Arabic.
```bash
curl -X POST https://api.deepread.tech/v1/pii/redact \
-H "X-API-Key: $DEEPREAD_API_KEY" \
-F "file=@documento.pdf" \
-F "language=es"
```
**Supported languages:** `en` (default), `zh`, `es`, `hi`, `ar`
## When to Use This Skill
### Use DeepRead PII For:
- **Before sharing documents externally** — redact before sending to vendors, partners, opposing counsel
- **Before feeding documents to LLMs** — strip PII before sending content to any AI model
- **Compliance workflows** — GDPR right to erasure, HIPAA de-identification, CCPA requests
- **Training data preparation** — create clean datasets from real documents
- **Insurance claims** — redact claimant PII before adjuster handoff
- **Legal discovery** — privilege review with PII protection
- **Medical records** — de-identify patient data for research or sharing
- **Financial documents** — mask account numbers, SSNs on statements
- **HR documents** — clean employee files before audits
### Don't Use For:
- **Real-time processing** — async workflow, not instant (use webhooks)
- **Structured data extraction** — use `deepread-ocr` skill for that, then redact
- **Documents with no text** — blank images or decorative PDFs
## How It Works
### 3-Layer Detection Pipeline
```
Document → AI Detection → Threshold Filter → Context Validation → Redact
```
**Layer 1: AI Detection**
- Text documents: LLM scans for all 14 PII types with confidence scoring
- Images/scans: Vision model detects PII with precise bounding box coordinates
- Returns type, exact value, and confidence score (0.0–1.0) for each detection
**Layer 2: Confidence Threshold**
- Default threshold: 0.85
- Detections below threshold are recorded but NOT redacted
- Reported separately as `below_threshold_count` for manual review
**Layer 3: Context-Aware Validation**
- Second AI pass with full document context
- Filters false positives that regex-based tools can't handle:
- `admissions@university.edu` → institutional email, SKIP
- `john.smith@gmail.com` → personal email, REDACT
- "Dr. Sarah Chen" on letterhead → physician, SKIP
- "Sarah Chen" on intake form → patient, REDACT
- "Name:" (form label) → not PII, SKIP
- "Jo