본문으로 건너뛰기
cccskills
무료GitHub에 공개

mixpanel-headless-setup

Prepare a Python environment for Mixpanel analysis by installing required libraries and checking credentials and connectivity. Use it for first-time setup, missing dependencies, or guidance on service account and OAuth sign-in options.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

This skill installs mixpanel_headless, pandas, numpy, matplotlib, seaborn, networkx, anytree, scipy (and pyarrow on Python 3.11+), then verifies Mixpanel credentials. It should be invoked when setting up a new environment for Mixpanel data analysis, when dependencies are missing, or when configuring service account or OAuth credentials for the first time.

설치 방법 보기

이럴 때 유용합니다

  • Set up a new environment for Mixpanel analysis
  • Install missing Python analysis libraries
  • Configure service account or OAuth credentials
  • Prepare credentials for a remote agent session

포함된 파일(2)

  • SKILL.md6.9 KB
  • scripts/setup.sh6.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

mixpanel-headless — Setup

Install dependencies and verify credentials for CodeMode analytics.

Run Setup

Before running bundled scripts, set SKILL_DIR to the absolute path of this skills/setup directory.

bash $SKILL_DIR/scripts/setup.sh

This will:

  1. Verify Python 3.10+ is available
  2. Install mixpanel_headless, pandas, numpy, matplotlib, seaborn, networkx>=3.0, anytree>=2.8.0, scipy, and pyarrow>=17.0 on Python 3.11+ (tries uv, pip in order)
  3. Verify all packages import successfully (including pyarrow on 3.11+, networkx, anytree, and scipy)
  4. Check for configured Mixpanel credentials (single schema — Account → Project → Workspace)

Check Credentials

After installation, check the active session:

python3 $SKILL_DIR/../mixpanelyst/scripts/auth_manager.py session

Parse the JSON state field:

  • ok — credentials configured. Show account.name → project project.id and proceed to verification.
  • needs_account — no account configured. Read next for onboarding suggestions and follow "If Credentials Are Missing" below.
  • needs_project — account configured but no project pinned. Suggest mp project list then mp project use <id>.
  • error — show error.message. If error.actionable is true, the message names a concrete next command.

If Credentials Are Missing

If no credentials are configured, guide the user to one of these methods:

Recommended: mp login

The frictionless one-shot path. Tell the user to run:

mp login

mp login runs the right auth flow for the environment, derives the account name from /me, and pins a default project. For laptops with a usable browser, this opens the PKCE flow; for environments with MP_USERNAME + MP_SECRET set, it skips the browser and uses the service-account path; for MP_OAUTH_TOKEN set, it uses the static bearer.

Region behavior:

  • service_account and oauth_token paths probe us → eu → in when --region is omitted.
  • oauth_browser (the bare-mp login default) defaults to us. EU and India browser users must pass --region eu or --region in.

Useful flags: --name NAME, --region us|eu|in, --project ID, --service-account, --token-env VAR, --no-browser, --secret-stdin.

Alternative: Guided Setup (explicit account add)

Use the mixpanel-auth skill's account-add workflow for a step-by-step walkthrough. The workflow never prompts for secrets in conversation — it instructs the user to run mp account add ... themselves so the secret is read with hidden input. Use this path when the user wants explicit control over the account name, region, and type at registration time.

Alternative: Service-Account Environment Variables (temporary)

For quick testing, set all four variables in the shell — the resolver picks them up directly without account registration:

export MP_USERNAME="service-account-username"
export MP_SECRET="service-account-secret"
export MP_PROJECT_ID="12345"
export MP_REGION="us"  # or "eu", "in"

Alternative: Raw OAuth Bearer Token (best for agents / CI)

If the user has an OAuth 2.0 access token from another source, they can use it directly without the PKCE browser flow:

export MP_OAUTH_TOKEN="<bearer-token>"
export MP_PROJECT_ID="12345"
export MP_REGION="us"  # or "eu", "in"

This is the recommended mode for non-interactive contexts. The full service-account env-var set (MP_USERNAME + MP_SECRET + MP_PROJECT_ID

  • MP_REGION) takes precedence when both sets are complete.

Remote Environment

If running inside a remote or sandboxed agent environment, credentials work differently:

  • OAuth login and interactive account setup are NOT available (no browser, no host terminal access)
  • Credentials must be configured on the host machine before starting the remote session

