jeremylongshore/claude-code-plugins-plus-skills/posthog-data-handling
Claude Code and agent skill by jeremylongshore/claude-code-plugins-plus-skills
- community
Checking that the SKILL.md file is still in the repository.
Implement consent-aware PostHog collection, PII minimization, masking, retention, and deletion workflows. Use when analytics must satisfy a documented privacy or data-governance requirement. Trigger with "PostHog privacy", "PostHog PII", or "PostHog GDPR".
Install
npx vskill@latest install jeremylongshore/claude-code-plugins-plus-skills/posthog-data-handlingSKILL.md
PostHog Data Handling
Overview
Privacy-safe analytics with PostHog. Covers property sanitization to strip PII before events leave the browser, consent-based tracking (opt-in/opt-out), GDPR data subject access requests and deletion, and PostHog's built-in privacy controls (IP masking, session recording masking).
Prerequisites
- PostHog project with current privacy, retention, and deletion capabilities verified for its deployment model
posthog-jsand/orposthog-nodeinstalled- Privacy policy covering analytics data collection
- Cookie consent mechanism (e.g., CookieConsent banner)
Authentication
- Browser capture uses the public project token; do not treat it as a secret or grant it private API access.
- Subject-access, export, and deletion operations use a least-privilege personal API key or OAuth token against the private regional API host.
- Load private credentials from a server-side secret manager, redact them from logs, and never expose them through client bundles or analytics properties.
- Confirm the target project ID and US or EU region before any destructive privacy operation.
Instructions
Tool discipline
Use Read to inspect the relevant configuration and implementation before proposing changes. Use Write only for a new, explicitly requested artifact inside the target project. Use Edit for minimal changes to existing project files after the evidence pass.
Step 1: Privacy-Safe Initialization
Step 2: Consent-Based Tracking
Step 3: GDPR Data Subject Access Request (SAR)
Step 4: GDPR Right to Erasure (Data Deletion)
Step 5: Property Filtering for Data Exports
Error Handling
| Issue | Cause | Solution | |
|---|---|---|---|
| PII in autocapture events | Form data captured automatically | Disable autocapture, use manual capture | |
| IP address in events | Not stripped by sanitize_properties | Add delete properties['$ip'] | |
| Consent not persisted | opt_out state lost on reload | Store consent in cookie, call opt_out on load | |
| Deletion API returns 404 | Wrong person ID or already deleted | Search by email first, check response | |
| Session recordings show PII | Text not masked | Add maskAllInputs: true and maskTextSelector |
GDPR Compliance Checklist
- [ ]
sanitize_propertiesstrips PII before events leave browser - [ ] Consent mechanism with
opt_in_capturing/opt_out_capturing - [ ]
respect_dnt: truein PostHog init - [ ] Session recording masks all inputs
- [ ] Subject Access Request handler implemented
- [ ] Data Deletion handler implemented
- [ ] Privacy policy updated to mention PostHog analytics
Output
- Privacy-safe PostHog initialization with property sanitization
- Consent-based tracking with opt-in/opt-out
- GDPR Subject Access Request handler
- GDPR Data Deletion handler
- PII-safe data export function
Examples
For a consent-gated web app, start opted out, enable capture only after the consent signal, mask sensitive elements, reject prohibited properties before send, and test both consent states. Produce a data map and identify any deletion step that requires private-API authorization.
Resources
See official PostHog references for current authority and verification boundaries.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/saas-packs/posthog-pack/skills/posthog-data-handling/SKILL.md
Popularity
- Repository stars
- 1,695
- Repository forks
- 214
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jeremylongshore/claude-code-plugins-plus-skills/posthog-data-handling)