Agent Native

auth

Manages Mixpanel credentials, authentication, and account configuration for the mixpanel_headless library and mp CLI.

by MixpanelOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (mixpanel)

Agents
Claude Code
License
MIT (permissive)
Pin
fbed0c5pinned Oct 9, 2026
Context cost
about 3,000 tokenswhen the skill loads
GitHub stars
18on mixpanel/mixpanel-headless
Scripts
1 script

What it does

“Manages 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).”
The author's description, from SKILL.md

Generated summary from the skill's own text

Manages Mixpanel credentials, authentication, and account configuration for the mixpanel_headless library and mp CLI. Handles OAuth login flows, service account setup, project and workspace switching, and credential testing. Use this when authentication fails, credentials are missing, or the user needs to switch accounts or projects.

When to use it

  • Authentication errors, missing credentials, or 401 unauthorized responses
  • User wants to log in or switch Mixpanel accounts, projects, or workspaces
  • Setting up Mixpanel credentials for the first time
  • Saving and managing credential targets for multiple accounts

When not to

  • Installing or upgrading the mixpanel_headless library
  • Answering analytics or business intelligence questions after credentials work

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add mixpanel/mixpanel-headless --skill auth

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install mixpanel/mixpanel-headless auth@fbed0c596f6856a705e54ef528c03e943527410d

Installs the commit we checked (fbed0c5).

Copy by hand

Download the folder at fbed0c5 and put it in .claude/skills/auth for Claude Code and in .agents/skills/auth for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at fbed0c5

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "auth" by Mixpanel.

Source, pinned to commit fbed0c596f6856a705e54ef528c03e943527410d:
https://github.com/mixpanel/mixpanel-headless/tree/fbed0c596f6856a705e54ef528c03e943527410d/mixpanel-plugin/skills/auth

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/auth/ for Claude Code and .agents/skills/auth/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/mixpanel/auth

SKILL.md at the pin

