privacy-reviewer
Review PII handling, encryption, and GDPR/CCPA compliance in Rails applications.
What this skill does
# Privacy Compliance Review
Review PII identification, encryption, data deletion, and regulatory compliance.
## PII Identification Checklist
| Category | Examples | Treatment |
|----------|----------|-----------|
| Direct identifiers | Name, email, phone, SSN | Encrypt at rest |
| Indirect identifiers | IP address, device ID | Hash or encrypt |
| Location data | GPS, address, zip code | Encrypt, retention limits |
| Financial | Card numbers, bank accounts | PCI compliance required |
| Health | Medical records, conditions | HIPAA compliance required |
| Behavioral | Browsing history, preferences | Consent required |
## Encryption for Sensitive Fields
```ruby
# Rails 7+ built-in encryption
class User < ApplicationRecord
encrypts :ssn
encrypts :date_of_birth
encrypts :medical_notes, deterministic: false # Non-searchable
end
# Configuration in credentials
# active_record_encryption:
# primary_key: <32-byte key>
# deterministic_key: <32-byte key>
# key_derivation_salt: <salt>
```
## Right to Deletion (GDPR Article 17)
```ruby
# PROBLEM: Hard delete loses audit trail
user.destroy
# SOLUTION: Anonymization with audit preservation
def anonymize!
transaction do
update!(
email: "deleted_#{id}@anonymized.local",
name: "Deleted User",
phone: nil,
address: nil,
deleted_at: Time.current
)
# Keep orders for accounting, anonymize PII
orders.update_all(
customer_name: "Anonymized",
shipping_address: nil
)
end
end
```
## Data Retention
```ruby
# Automated cleanup job
class PiiRetentionJob < ApplicationJob
def perform
# Delete inactive users after retention period
User.where("last_activity_at < ?", 3.years.ago)
.find_each(&:anonymize!)
# Purge old logs
AuditLog.where("created_at < ?", 7.years.ago).delete_all
end
end
```
## Audit Trails
```ruby
# Track PII access
class PiiAccessLog < ApplicationRecord
belongs_to :user # Whose data was accessed
belongs_to :accessed_by, class_name: 'User'
# Log: what, when, why, who
# user_id, accessed_by_id, field_accessed, purpose, created_at
end
# In model
def ssn
PiiAccessLog.create!(user: self, accessed_by: Current.user, field_accessed: 'ssn')
super
end
```
## Consent Management
```ruby
class UserConsent < ApplicationRecord
belongs_to :user
# Track: what consented, when, version, withdrawal
# consent_type, granted_at, policy_version, withdrawn_at
end
# Check before processing
def can_send_marketing?(user)
user.consents.active.exists?(consent_type: 'marketing')
end
```
## Data Export (GDPR Article 20)
```ruby
def export_personal_data
{
profile: attributes.slice('name', 'email', 'phone'),
orders: orders.map(&:export_data),
activity: activity_logs.map(&:export_data),
exported_at: Time.current.iso8601
}.to_json
end
```
## Review Checklist
- [ ] All PII fields identified and documented?
- [ ] Sensitive fields encrypted at rest?
- [ ] Anonymization method exists for deletion requests?
- [ ] Data retention policies implemented?
- [ ] PII access logged for audit?
- [ ] Consent tracked before data processing?
- [ ] Data export available for portability requests?
## Output Format
```markdown
## Privacy Review: [PASS/WARN/FAIL]
### Unencrypted PII
- [model.field]: [PII type, should be encrypted]
### Deletion Compliance
- [issue]: [hard deletes without anonymization option]
### Missing Audit Trails
- [model]: [PII accessed without logging]
### Consent Gaps
- [feature]: [processes data without consent check]
### Recommendations
1. [Prioritized fixes]
```
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.