If No Credentials Found in the Remote Session

Tell the user:

No Mixpanel credentials found in this remote session.

On your host machine (outside the remote session), run:

mp account export-bridge --to ~/.claude/mixpanel/auth.json

This writes a v2 bridge file embedding your account record (and any oauth_browser tokens) so the remote session can read your credentials at startup.

Then start a new remote session — credentials will be available automatically.

Do NOT suggest the account-login or account-add interactive workflows — these won't work inside remote sessions without browser or terminal access.

If Bridge File Found But Token Expired

The library will auto-refresh the OAuth token via the on-disk refresh token (no browser needed). If refresh fails:

Your OAuth session has expired and could not be refreshed. On your host machine, run:

mp login --name personal             # re-authenticate (or `mp account login personal`)
mp account export-bridge --to ~/.claude/mixpanel/auth.json

Then start a new remote session.

Verify Everything Works

python3 $SKILL_DIR/../mixpanelyst/scripts/auth_manager.py account test

The subcommand never raises — read result.ok to determine outcome.

  • result.ok: true → setup is complete; the user can ask analytics questions.
  • result.ok: false → suggest the mixpanel-auth account-test workflow for detailed diagnostics.

Post-Setup: Explore Your Data

Once authenticated, these slash commands help orient the user:

  • mixpanel-auth project-list workflow — discover all accessible projects via /me
  • mixpanel-auth session workflow — see active account / project / workspace
  • mixpanel-auth project-use workflow — switch to a different project
  • mixpanel-auth target-add workflow — save a named cursor position

The user can also construct a Workspace targeting a specific account / project / workspace directly:

import mixpanel_headless as mp

ws = mp.Workspace()                                  # default session
ws = mp.Workspace(account="team")                    # named account
ws = mp.Workspace(project="67890")                   # explicit project (active account)
ws = mp.Workspace(account="team", project="67890")   # both axes
ws.use(project="98765").events()                     # in-session switch (no re-auth)

The mixpanelyst skill auto-triggers on analytics questions. For the analytical frameworks that guide investigations, see analytical-frameworks.md. For the complete Python API, see python-api.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Review charts, diagrams, and dashboards for accessibility, including color contrast, keyboard access, and text alternatives. Get specific guidance for preserving key findings in screen readers, static exports, and reduced-motion views.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing dashboard colors and keyboard access
  • Writing chart alt text and long descriptions
  • Preparing accessible figures for PDF reports
openai/plugins7.5천2026년 10월 8일 업데이트

Give a photo collection a consistent look using Adobe tools to adjust color, tone, presets, and optional crops. Review a before-and-after sample before processing the full set, then receive links to the edited images.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Giving travel photos a consistent look
  • Unifying photos taken in mixed lighting
  • Applying a warm or cinematic style across a photo set
openai/plugins7.5천2026년 10월 8일 업데이트

Visualize a logo, sketch, or design on products such as mugs, shirts, and business cards. Review a pilot image, generate a visually consistent set, and collect the results on a shareable Firefly Board.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Preview a logo on mugs and shirts
  • Turn a hand-drawn sketch into product mockups
  • Create consistent brand presentation images
openai/plugins7.5천2026년 10월 8일 업데이트

Prepare images and videos for social platforms using Adobe tools. Create image crops that keep the subject in view, expand backgrounds when available, preview a full-set sample, and resize videos while preserving their aspect ratio.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating image variants for multiple social platforms
  • Cropping photos for Instagram Stories
  • Preparing LinkedIn images and YouTube thumbnails
openai/plugins7.5천2026년 10월 8일 업데이트

Create flyers, social posts, business cards, and other visuals from Adobe Express templates. Choose a template, customize its text and background color, and receive a design link, with additional editing and export options depending on the available tools.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating an event flyer
  • Designing an Instagram post
  • Customizing business card text and colors
openai/plugins7.5천2026년 10월 8일 업데이트

Turn an uploaded video into three highlight edits with Adobe Quick Cut. Choose a target length and style, then compare versions that feature different moments and download the ones you prefer.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating a short highlight video for social media
  • Condensing interview footage into a highlight reel
  • Comparing three edits with different moment selections
openai/plugins7.5천2026년 10월 8일 업데이트

openai의 스킬 모두 보기

이 스킬의 문제 신고