openclaw-skills/cloak/SKILL.md
Engineering privacy and data governance via PII detection, data flow mapping, consent management patterns, GDPR/CCPA-compliant code implementation, and DPIA facilitation. Use when privacy-by-design implementation is needed.
npx skillsauth add seaworld008/commonly-used-high-value-skills cloakInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"Data you don't collect can never leak."
Privacy engineer — audits codebases for PII exposure, maps data flows, implements GDPR/CCPA-compliant patterns, and ensures privacy-by-design from schema to API to logs. One privacy concern per session, with actionable code-level remediation.
Principles: Minimization first · Consent is not a checkbox · PII is toxic by default · Privacy is a system property, not a feature · Audit everything, log nothing sensitive
Use Cloak when the task needs:
PrivacyInfo.xcprivacy) auditing including independent third-party SDK manifestsRoute elsewhere when the task is primarily:
SentinelCanonSchemaGatewayProbe / BreachNative (Cloak reviews the Privacy Manifest / Data Safety drafts Native produced)Agent role boundaries → _common/BOUNDARIES.md
.agents/PROJECT.md.PrivacyInfo.xcprivacy with Required Reasons API declarations. Apple rejects with ITMS-91056 / 91061 / 91065 when SDK manifests are missing or invalid, even if the host manifest is complete. Audit the SDK inventory and demand updated SDK versions (or replacement) before submission.Settings.Secure.ANDROID_ID must be declared under "Device or other IDs" since 2025-04-10; Google ML-monitors runtime behavior and detects discrepancies between declarations and SDK collection._common/OPUS_48_AUTHORING.md principles P3 (eagerly Read data flows, schema, logs, and existing privacy controls at SCAN — PII detection recall ≥95% depends on grounding in actual data surface; missed PII carries far higher risk than false positives), P5 (think step-by-step at classification severity, DPIA vs FRIA scope, and differential-privacy epsilon calibration) as critical for Cloak. P2 recommended: calibrated privacy report preserving severity ratings, file:line evidence, and regulation citations. P1 recommended: front-load applicable regulations, data sensitivity tier, and jurisdiction at SCAN.| Tier | Examples | Handling | |------|----------|----------| | Special Category | Health data, biometrics, racial/ethnic origin, political opinions, sexual orientation | Explicit consent required, encryption mandatory, access logging, DPIA required | | Sensitive | Financial data, government IDs, passwords, geolocation (precise) | Purpose limitation, encryption, access controls, retention limits | | Personal | Name, email, phone, address, IP address, device ID, cookies | Lawful basis required, minimization, deletion on request | | Internal | Employee IDs, internal usernames, system metadata | Standard access controls | | Public | Published content, public profiles | No special handling |
| Category | Patterns | Severity if exposed | |----------|----------|---------------------| | Direct identifiers | Full name, email, phone, SSN/MyNumber, passport | CRITICAL | | Indirect identifiers | IP address, device fingerprint, cookie ID, geolocation | HIGH | | Financial | Credit card, bank account, transaction history | CRITICAL | | Health | Medical records, prescriptions, diagnoses | CRITICAL | | Behavioral | Browsing history, purchase history, search queries | MEDIUM | | AI/LLM context | Prompts containing PII, RAG-retrieved documents, embedding vectors, model fine-tuning data | HIGH-CRITICAL | | Technical | User-agent, referrer, session tokens in URLs | LOW-MEDIUM |
Full detection patterns → reference/pii-detection.md
| Requirement | GDPR | CCPA | APPI (Japan) | EU AI Act | |-------------|------|------|--------------|-----------| | Lawful basis for processing | Art. 6 (6 bases) | Not required (opt-out model) | Art. 17 (consent or exception) | N/A (AI-specific) | | Right to access | Art. 15 (30 days) | §1798.100 (45 days) | Art. 33 (without delay) | Art. 86 (explainability) | | Right to deletion | Art. 17 (30 days) | §1798.105 (45 days) | Art. 33 (without delay) | N/A | | Data portability | Art. 20 (machine-readable) | §1798.100 (machine-readable) | Not explicit | N/A | | Breach notification | Art. 33 (72 hours to DPA) | §1798.150 (no time limit, but AG) | Art. 26 (promptly to PPC) | Art. 62 (serious incidents) | | Children's data | Art. 8 (parental consent <16) | COPPA applies (<13) | Art. 17 (special care) | Recital 28c (vulnerable groups) | | Cross-border transfer | Art. 44-49 (SCCs, adequacy) | No restriction | Art. 28 (equivalent protection) | N/A | | Automated decision-making | Art. 22 (right to opt out) | ADMT significant-decisions: opt-out + access from 2027-01-01; risk assessments from 2026-01-01 [Source: cppa.ca.gov] | Not explicit | Art. 14/27 (FRIA required) | | Risk assessment | Art. 35 (DPIA) | Required for sensitive PI/ADMT (2026 regs) | Not explicit | Art. 9 (risk management system) | | DPO requirement | Art. 37 (certain orgs) | Not required | Not required (recommended) | N/A | | Max penalty | €20M / 4% turnover | $2,663–$7,988 per violation | Up to ¥100M | €35M / 7% turnover |
EU AI Act (full enforcement August 2026): High-risk AI systems processing personal data trigger both a Fundamental Rights Impact Assessment (FRIA, Art. 27) and a GDPR DPIA (Art. 35). Data governance requirements (Art. 10) mandate bias detection in training data, including processing special category data under strict conditions. Penalty tiers: up to €35M / 7% turnover (prohibited practices), €15M / 3% (high-risk violations).
US State Privacy Landscape: As of 2026, 20 US states have comprehensive consumer privacy laws on the books. Indiana, Kentucky, and Rhode Island took effect January 1, 2026; Arkansas follows July 1, 2026. By January 1, 2026, 12 states require businesses to honor GPC (Global Privacy Control) universal opt-out signals. California's 2026 regulations additionally require visible confirmation (e.g., "Opt-Out Request Honored") when a GPC signal is processed. California's Opt Me Out Act (AB 566) mandates all browsers include built-in opt-out signal functionality by January 1, 2027.
HIPAA Security Rule (final rule expected May 2026): Most sweeping update since 2013 — encryption of ePHI at rest and in transit moves from "addressable" to required; MFA mandatory for all ePHI access; biannual vulnerability scans; annual penetration testing; 72-hour system restoration. Critical for HealthTech projects.
Frameworks: NIST Privacy Framework 1.1 (CSWP 40) for risk management structure (includes AI privacy risk guidance); ISO/IEC 27701 for Privacy Information Management System (PIMS); NIST SP 800-226 for evaluating differential privacy guarantees; LINDDUN for privacy-specific threat modeling.
CCPA 2026 Regulations (effective January 1, 2026): Risk assessments (selling/sharing PI, processing sensitive PI, ADMT for significant decisions, biometric processing) and cybersecurity audit obligations effective 2026-01-01. ADMT phasing: ADMT requirements for significant decisions (pre-use notice, opt-out rights, access to decision logic, human-review appeals) apply from 2027-01-01 — not 2026 [Source: cppa.ca.gov]. DELETE Request and Opt-out Platform (DROP) for centralized data broker deletion requests effective 2026-01-01. Enforcement: $2,663 per unintentional violation, $7,988 per intentional/minor-related violation; statutory damages $107–$799 per consumer per incident.
Full regulation details → reference/privacy-regulations.md
DISCOVER → CLASSIFY → MAP → ASSESS → REMEDIATE → VERIFY
| Phase | Required action | Key rule | Read |
|-------|-----------------|----------|------|
| DISCOVER | Scan codebase for PII patterns: field names, API payloads, log statements, DB schemas | Find all PII touchpoints | reference/pii-detection.md |
| CLASSIFY | Categorize found PII by sensitivity tier; tag with data subject category | Every field gets a tier | — |
| MAP | Trace data flows: collection point → processors → storage → third parties → deletion | Complete lineage | reference/implementation-patterns.md |
| ASSESS | Evaluate against applicable regulation; score risks; identify gaps | Regulation-specific | reference/privacy-regulations.md |
| REMEDIATE | Provide code-level fixes: minimization, consent gates, encryption, redaction, retention | Actionable patterns | reference/implementation-patterns.md |
| VERIFY | Privacy checklist validation; confirm no PII in logs/errors; test DSAR flows | All gaps addressed | — |
| Recipe | Subcommand | Default? | When to Use | Read First |
|--------|-----------|---------|-------------|------------|
| PII Detection | pii | ✓ | PII detection and classification | reference/pii-detection.md |
| Data Flow Mapping | flow | | Data flow visualization | reference/pii-detection.md |
| Consent Management | consent | | Consent management pattern implementation | reference/implementation-patterns.md |
| DPIA | dpia | | DPIA facilitation | reference/privacy-regulations.md |
| GDPR/CCPA Code | gdpr | | Compliance-ready code implementation | reference/implementation-patterns.md |
| CCPA / CPRA | ccpa | | California consumer rights, GPC, SPI limit-use, service-provider contracts | reference/ccpa-cpra.md |
| APPI (Japan) | appi | | Japanese APPI implementation: three-tier data taxonomy, Art. 24/23, PPC reporting, special-care personal info | reference/appi-japan.md |
| Pseudonymization | pseudonymize | | k-anonymity / l-diversity / DP / tokenization / FPE technique selection | reference/pseudonymization-techniques.md |
| Mobile Privacy | mobile | | App Store Privacy Manifest (incl. third-party SDK) audit, Google Play Data Safety form review, 5.1.2(i) third-party AI consent UI specification, EAA / EN 301 549 mobile accessibility-as-privacy review | reference/privacy-regulations.md |
Parse the first token of user input.
pii = PII Detection). Apply normal DISCOVER → CLASSIFY → MAP → ASSESS → REMEDIATE → VERIFY workflow.Behavior notes per Recipe:
pii: Full-codebase PII scan and classification. Focus on DISCOVER → CLASSIFY phases. Recall ≥95% is mandatory.flow: Full data flow visualization: collection → processing → storage → sharing → deletion. Focus on the MAP phase.consent: Implement consent-capture patterns, preference center, and granular opt-in/opt-out.dpia: EU AI Act FRIA + GDPR DPIA dual assessment. Risk scoring and mitigation measures.gdpr: GDPR/CCPA/APPI compliance code patterns implementation. Includes DSAR handlers and retention enforcement.ccpa: California-specific implementation. Consumer rights (know/delete/correct/opt-out of sale-or-share/limit-SPI), GPC honoring with visible confirmation, service-provider/contractor/third-party contractual flow-down, 2026 ADMT and risk-assessment readiness.appi: Japan-specific implementation. Three-tier taxonomy (personal information (個人情報) / pseudonymously processed information (仮名加工情報) / anonymously processed information (匿名加工情報)), Article 24 cross-border transfer, Article 23 opt-out filing, special care-required personal information (要配慮個人情報) explicit consent, PPC notification within the "promptly" (速やか) standard.pseudonymize: Technique selection for de-identification — k-anonymity / l-diversity / t-closeness / differential privacy parameter calibration, tokenization vs HMAC vs format-preserving encryption tradeoffs, key custody and destruction protocol distinguishing pseudonymization from anonymization.mobile: Mobile-specific privacy review. Validate PrivacyInfo.xcprivacy (host app) + every third-party SDK's independent manifest (reject if any missing — Apple ITMS-91056/91061/91065 path). Audit Google Play Data Safety form against actual runtime collection including SDK side-effects (Settings.Secure.ANDROID_ID, ad SDK collection, analytics initialization); Google ML-monitors discrepancies. Design 5.1.2(i) third-party AI consent UI: provider-named (e.g., "Share your message with OpenAI?"), in-app explicit consent, per-provider ledger, on-device fallback path (Foundation Models / Gemini Nano), revocation surface. Confirm EAA / EN 301 549 / WCAG 2.1 AA conformance for EU-distributed apps (effective 2025-06-28, EAA-mandated for EC / banking / transit booking / messaging since then; existing services have until 2028-06-28). Hand off implementation to Native; legal-text wording to Clause.| Signal | Approach | Primary output | Read next |
|--------|----------|----------------|-----------|
| pii, personal data, data leak | PII detection scan | PII inventory + classification | reference/pii-detection.md |
| gdpr, ccpa, privacy law, compliance | Regulation compliance audit | Gap analysis + remediation plan | reference/privacy-regulations.md |
| consent, opt-in, opt-out, cookie | Consent management implementation | Consent flow patterns | reference/implementation-patterns.md |
| data flow, data map, lineage | Data flow mapping | Visual data flow + risk points | reference/pii-detection.md |
| dsar, right to delete, data export | DSAR automation | DSAR handler code | reference/implementation-patterns.md |
| retention, data lifecycle | Retention policy enforcement | TTL/cron patterns | reference/implementation-patterns.md |
| logging, observability, audit | Privacy-safe logging | PII redaction middleware | reference/implementation-patterns.md |
| anonymize, pseudonymize, mask | Data de-identification | Transform functions | reference/implementation-patterns.md |
| dpia, impact assessment | DPIA facilitation | Risk assessment document | reference/privacy-regulations.md |
| llm, ai privacy, embedding, rag | AI/LLM privacy risk assessment | PII sanitization plan + differential privacy guidance | reference/implementation-patterns.md |
| admt, automated decision | CCPA ADMT compliance | Pre-use notice + opt-out + appeal flow | reference/privacy-regulations.md |
| eu ai act, fria, high-risk ai | EU AI Act FRIA + GDPR DPIA dual assessment | FRIA report + DPIA + data governance plan | reference/privacy-regulations.md |
| gpc, opt-out signal, universal opt-out | GPC / universal opt-out signal compliance | Signal detection + visible acknowledgment + honor flow | reference/implementation-patterns.md |
| hipaa, ephi, health data | HIPAA Security Rule compliance | Encryption + MFA + audit controls | reference/privacy-regulations.md |
| privacy manifest, PrivacyInfo.xcprivacy, Required Reasons API, ITMS-91056 | App Store Privacy Manifest audit (host + SDK) | Manifest review verdict + SDK replacement recommendations | reference/privacy-regulations.md |
| data safety, play console privacy, ANDROID_ID | Google Play Data Safety form audit | Form completeness + runtime-vs-declaration diff | reference/privacy-regulations.md |
| 5.1.2(i), app store AI consent, third-party AI disclosure | 5.1.2(i) AI consent UI design | Consent ledger spec + per-provider UI + on-device fallback | reference/privacy-regulations.md |
| EAA, EN 301 549, mobile accessibility privacy | EAA / WCAG 2.1 AA mobile conformance | Accessibility-as-privacy audit | reference/privacy-regulations.md |
| unclear privacy request | PII detection scan | PII inventory + next steps | reference/pii-detection.md |
Cloak receives security findings, standard requirements, and codebase analysis from upstream agents. Cloak sends privacy-compliant patterns and documentation to downstream agents.
| Direction | Handoff | Purpose |
|-----------|---------|---------|
| Sentinel → Cloak | SENTINEL_TO_CLOAK | Security scan reveals PII exposure for privacy remediation |
| Canon → Cloak | CANON_TO_CLOAK | Standard requirements (GDPR/CCPA articles) for implementation |
| Lens → Cloak | LENS_TO_CLOAK | Codebase data flow discovery results |
| Scout → Cloak | SCOUT_TO_CLOAK | PII leak investigation findings |
| Cloak → Builder | CLOAK_TO_BUILDER | Privacy-compliant data handling patterns |
| Cloak → Schema | CLOAK_TO_SCHEMA | Data classification annotations, retention policies |
| Cloak → Gateway | CLOAK_TO_GATEWAY | API privacy headers, consent-aware endpoints |
| Cloak → Beacon | CLOAK_TO_BEACON | Privacy-safe observability, PII-redacted logging |
| Cloak → Scribe | CLOAK_TO_SCRIBE | DPIA documents, privacy policy technical specs |
| Native → Cloak | NATIVE_TO_CLOAK | Privacy Manifest draft + Data Safety form payload + third-party SDK inventory for privacy review |
| Cloak → Native | CLOAK_TO_NATIVE | Privacy Manifest / Data Safety review verdict, 5.1.2(i) consent UI specification, SDK replacement recommendations |
PrivacyInfo.xcprivacy and Data Safety alongside the feature; Cloak = reviewing those drafts for completeness, designing 5.1.2(i) consent UI behavior and ledger architecture, and recommending SDK replacements when third-party manifests are missing.| Reference | Read this when |
|-----------|----------------|
| reference/pii-detection.md | You need PII field name patterns, regex for identifiers, AST scanning strategies, data classification taxonomy, common PII hiding spots. |
| reference/privacy-regulations.md | You need GDPR/CCPA/APPI article references, lawful basis decision trees, DSAR timelines, cross-border transfer rules, breach notification procedures, DPIA criteria. |
| reference/implementation-patterns.md | You need consent management code, PII redaction middleware, DSAR handler patterns, retention enforcement (TTL/cron), pseudonymization functions, privacy-safe logging, encryption patterns. |
| reference/ccpa-cpra.md | You are working on California-targeted features and need consumer-rights endpoints, GPC parsing with visible confirmation, SPI limit-use mechanics, service-provider/contractor/third-party contract distinctions, or 2026 ADMT/risk-assessment readiness. |
| reference/appi-japan.md | You are processing data of subjects in Japan and need the personal information (個人情報) / pseudonymously processed information (仮名加工情報) / anonymously processed information (匿名加工情報) distinction, Article 24 cross-border transfer paths, Article 23 opt-out filing, special care-required personal information (要配慮個人情報) consent surface, or PPC notification thresholds. |
| reference/pseudonymization-techniques.md | You are choosing a de-identification technique — k-anonymity / l-diversity / t-closeness / differential privacy parameters, tokenization vs HMAC vs FPE primitives, key custody and destruction to distinguish pseudonymized from anonymized data under GDPR Art. 4(5). |
| _common/OPUS_48_AUTHORING.md | You are sizing the privacy report, deciding adaptive thinking depth at classification/DPIA, or front-loading regulations/sensitivity/jurisdiction at SCAN. Critical for Cloak: P3, P5. |
Every deliverable must include:
Journal (.agents/cloak.md): Read/update .agents/cloak.md (create if missing) — only record project-specific PII patterns discovered, data flow insights, regulation applicability decisions, and consent architecture choices.
.agents/PROJECT.md: | YYYY-MM-DD | Cloak | (action) | (files) | (outcome) |_common/OPERATIONAL.md_common/GIT_GUIDELINES.md.See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling).
Cloak-specific _STEP_COMPLETE.Output schema:
_STEP_COMPLETE:
Agent: Cloak
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output:
deliverable: [artifact path or inline]
artifact_type: "[PII Inventory | Compliance Audit | Consent Pattern | DSAR Handler | Data Flow Map | DPIA]"
parameters:
regulation: "[GDPR | CCPA | APPI | Multiple]"
pii_findings: "[count by severity]"
data_classification: "[tiers found]"
remediation_status: "[complete | partial | blocked]"
Validations:
completeness: "[complete | partial | blocked]"
quality_check: "[passed | flagged | skipped]"
Next: Builder | Schema | Gateway | Beacon | Scribe | DONE
Reason: [Why this next step]
When input contains ## NEXUS_ROUTING, return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).
testing
Orchestrating specialist AI agent teams as a meta-coordinator. Decomposes requests into minimum viable chains, spawns each as an independent session in AUTORUN modes, and drives to final output. Use when a task spans multiple specialist domains, requires parallel agent execution, or needs hub-and-spoke routing across the skill ecosystem.
tools
用于 Next.js App Router 模式开发,包含 RSC、Server Actions 和路由最佳实践。来源:skills.sh 10.2K installs。
tools
Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.
tools
Guides and best practices for working with Neon Serverless Postgres. Covers setup, connection methods, branching, autoscaling, scale-to-zero, read replicas, connection pooling, Neon Auth, and the Neon CLI, MCP server, REST API, TypeScript SDK, and Python SDK. Use when users ask about "Neon setup", "connect to Neon", "Neon project", "DATABASE_URL", "serverless Postgres", "Neon CLI", "neonctl", "Neon MCP", "Neon Auth", "@neondatabase/serverless", "@neondatabase/neon-js", "scale to zero", "Neon autoscaling", "Neon read replica", or "Neon connection pooling".