---
name: auth
description: Manages 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).
allowed-tools: Bash(${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py *)
argument-hint: "[session|login|account|project|workspace|target] [...]"
---

# Mixpanel authentication

Manage Mixpanel credentials through `auth_manager.py`. Each subcommand prints
exactly one JSON object to stdout. Parse it and present the result in plain
words.

Run each command below exactly as written, with the full interpreter path. The
pre-approved pattern in `allowed-tools` matches only that text.

The commands use the plugin environment that the `setup` skill creates. If the
interpreter path does not exist ("No such file or directory"), tell the user
to run `/mixpanel-headless:setup` first.

In this skill, `mp` means `${CLAUDE_PLUGIN_DATA}/venv/bin/mp`. When you tell
the user to run an `mp` command, write that full path, because `mp` is often
not on the user's `PATH`. This also applies to the commands in `next` hints.

**Schema:** every response has `schema_version: 1` and a `state` of `ok`,
`needs_account`, `needs_project`, or `error`. Errors are also JSON on stdout
with exit code 0, so you can parse the output without a try/except.

## Security rules (firm)

- Do not ask for secrets (passwords, API secrets) in the conversation. They stay visible in the history.
- Do not pass secrets as command-line arguments. They are visible in the process list.
- For a service account, tell the user to run `! ${CLAUDE_PLUGIN_DATA}/venv/bin/mp account add <name> --type service_account --username <username> --project <project_id> --region <region>` themselves. The command prompts for the secret with hidden input when it has a terminal.
- If that command fails with "Set MP_SECRET or use --secret-stdin", the `!` session has no terminal for the prompt. Tell the user to run the same command in their own terminal, outside Claude Code. Another option: export `MP_SECRET` in their shell first. Still do not ask for the secret in the chat.

## Routing

Parse `$ARGUMENTS` and route to the matching subcommand. With no arguments,
run `session`.

### "login"

For first-time setup, the one-shot path is `mp login`. It picks the auth flow
from the environment, derives the account name from `/me`, and pins a default
project. Tell the user to run:

```text
! ${CLAUDE_PLUGIN_DATA}/venv/bin/mp login
```

The region behavior depends on the auth type:
- `service_account` and `oauth_token` paths probe `us → eu → in` and use the first region that answers.
- The `oauth_browser` path (the default for a bare `mp login`) uses `us`. EU and India users must pass `--region eu` or `--region in`.

Optional flags:
- `--name NAME` — override the derived account name
- `--region us|eu|in` — set the region explicitly (required for EU and India browser users)
- `--project ID` — skip the project picker
- `--service-account` — force the service-account path (needs `MP_USERNAME` and `MP_SECRET` in the environment)
- `--token-env VAR` — force the static-bearer path (reads the token from `$VAR`)
- `--no-browser` — print the authorization URL instead of opening a browser

If `mp login` fails with "Multiple projects accessible to this account", the
command had no terminal for its project picker. Show the listed projects, ask
which one to use, and tell the user to run it again with `--project <id>`.

After the user confirms, run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py session` to get `account.name`. Then run
`${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account test <account.name>`.

### No arguments or "session"

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py session`. Switch on `state`:
- **`ok`** — show one line: "Active: `account.name` → project `project.id`". Add workspace `workspace.id` if it is not null. Mention `/mixpanel-headless:auth account list` and `/mixpanel-headless:auth project list` for a switch.
- **`needs_account`** — no account is configured. Show `next[0].command` (the one-shot `mp login`) as the recommended step. List the alternatives: `next[1]` (explicit account add) and `next[2]` (the `MP_OAUTH_TOKEN` environment variables, best for CI and agents).
- **`needs_project`** — an account exists but no project is pinned. Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py project list`, show the table, and ask which project to use. Then run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py project use <id>`.
- **`error`** — show `error.message`. If `error.actionable` is true, the message names the next command.

### "account list"

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account list`. Show `items` as a table: `name`, `type`, `region`,
`is_active`. Mark the active account with a star. If `referenced_by_targets`
is not empty for an account, say so ("`team` is referenced by targets: `ecom`").

If `items` is empty, show the `next` onboarding hints (as for `needs_account`).

### "account add"

This is a guided wizard. Do not run any script that handles secrets.

1. Ask for the **account name** (for example "personal", "team", "ci").
2. Ask for the **type**: `oauth_browser` (recommended for laptops), `service_account` (long-lived), or `oauth_token` (CI and agents).
3. Ask for the **region**: us, eu, or in (default us).
4. For `service_account`, ask for the username and the numeric project ID. For `oauth_token`, ask for the project ID and the name of the environment variable that holds the bearer token. For `oauth_browser`, the project ID is optional, because `mp account login` fills it in after the browser flow.
5. Tell the user to run the matching command. For a service account (if it fails with "Set MP_SECRET or use --secret-stdin", follow the security rules above):

```text
Now run this command. It prompts for your service account secret with hidden input:

! ${CLAUDE_PLUGIN_DATA}/venv/bin/mp account add <NAME> --type service_account --username <USERNAME> --project <PROJECT_ID> --region <REGION>
```

For an OAuth token, the named environment variable must hold the token in the
shell where the command runs:

```text
! ${CLAUDE_PLUGIN_DATA}/venv/bin/mp account add <NAME> --type oauth_token --token-env <VAR> --project <PROJECT_ID> --region <REGION>
```

For OAuth browser, prefer the one-shot `mp login` (see "login" above):

```text
! ${CLAUDE_PLUGIN_DATA}/venv/bin/mp login --name <NAME> --region <REGION>
```

For full control over registration before the browser flow, the two-step path
still works:

```text
! ${CLAUDE_PLUGIN_DATA}/venv/bin/mp account add <NAME> --type oauth_browser --region <REGION>
! ${CLAUDE_PLUGIN_DATA}/venv/bin/mp account login <NAME>      # opens a browser for the PKCE flow
```

Replace the placeholders with the values you collected. The `!` prefix runs the
command in the user's terminal session.

6. After the user confirms, run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account test <NAME>`.
7. Report success or failure from the `result.ok` field.

### "account use" or "account use <name>"

If a name is given, run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account use <name>`.

If no name is given:
1. Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account list` to show the accounts.
2. Ask which one to use.
3. Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account use <name>` with the chosen name.

On `state: ok`, show one line: "Switched to `active.account` (project `active.project`)".
On `state: error`, show `error.message`.

### "account login <name>"

The name is required. If it is missing, run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account list` and ask.
Then run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account login <name>`.

Tell the user that a browser window opens for Mixpanel authentication. Wait for
the JSON response.

On `state: ok`: "OAuth login successful. `logged_in_as.user.email`, token
valid until `logged_in_as.expires_at`."
On `state: error`: show `error.message` and suggest a retry.

### "account test" or "account test <name>"

The script needs a name. If none is given, run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py session` and use
`account.name`. Then run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py account test <name>`.

The subcommand does not raise, so `state` is always `ok`. Read `result.ok`:
- `result.ok: true` → "Connected as `result.user.email` · `result.accessible_project_count` accessible projects."
- `result.ok: false` → "Test failed: `result.error`."

### "project list"

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py project list`. Show `items` as a table: organization, project name,
project ID. Mark the active project (`is_active: true`) with a star. Suggest
`/mixpanel-headless:auth project use <id>` for a switch.

### "project use <id>"

If no ID is given, run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py project list` first and ask which one to use.

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py project use <PROJECT_ID>`.

On `state: ok`: "Switched to project `active.project`."
On `state: error`: show `error.message`.

### "workspace list"

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py workspace list`. Show `items` as a table: workspace ID, name,
`is_default`. Mark the active workspace with a star. Name the parent project
from `project.name` (`project.id`).

### "workspace use <id>"

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py workspace use <WORKSPACE_ID>`.

On `state: ok`: "Pinned workspace `active.workspace`."
On `state: error`: show `error.message`.

### "target list"

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py target list`. A target is a saved combination of an account, a project,
and an optional workspace. Show a table: name, account, project,
workspace.

### "target add"

This is a guided wizard. Collect the target name, the account name, the
project ID, and an optional workspace ID. Then run:

```text
${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py target add <NAME> --account <ACCT> --project <PROJ> [--workspace <WS>]
```

### "target use <name>"

Run `${CLAUDE_PLUGIN_DATA}/venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/auth/scripts/auth_manager.py target use <name>`. It applies all three axes (`account`,
`project`, `workspace`) to `[active]` in one atomic config write.

## Bearer-token environment variables (`MP_OAUTH_TOKEN`)

For non-interactive contexts (CI, agents, short-lived environments), the
browser flow does not work. Set these instead:

```text
export MP_OAUTH_TOKEN=<bearer-token>
export MP_PROJECT_ID=<project-id>
export MP_REGION=<us|eu|in>
```

The library sends an `Authorization: Bearer <token>` header to every Mixpanel
endpoint. When the full service-account set (`MP_USERNAME` + `MP_SECRET` +
`MP_PROJECT_ID` + `MP_REGION`) is also present, the library ignores
`MP_OAUTH_TOKEN`. To use the token, unset `MP_USERNAME` and `MP_SECRET`.

## Presentation

- Show status in one or two lines, not a wall of JSON.
- Use tables for lists of accounts, projects, workspaces, and targets.
- When something is missing, suggest the next action.
- On an error, show `error.message` verbatim, because it names the fix.

From mixpanel/mixpanel-headless at fbed0c5, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at fbed0c5

Files

2 files, 27 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at fbed0c5
All 19 skills from Mixpanel

More from Mixpanel

  • dashboard-expert

    This skill analyzes, builds, modifies, and adds explainer text to Mixpanel dashboards using the mixpanel_headless Python library.

    Claude Code · about 2.8K tokens · pinned 6 days ago

  • mixpanelyst

    The skill analyzes Mixpanel data by running Python code with the mixpanel_headless library and pandas.

    Claude Code · about 4.3K tokens · pinned 6 days ago

  • session-replay

    This skill retrieves and analyzes Mixpanel session replay recordings to show what a specific user did on screen, action by action.

    Claude Code · about 2.6K tokens · pinned 6 days ago

  • setup

    This skill creates an isolated Python environment for Mixpanel analysis, installs mixpanel-headless version 0.4.0 or newer along with data science libraries…

    Contains scripts

    Claude Code · about 1.1K tokens · pinned 6 days ago

  • analyze-report

    Interprets existing Mixpanel reports and charts by re-running queries, identifying patterns, and summarizing what the data shows and what stands out.

    Claude Code, Codex, Cursor +4 · about 1.9K tokens · pinned 6 days ago

  • create-dashboard

    Creates cohesive Mixpanel dashboards by discovering event and property schemas, validating queries with real data, and arranging reports in a top-to-bottom…

    Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago

All Backend and APIs skills
  • nvflare-orient

    Routes NVFLARE requests to appropriate downstream skills based on user intent and preliminary source inspection findings.

    by NVIDIAOfficial publisher

    Claude Code, Codex, Cursor +4 · about 600 tokens · pinned 6 days ago

  • cloudflare-email-service

    This skill enables agents to send transactional emails and route incoming emails using Cloudflare's Email Service platform.

    by CloudflareOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.6K tokens · pinned 6 days ago

  • durable-objects

    Build and debug Cloudflare Durable Objects applications for stateful coordination and persistent storage on the edge.

    by CloudflareOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.5K tokens · pinned 6 days ago

  • workers-best-practices

    This skill guides code review and development of Cloudflare Workers by applying best practices for production readiness.

    by CloudflareOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.3K tokens · pinned 6 days ago

  • supabase

    This skill enables the agent to work with Supabase products including Database, Auth, Edge Functions, Realtime, Storage, and Vectors.

    by SupabaseOfficial publisher

    Claude Code, Codex, Cursor +4 · about 3.3K tokens · pinned 6 days ago

  • apple

    This skill emulates Apple's OAuth and OIDC services for local development and testing.

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.9K tokens · pinned 6 days ago

Open roles at Mixpanel

3 open roles on the jobs board

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use