/mixpanel-headless:setupfrom mixpanel-headless
Creates a Python virtual environment and installs mixpanel_headless (≥0.4.0) with pandas, numpy, matplotlib, seaborn, networkx, anytree, scipy, and pyarrow. Verifies imports, CLI, and credentials.
Ships in mixpanel-headless. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Create the plugin environment, install the library and its analysis stack into it, then confirm that the plugin works.
The plugin environment is a virtual environment at ${CLAUDE_PLUGIN_DATA}/venv.
The script installs nothing outside it, so it never changes the user's global
or system Python. The environment stays in place when the plugin updates. All
skills run Python as ${CLAUDE_PLUGIN_DATA}/venv/bin/python and the CLI as
${CLAUDE_PLUGIN_DATA}/venv/bin/mp.
Run this command exactly as written, because the pre-approved pattern matches this text:
bash ${CLAUDE_SKILL_DIR}/scripts/setup.sh ${CLAUDE_PLUGIN_DATA}/venv
The script does these steps:
uv venv, or with python3 -m venv when uv is not available. It reuses an environment that already works.mixpanel-headless>=0.4.0 and the analysis packages into it. The version floor upgrades an older install, because the skills depend on mp help, which first shipped in 0.3.0, and on the saved-metric methods, which first shipped in 0.4.0.mp help once, offline, to confirm that the built-in API reference works and knows the saved-metric methods.mp command inside the environment.The script is safe to run again. It does not prompt for input.
Read these lines in the output:
| Line | Meaning |
|---|---|
✓ Plugin environment created or found | The environment exists at the printed path. |
✓ mixpanel-headless INSTALLED <version> | The library was not present. The script installed it. |
✓ mixpanel-headless UPGRADED <old> → <new> | An older library was present. The script upgraded it. |
✓ mixpanel-headless OK <version> | The library already met the 0.4.0 floor. |
✓ built-in help (mp help) | The API reference works. The skills can look up API names. |
✓ mp CLI: <path> | The mp command exists in the environment. |
✗ Usage: setup.sh <absolute-venv-path> | The plugin data path was not filled in. Run /mixpanel-headless:setup again. |
✗ Python 3.10+ required but not found | Tell the user to install Python 3.10 or newer, or uv (https://docs.astral.sh/uv/). |
✗ Could not create the virtual environment | Show the explanation the script printed. On Debian and Ubuntu, the usual fix is uv or the python3-venv package. |
✗ ... is not a virtual environment | Something else uses that path. Tell the user to move it away. |
✗ Package install failed | Show the installer output. A network or package-index problem is the usual cause. |
✗ Import verification failed | Show the error. A partial install is the usual cause. Run setup again. |
✗ built-in help (mp help) failed | The install met the 0.4.0 floor, but mp help could not look up Workspace.list_metrics. Show the error above that line. A broken or partial install is the usual cause, so run setup again. |
If the script printed UPGRADED, tell the user to restart any Python kernel or
notebook that imported the old version.
Tell the user the environment path from the last lines. They can run their own
scripts with ${CLAUDE_PLUGIN_DATA}/venv/bin/python.
Run the auth helper. It prints one JSON object:
${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py session
Switch on the state field:
ok — show "account.name → project project.id". Go to step 4.needs_account, needs_project, or error — hand the problem to the auth skill. Tell the user to run /mixpanel-headless:auth. That skill owns the login, account, project, and security flows. Do not repeat those flows here.Test the active account. Use account.name from step 3, because the script needs a name:
${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account test <account.name>
The subcommand does not raise. Read result.ok:
result.ok: true — setup is complete. The user can ask analytics questions. The mixpanelyst skill loads automatically for them.result.ok: false — show result.error. Hand the problem to the auth skill (/mixpanel-headless:auth account test <name>).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mixpanel/mixpanel-headless --plugin mixpanel-headless5 skills in this plugin
/authManages Mixpanel credentials for the mixpanel_headless library and the mp CLI — checks the active session, lists, adds, and switches accounts, runs OAuth login (one-shot `mp login` or the two-step flow), switches projects and workspaces, and manages saved targets. Use when Mixpanel credentials are missing or failing, when code raises AuthenticationError or reports no account or no project, when the user wants to log in, switch account, project, or workspace, or save or use a target; on 401 or "unauthorized" errors; for "which project am I on?"; or for a login in the EU or India region. Do not use for installing or upgrading the library (use setup) or for analytics questions once credentials work (use mixpanelyst)./dashboard-expertAnalyzes, builds, modifies, and adds explainer text cards to Mixpanel dashboards with the mixpanel_headless Python library. It reads a dashboard's layout and runs every report on it, creates dashboards with text cards and a grid layout, edits cells and rows in place, and writes data-driven explainer cards. Use when the user asks to analyze, summarize, explain, build, create, redesign, update, reorganize, or clean up a Mixpanel dashboard; asks about dashboard layout, rows, cell widths, text cards, or which chart type suits a board; or wants to turn queries into reports placed on a dashboard. Do not use for general analytics questions or one-off queries (use mixpanelyst), or for what a specific user did in a session recording (use session-replay)./mixpanelystAnalyzes Mixpanel data with Python, mixpanel_headless, and pandas. Use when the user asks about their Mixpanel data, such as event trends, DAU/WAU/MAU, funnels, retention and churn, user paths, user profiles, cohorts, a user's event history (activity feed), segment comparisons, revenue, feature adoption, or experiment results. Also use to explore a project's events and properties, use or manage saved metrics and behaviors, build a custom property or cohort, share a query as a report link, read or write business context, or manage entities such as feature flags, experiments, alerts, annotations, webhooks, Lexicon, and other governance objects, or when code runs mixpanel_headless or `mp query` / `mp inspect`. Do not use for adding tracking to an app's source code, for what a specific user did on screen (use session-replay), for building or editing dashboards (use dashboard-expert), for logging in, credentials, or switching accounts (use auth), or for installing the library (run /mixpanel-headless:setup)./session-replayReads Mixpanel session replay recordings with the mixpanel_headless library. It fetches a user's sessions, turns them into action timelines and pandas DataFrames, and explains what happened on screen. Use when the user asks what a specific user did on screen, in a recording, or click by click; asks about rage clicks, dead clicks, rage taps, dead taps, error sessions, long pauses, or action timelines; wants to correlate a tracked event with on-screen behavior; gives a distinct_id or a replay ID and asks what happened in the session; or asks about iOS, Android, React Native, or Flutter recordings, screens, or taps. Do not use for aggregate analytics questions such as trends, funnels, retention, or segment counts (use mixpanelyst), or for building or editing dashboards (use dashboard-expert).Other plugins' skills for the same job