首页龙虾技能列表 › Mixpanel

📊 Mixpanel

v1.0.1

Query Mixpanel analytics with funnels, retention, segmentation, and event tracking via REST API.

0· 514·5 当前·5 累计
by @ivangdavila (Iván)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's requirements and instructions are consistent with querying Mixpanel via its REST APIs; nothing requested is disproportionate to that purpose, though there are a couple of small operational notes to be aware of.
评估建议
This skill appears coherent for querying Mixpanel, but before installing consider the following: 1) The skill requires a Mixpanel service account and secret — treat MP_SERVICE_SECRET as sensitive since it can enable queries and exports; create a least-privilege service account and rotate credentials regularly. 2) The SKILL.md example uses the base64 utility but only lists curl and jq as required binaries — ensure base64 is available in your agent environment or add it to required tools. 3) Cache...
详细分析 ▾
用途与能力
Name/description, required env vars (MP_SERVICE_ACCOUNT, MP_SERVICE_SECRET, MP_PROJECT_ID), required binaries (curl, jq), and the declared local config path (~/mixpanel/) all align with a Mixpanel Query API integration that caches queries locally. The primary credential (MP_SERVICE_SECRET) is appropriate for authentication.
指令范围
SKILL.md stays on-topic: all commands and endpoints target mixpanel.com or data.mixpanel.com, it reads only the declared environment variables, and it directs cached results to ~/mixpanel/. One minor mismatch: the example constructs a Basic auth token using the base64 command (echo ... | base64) but base64 is not listed in required binaries. Otherwise the instructions avoid asking users to paste secrets into chat and state they will not store credentials to disk.
安装机制
Instruction-only skill with no install spec or remote downloads. This minimizes disk-write risk: nothing is fetched or executed at install time by the skill itself.
凭证需求
The three required environment variables map directly to Mixpanel service-account authentication and project selection; no unrelated secrets or broad credentials are requested. The declared config path (~/mixpanel/) is proportional for caching queries and saved insights.
持久化与权限
The skill is not force-included (always:false) and does not request system-wide privileges. It stores memory and cached query results in a single user-local directory (~/mixpanel/), which is a reasonable level of persistence for this purpose.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

🖥️ OSLinux · macOS

版本

latestv1.0.12026/2/25

Improved security docs and env var declarations.

● 无害

安装命令 点击复制

官方npx clawhub@latest install mixpanel
镜像加速npx clawhub@latest install mixpanel --registry https://cn.clawhub-mirror.com

技能文档

Setup

On first use, read setup.md for integration guidelines.

When to Use

User needs product analytics from Mixpanel. Agent handles event queries, funnel analysis, retention cohorts, user segmentation, and profile lookups.

Architecture

Memory lives in ~/mixpanel/. See memory-template.md for structure.

~/mixpanel/
├── memory.md        # Projects, saved queries, insights
└── queries/         # Saved JQL queries

Quick Reference

TopicFile
Setup processsetup.md
Memory templatememory-template.md

Core Rules

1. Authentication

Requires a Mixpanel Service Account:

export MP_SERVICE_ACCOUNT="your-service-account"
export MP_SERVICE_SECRET="your-service-secret"
export MP_PROJECT_ID="123456"

Create a service account in Mixpanel → Organization Settings → Service Accounts.

2. Query API for Analysis

Use the Query API for insights, funnels, retention:

BASE="https://mixpanel.com/api/query"
AUTH=$(echo -n "$MP_SERVICE_ACCOUNT:$MP_SERVICE_SECRET" | base64)

# Insights query (event counts) curl -s "$BASE/insights?project_id=$MP_PROJECT_ID" \ -H "Authorization: Basic $AUTH" \ -H "Content-Type: application/json" \ -d '{ "params": { "event": ["Sign Up", "Purchase"], "type": "general", "unit": "day", "from_date": "2024-01-01", "to_date": "2024-01-31" } }' | jq

3. Funnel Analysis

curl -s "$BASE/funnels?project_id=$MP_PROJECT_ID" \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "params": {
      "events": [
        {"event": "Sign Up"},
        {"event": "Complete Onboarding"},
        {"event": "First Purchase"}
      ],
      "from_date": "2024-01-01",
      "to_date": "2024-01-31",
      "unit": "day"
    }
  }' | jq '.data.meta.overall'

4. Retention Cohorts

curl -s "$BASE/retention?project_id=$MP_PROJECT_ID" \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "params": {
      "born_event": "Sign Up",
      "event": "App Open",
      "from_date": "2024-01-01",
      "to_date": "2024-01-31",
      "unit": "week",
      "retention_type": "birth"
    }
  }' | jq

5. User Profiles

curl -s "https://mixpanel.com/api/query/engage?project_id=$MP_PROJECT_ID" \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "filter_by_cohort": {"id": 12345},
    "output_properties": ["$email", "$name", "plan"]
  }' | jq

6. Export Raw Events

curl -s "https://data.mixpanel.com/api/2.0/export?project_id=$MP_PROJECT_ID" \
  -H "Authorization: Basic $AUTH" \
  -d "from_date=2024-01-01" \
  -d "to_date=2024-01-07" \
  -d "event=[\"Purchase\"]"

7. JQL for Complex Queries

// Mixpanel JQL (JavaScript Query Language)
function main() {
  return Events({
    from_date: "2024-01-01",
    to_date: "2024-01-31",
    event_selectors: [{event: "Purchase"}]
  })
  .groupByUser(["properties.$city"], mixpanel.reducer.sum("properties.amount"))
  .groupBy(["key.$city"], mixpanel.reducer.avg("value"))
  .sortDesc("value")
  .take(10);
}

Common Queries

GoalEndpointKey Params
Event counts/insightsevent, type, unit, dates
Conversion funnel/funnelsevents array, dates
User retention/retentionborn_event, event, unit
User segments/engagefilter_by_cohort, properties
Raw event export/exportdates, event filter

Mixpanel Traps

  • Wrong date format → use YYYY-MM-DD, not timestamps
  • Missing project_id → every Query API call needs it
  • Rate limits → 60 requests/hour for free tier, batch queries when possible
  • JQL timeouts → queries over 60s fail, add .take(N) to limit results

External Endpoints

EndpointData SentPurpose
mixpanel.com/api/query/Credentials, project ID, query paramsAnalytics queries
data.mixpanel.com/api/2.0/Credentials, project ID, date rangeRaw data export
No other data is sent externally.

Security & Privacy

Data sent to Mixpanel (over HTTPS):

  • Service account credentials for authentication
  • Query parameters (event names, date ranges, filters)
  • Project ID

Data that stays local:

  • Credentials stored ONLY in environment variables
  • Query results cached in ~/mixpanel/

This skill does NOT:

  • Store credentials in memory.md or any file
  • Send data to services other than mixpanel.com
  • Modify your Mixpanel tracking code or SDK

Trust

By using this skill, analytics data is queried from Mixpanel. Only install if you trust Mixpanel with your product data.

Related Skills

Install with clawhub install if user confirms:
  • analytics — multi-platform analytics
  • data-analysis — data processing patterns
  • api — REST API best practices

Feedback

  • If useful: clawhub star mixpanel
  • Stay updated: clawhub sync
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务