SKILL CODE ANALYSIS

Mixpanel Analytics

Mixpanel analytics tracking implementation + review skill for Django optimo_analytics: add events and audit for PII safety, schema design, and code quality.

Overview

Mixpanel analytics tracking implementation + review skill for Django optimo_analytics: add events and audit for PII safety, schema design, and code quality.

This skill ships inside the Mixpanel Analytics plugin and can be installed through the Claude Code marketplace or directly in Codex from its skill path.

Parent Surface

Parent docs: Mixpanel Analytics

Related wrapper commands from the parent plugin:

/mixpanel-analytics:implement/mixpanel-analytics:review

When to Use This Skill

Use this Skill in the Django4Lyfe backend when working with MixPanel analytics tracking in the optimo_analytics module:

or update existing ones following established patterns (7-step checklist).

correctness, PII protection, and adherence to Django4Lyfe standards.

  • /mixpanel-analytics:implement – to implement new MixPanel tracking events or update existing ones following established patterns (7-step checklist).
  • /mixpanel-analytics:review – to review MixPanel implementations for correctness, PII protection, and adherence to Django4Lyfe standards.

Example Prompts

user completes their profile setup."

for survey reminder notifications."

/mixpanel-analytics:implement."

for PII violations and pattern compliance."

this feature branch."

  • "Use /mixpanel-analytics:implement to add a new event for tracking when a user completes their profile setup."
  • "Run /mixpanel-analytics:implement svc.surveys.reminder_sent to add tracking for survey reminder notifications."
  • "Implement MixPanel tracking for the new HRIS CSV validation feature using /mixpanel-analytics:implement."
  • "Run /mixpanel-analytics:review staged to check my staged MixPanel changes for PII violations and pattern compliance."
  • "Use /mixpanel-analytics:review branch to audit all analytics changes on this feature branch."
  • "Review the entire optimo_analytics module with /mixpanel-analytics:review all."

Modes

This Skill behaves differently based on how it is invoked:

  • implement mode – invoked via /mixpanel-analytics:implement:
  • Guides implementation of new MixPanel events through 7 steps.
  • Creates constants, schemas, registry entries, service methods, and tests.
  • Enforces PII protection and code patterns.
  • review mode – invoked via /mixpanel-analytics:review:
  • Audits existing implementations for compliance.
  • Checks PII protection, schema design, service patterns, and test coverage.
  • Generates structured review reports with severity tags.

Critical Rules (Do Not Violate)

---

For the full checklist, automated checks, and report template, use:

Summary checklist:

  • PII: never send names/emails/phones/addresses; identifiers are UUID strings; organization_name is allowed but never logged.
  • Fire-and-forget: keyword-only args + try/except wrapper; never let tracking break business logic.
  • Event names: {prefix}.{object}.{action}[.error]; do not encode execution context (e.g., "cron") in the event name.
  • distinct_id: user UUID → org_ → slack_/apikey_/webhook_; never a raw org UUID.
  • Timestamps: Unix ms (datetime_to_timestamp_ms()), not ISO strings.
  • is_cron_job: only when tracking-time must align with the original action; include cron_execution_timestamp when set.
  • references/review.md
  • [P0] PII protection
  • [P1] Event registration completeness
  • [P1] Schema design + types
  • [P1] Service method patterns
  • [P2] Test coverage
  • [P2] Naming, timestamps, is_cron_job, distinct_id, exports

Resources

Declared allowed tools:

BashReadEditWriteGlobGrep

References

  • implementation.md
  • review.md

Installation

Switch between Claude Code and Codex, then copy the install command for the runtime you use.

claude plugin marketplace add DiversioTeam/agent-skills-marketplace
claude plugin install mixpanel-analytics@diversiotech

Invocation:

/mixpanel-analytics:implement
/mixpanel-analytics:review