home / skills / phrazzld / claude-config / log-posthog-issues

log-posthog-issues skill

/skills/log-posthog-issues

This skill runs a PostHog audit, generates one issue per finding, and links them with appropriate labels and acceptance criteria.

npx playbooks add skill phrazzld/claude-config --skill log-posthog-issues

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.4 KB
---
name: log-posthog-issues
description: |
  Run /check-posthog, then create GitHub issues for all findings.
  Each finding becomes a separate, actionable issue with clear acceptance criteria.
  Invoke for: PostHog audit to issues, analytics backlog creation.
effort: medium
---

# /log-posthog-issues

Run `/check-posthog`, then create GitHub issues for all findings.

## What This Does

1. Run `/check-posthog` to identify issues
2. Create one GitHub issue per finding
3. Label and prioritize appropriately
4. Link related issues together

## Issue Template

```bash
gh issue create \
  --title "[PostHog] $TITLE" \
  --label "posthog,priority/$PRIORITY" \
  --body "$(cat <<'EOF'
## Problem

$DESCRIPTION

## Impact

$IMPACT

## Acceptance Criteria

$CRITERIA

## References

- ~/.claude/skills/posthog/references/$REF
- PostHog docs: $DOC_LINK

---
Created by `/log-posthog-issues` audit
EOF
)"
```

## Issue Mapping

### P0: SDK Not Initialized

```bash
gh issue create \
  --title "[PostHog] SDK not initialized - no events being tracked" \
  --label "posthog,priority/p0,bug" \
  --body "$(cat <<'EOF'
## Problem

PostHog SDK is not initialized. No analytics events are being tracked.

## Impact

- Zero visibility into user behavior
- Cannot track conversions or feature usage
- Blind to product performance

## Acceptance Criteria

- [ ] `initPostHog()` called in PostHogProvider
- [ ] Provider wraps app in layout.tsx
- [ ] Events visible in PostHog Live Events
- [ ] `posthog.__loaded` returns true in console

## References

- ~/.claude/skills/posthog/references/sdk-patterns.md
- https://posthog.com/docs/libraries/js
EOF
)"
```

### P1: No Reverse Proxy

```bash
gh issue create \
  --title "[PostHog] No reverse proxy - events blocked by ad blockers" \
  --label "posthog,priority/p1,enhancement" \
  --body "$(cat <<'EOF'
## Problem

PostHog requests go directly to posthog.com, which gets blocked by ad blockers.

## Impact

- ~20-30% of users have ad blockers
- Events from those users are lost
- Analytics data is incomplete

## Acceptance Criteria

- [ ] next.config.js has rewrite rules for /ingest/*
- [ ] posthog.init uses api_host: '/ingest'
- [ ] Events work with ad blocker enabled

## References

- ~/.claude/skills/posthog/references/sdk-patterns.md#reverse-proxy
- https://posthog.com/docs/libraries/js#proxy-mode
EOF
)"
```

### P1: Privacy Masking Missing

```bash
gh issue create \
  --title "[PostHog] Privacy masking not configured - PII exposure risk" \
  --label "posthog,priority/p1,security" \
  --body "$(cat <<'EOF'
## Problem

PostHog privacy settings not configured. Text content and input values may be captured.

## Impact

- Autocapture may leak PII
- Session recordings show actual input values
- GDPR/privacy compliance risk

## Acceptance Criteria

- [ ] mask_all_text: true in init config
- [ ] session_recording.maskAllInputs: true
- [ ] person_profiles: 'identified_only'
- [ ] Session replays show *** for inputs

## References

- ~/.claude/skills/posthog/references/privacy-checklist.md
- https://posthog.com/docs/session-replay/privacy
EOF
)"
```

### P2: No Standard Events

```bash
gh issue create \
  --title "[PostHog] No typed event schema - inconsistent tracking" \
  --label "posthog,priority/p2,enhancement" \
  --body "$(cat <<'EOF'
## Problem

No typed event schema. Events tracked with arbitrary names and properties.

## Impact

- Inconsistent event names across codebase
- Hard to build reliable funnels
- Cross-product analytics not possible

## Acceptance Criteria

- [ ] StandardEvent type defined
- [ ] trackEvent function enforces types
- [ ] user_signed_up, subscription_started events tracked
- [ ] TypeScript errors on invalid event names

## References

- ~/.claude/skills/posthog/references/sdk-patterns.md#standard-events
EOF
)"
```

## Labels

Ensure these labels exist:

```bash
gh label create posthog --color 1C4068 --description "PostHog analytics" 2>/dev/null || true
gh label create priority/p0 --color B60205 --description "Critical" 2>/dev/null || true
gh label create priority/p1 --color D93F0B --description "High" 2>/dev/null || true
gh label create priority/p2 --color FBCA04 --description "Medium" 2>/dev/null || true
gh label create priority/p3 --color 0E8A16 --description "Low" 2>/dev/null || true
```

## Output

Report:
- Number of issues created
- Links to each issue
- Priority distribution

## Related

- `/check-posthog` - Audit only (no issues)
- `/fix-posthog` - Fix issues directly
- `/posthog` - Full lifecycle workflow

Overview

This skill runs a PostHog audit (/check-posthog) and converts every finding into a separate, actionable GitHub issue. Each issue is created with clear impact, acceptance criteria, labels, and priority. The skill also links related issues and produces a summary report of created issues and priority distribution.

How this skill works

The skill invokes the PostHog checker to gather findings, then maps each finding to a predefined issue template. It uses the GitHub CLI to create one issue per finding, applies the posthog and priority/* labels, and inserts acceptance criteria and references. Finally, it returns a report with issue links and counts per priority.

When to use it

  • After running a PostHog audit to convert findings into tracked work
  • When preparing an analytics backlog for engineering or product teams
  • Before a release to ensure tracking and privacy requirements are addressed
  • When onboarding analytics ownership to create tickets from diagnostics

Best practices

  • Run /check-posthog first and review findings before creating issues
  • Verify label existence in the repository (posthog and priority/*) to avoid label errors
  • Review acceptance criteria for accuracy and add repository-specific references
  • Link related issues manually if the automated link needs adjustment
  • Prioritize P0/P1 items for immediate fixes and batch P2/P3 into roadmap work

Example use cases

  • Detect missing SDK initialization and create a P0 bug with reproduction and acceptance criteria
  • Identify lack of reverse proxy and generate a P1 enhancement with required config changes
  • Flag missing privacy masking as a P1 security issue with masking checklist
  • Create P2 tickets for absent typed event schema and enforcement tasks
  • Produce a report summarizing number of issues and priority distribution for sprint planning

FAQ

Can I customize the issue templates or labels?

Yes. Update the templates and label names in the skill configuration or the repository before running the skill to match your conventions.

Does the skill fix issues automatically?

No. This skill only creates GitHub issues. Use the /fix-posthog workflow to attempt automated fixes or assign to engineers.