openpanel
FreeNo executable scriptsNot checkedQuery OpenBot product analytics (events, sessions, profiles, funnels, retention, active users, Search Console, and SQL percentiles such as p50/p90/p99) from…
by nightly-labs★ 13,288 GitHub starsAbout this skill
OpenPanel analytics
scripts/openpanel.ts calls the OpenPanel MCP server at https://analytics.openbot.run/api/mcp.
The token is a root client. It reads analytics and makes, changes and deletes dashboards and
reports (create_dashboard, create_report, update_report_layout, delete_dashboard and others).
apps/auth-api/.env.dev and apps/auth-api/.env.production hold the same token as
OPENPANEL_MCP_TOKEN, so either key works.
Run
When DOTENV_PRIVATE_KEY_DEV is in the shell:
bun scripts/openpanel.ts tools # list the tools
bun scripts/openpanel.ts tools <tool> # show the input schema of one tool
bun scripts/openpanel.ts call <tool> '<json args>' # call a tool; the result is JSON
When the key is not in the shell, use the root .env.keys of the main checkout. A worktree has none:
MAIN="$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")"
./node_modules/.bin/dotenvx run -q -f apps/auth-api/.env.dev -fk "$MAIN/.env.keys" -- bun scripts/openpanel.ts call list_event_names '{"projectId":"openbot"}'
If no key is available, stop and ask the developer. Never print the token, a key, or .env.keys.
Use
- Every tool needs
"projectId": "openbot". Nightly, Infeld and other products share the organization, and the token can change their dashboards too: do not touch them. - Event names and properties are in ANALYTICS.md. Call
list_event_namesorlist_event_propertieswhen a name is not there. - Read the schema with
tools <tool>before the first call of a tool. Most query tools takestartDateandendDate(YYYY-MM-DD) and use the last 30 days by default. - Before you change or delete a dashboard that you did not make in this task, ask the developer.
Check a new report with
get_report_dataand send the developer thedashboard_url. - The server accepts 60 requests per minute from one IP address. Each command is one request, so do not loop over many profiles.
- Profiles contain email addresses and account IDs. Do not copy them into issues, pull requests, commits or logs. Use counts, or an ID only when the developer asks for one.
SQL and percentiles
The MCP tools have no percentiles, and query_events returns about 12 rows. For p50, p90, p99 and
other aggregations, use scripts/openpanel-sql.ts. It runs read-only SQL on the OpenPanel ClickHouse
through an SSH tunnel to sui-alexandria (your SSH key must work there). The ClickHouse user
openbot_readonly can only SELECT from events: the openpanel.events rows of project openbot.
Other products and the other tables are not visible. The server stops a query after 120 s, 4 GiB of
memory or 100,000 result rows, gives it 4 threads, and allows 300 queries per hour.
OPENPANEL_CLICKHOUSE_USER and OPENPANEL_CLICKHOUSE_PASSWORD are in both env files.
MAIN="$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")"
SQL() { ./node_modules/.bin/dotenvx run -q -f apps/auth-api/.env.dev -fk "$MAIN/.env.keys" -- bun scripts/openpanel-sql.ts "$@"; }
SQL presets # list the presets
SQL preset turn-duration # completed turns, duration_ms by provider, 30 days
SQL preset resources --by platform,app_version --min-n 200
SQL preset conversation-open --days 7 --format json
SQL preset voice-turn --since 2026-10-01 --until 2026-11-01
SQL query "SELECT properties['model'] AS model, count() AS n FROM events
WHERE name = 'system_turn_completed' AND created_at > now() - INTERVAL 7 DAY GROUP BY model ORDER BY n DESC"
- Each preset row has
n(samples),profiles(distinct profiles),p50,p90,p99andmax. The(all)row is the total of the metric.--metricmeasures other numeric properties,--bygroups by allowlisted properties,--all-resultskeeps failed turns, and--print-sqlshows the SQL to change for a raw query. - Properties are strings in the
propertiesmap: usetoFloat64OrNull(properties['duration_ms']). Filterproperties['environment'] = 'production'(presets do this) andcreated_at. The table is sorted by project, day and name, and has projectionp_nameby name, so always filter byname. - Do not add a
FORMATclause orSETTINGS: the user isreadonly=1, and the script addsFORMAT JSON. system_resourcesvalues are already daily p95 or max values of one computer, so a p99 ofdb_request_ms_p95is "the 99th percentile computer-day", not a request percentile.- Output redacts email addresses and the text values of columns whose name has
profile_id,device_idorsession_id. Counts such asuniqExact(profile_id)stay numbers. The match uses the column name, so do not rename an identifier column withAS, and do not select the wholepropertiesmap. Use--show-identifiersonly when the developer asks for one ID, and never paste identifiers into issues, pull reques
Install openpanel in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the openpanel skill do?
Query OpenBot product analytics (events, sessions, profiles, funnels, retention, active users, Search Console, and SQL percentiles such as p50/p90/p99) from the self-hosted OpenPanel server, and make or change its dashboards and reports. Use when debugging with real usage data, checking whether an event fires, counting affected users, answering a product or growth question, or building a dashboard.
How do I install the openpanel skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the openpanel skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic