03-custom-skills/examples/compliance-audit/SKILL.md
This skill should be used when performing legal and regulatory compliance audits on software projects. It covers GDPR, CCPA/CPRA, ePrivacy Directive, HIPAA, PCI DSS, SOC 2, and WCAG 2.2 accessibility. The skill generates a full compliance package: audit report with severity ratings, automatic code fixes, legal document templates (Privacy Policy, Cookie Policy, DPA, DPIA), and data flow diagrams. This skill should be triggered when the user asks to check compliance, audit privacy, generate legal documents, review data handling, or ensure regulatory readiness for any project type (web, mobile, API, desktop).
npx skillsauth add escapeboy/ai-prompts compliance-auditInstall 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.
Note on
references/,scripts/,assets/: this skill demonstrates the progressive-disclosure layout from guide.md — the SKILL.md holds the workflow, while per-regulation checklists, the scan script, and legal templates live in companion files you author for your own jurisdiction set. The workflow below is complete without them; the companion files add depth.
Perform comprehensive legal and regulatory compliance audits on software projects. Generate actionable reports, apply automatic code fixes, and produce required legal documentation.
| Regulation | Scope | Reference File |
|-----------|-------|---------------|
| GDPR | EU personal data protection | references/gdpr.md |
| CCPA/CPRA | California consumer privacy | references/ccpa.md |
| ePrivacy | EU cookies, tracking, electronic communications | references/eprivacy.md |
| HIPAA | US health information protection | references/hipaa.md |
| PCI DSS | Payment card data security | references/pci-dss.md |
| SOC 2 | Service organization controls | references/soc2.md |
| WCAG 2.2 | Web accessibility | references/wcag.md |
.env, config/, settings/)Perform automated detection of:
Then perform manual analysis using the regulation-specific checklists from references/.
Classify each finding using this scale:
| Severity | Description | Action Required | |----------|-------------|-----------------| | CRITICAL | Active data breach risk, legal violation | Immediate fix required | | HIGH | Missing required compliance mechanism | Fix before launch/next release | | MEDIUM | Incomplete implementation, partial compliance | Fix within 30 days | | LOW | Best practice recommendation, improvement opportunity | Plan for future sprint | | INFO | Informational, documentation suggestion | Optional |
Generate a compliance audit report in markdown format at compliance-report.md in the project root. The report structure:
# Compliance Audit Report
**Project:** [name]
**Date:** [date]
**Auditor:** Claude Code Compliance Audit
**Applicable Regulations:** [list]
## Executive Summary
[2-3 paragraph overview with overall compliance score]
## Findings by Regulation
### [Regulation Name]
#### [Finding Title] — [SEVERITY]
- **Location:** `file:line`
- **Issue:** [description]
- **Requirement:** [specific article/section]
- **Recommendation:** [fix description]
- **Auto-fix available:** Yes/No
## Data Flow Diagram
[Mermaid diagram showing personal data flows]
## Compliance Score
| Regulation | Score | Status |
|-----------|-------|--------|
| GDPR | X/100 | Pass/Partial/Fail |
## Required Legal Documents
[List of documents that need to be generated]
## Action Plan
[Prioritized list of fixes with effort estimates]
For findings marked as auto-fixable, apply fixes directly:
Always create a backup or work on a branch. Present each fix for user approval before applying.
Based on findings, generate required documents from templates in assets/:
| Template | When to Generate |
|----------|-----------------|
| assets/privacy-policy-template.md | Always (any personal data handling) |
| assets/cookie-policy-template.md | When cookies or tracking detected |
| assets/dpa-template.md | When processing data for third parties |
| assets/dpia-template.md | When high-risk processing identified |
Customize templates with project-specific:
Generate a Mermaid data flow diagram showing:
To identify compliance issues, search for these patterns:
grep -ri "password\|secret\|api.key\|token" --include="*.log" — secrets in logsgrep -ri "console\.log\|print\|logger" | grep -i "email\|phone\|ssn\|password" — PII logginggrep -ri "http://" --include="*.{js,ts,py,rb,php}" — insecure HTTPgrep -ri "eval\|exec\|system\|passthru" — injection risksMaintain detection patterns per stack in references/code-patterns.md:
After a full audit, the following files should be generated in the project:
compliance-report.md — Full audit report with findings
docs/legal/privacy-policy.md — Customized Privacy Policy
docs/legal/cookie-policy.md — Customized Cookie Policy (if applicable)
docs/legal/dpa.md — Data Processing Agreement (if applicable)
docs/legal/dpia.md — Data Protection Impact Assessment (if high-risk)
development
Audit or install maximum-depth 1Password integration in the current project — fetches fresh 1Password developer docs first, detects existing integration, and either reviews/improves it or greenfield-installs (Service Account secret resolution + site-compat autocomplete/well-known). Stack-aware (Laravel, Node/Next, Python, Ruby/Rails, Go). Use when the user says "integrate 1Password", "make this site 1Password-friendly", "audit our 1P integration", or invokes /onepassword-integrate.
development
Optimize PNG and JPEG images locally using pngquant and mozjpeg/jpegtran — TinyPNG-level compression without API keys.
development
Merges all feature branches into develop, syncs master/main with develop, commits any uncommitted changes, and deletes all feature branches (local and remote). Handles git submodules automatically. Use when you want to clean up branches and leave only develop and master/main in sync.
testing
Three-phase autonomous bug fix — investigate all occurrences, fix with full coverage, validate with regression test. Prevents partial fixes (the