metabase
БесплатноБез исполняемых скриптовНе проверенMetabase is an open-source business intelligence tool for creating dashboards and visualizations. Learn Docker deployment, database connections, creating…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Metabase
Overview
Metabase lets anyone in your organization ask questions about data and visualize the answers as charts and dashboards — no SQL required (but SQL is supported too). The open-source edition publishes Docker images as metabase/metabase:v0.x.y (0.65.3.3 is the latest at the time of writing; 0.64 is the long-term-support line, currently 0.64.5.x); the paid edition is metabase/metabase-enterprise with v1.x.y tags. The Metabase API is not versioned and may change between releases.
Instructions
Installation
# docker-compose.yml: Metabase with PostgreSQL backend
services:
metabase:
image: metabase/metabase:v0.65.3.3
ports:
- "127.0.0.1:3000:3000"
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase
MB_DB_PORT: 5432
MB_DB_USER: metabase
MB_DB_PASS: ${METABASE_DB_PASSWORD}
MB_DB_HOST: postgres
depends_on:
- postgres
postgres:
image: postgres:16
environment:
POSTGRES_USER: metabase
POSTGRES_PASSWORD: ${METABASE_DB_PASSWORD}
POSTGRES_DB: metabase
volumes:
- pg-data:/var/lib/postgresql/data
volumes:
pg-data:
# Start Metabase (export METABASE_DB_PASSWORD first; it is read from the shell or a .env file)
docker compose up -d
# First start runs database migrations and takes a minute or two; check readiness:
curl -s http://localhost:3000/api/health # {"status":"ok"}
# Access at http://localhost:3000
# Complete setup wizard: create admin account, connect your data source
The bundled H2 application database is for trying Metabase out only; use Postgres (as above) for anything you keep.
Connect a Database
Prefer an API key for scripts (Admin > Settings > Authentication > API Keys; the key inherits the permissions of the group you assign) and send it as X-API-Key. Use a read-only database user for the data source.
# connect-db.sh: Add a database connection via API
# Unquoted heredoc delimiter: the shell fills in ${ANALYTICS_RO_PASSWORD}
curl -X POST http://localhost:3000/api/database \
-H "Content-Type: application/json" \
-H "X-API-Key: $MB_API_KEY" \
--data-binary @- <<EOF
{
"engine": "postgres",
"name": "Production DB",
"details": {
"host": "orders-db.internal.shopkeep.io",
"port": 5432,
"dbname": "myapp",
"user": "readonly",
"password": "${ANALYTICS_RO_PASSWORD}",
"ssl": true
}
}
EOF
Create Questions
Metabase supports three ways to ask questions:
1. Simple Question — Point-and-click interface
- Pick a table → Add filters → Choose visualization
- No code required, great for non-technical users
2. Custom Question — Visual query builder
- Join tables, add calculated columns, group by, filter
- More powerful than simple, still no SQL
3. Native Query (SQL) — Write raw SQL
- Full SQL with variable support
- Template tags for interactive filters: {{date_range}}
-- revenue-query.sql: Native query with template variables in Metabase
SELECT
DATE_TRUNC('month', o.created_at) AS month,
COUNT(*) AS total_orders,
SUM(o.amount) AS revenue,
COUNT(DISTINCT o.user_id) AS unique_customers
FROM orders o
WHERE o.created_at >= {{start_date}}
AND o.created_at < {{end_date}}
AND o.status = 'completed'
AND o.category = {{category}}
GROUP BY 1
ORDER BY 1
Dashboard API
// create-dashboard.js: Create and populate a dashboard via API
const BASE = 'http://localhost:3000/api';
const headers = {
'Content-Type': 'application/json',
'X-API-Key': process.env.MB_API_KEY,
};
// Create dashboard
const dashboard = await fetch(`${BASE}/dashboard`, {
method: 'POST',
headers,
body: JSON.stringify({
name: 'Revenue Overview',
description: 'Monthly revenue and customer metrics',
collection_id: null,
}),
}).then(r => r.json());
// Add saved question cards. The grid is 24 columns wide. Every dashcard needs
// an `id`; use negative numbers for cards that are new on this dashboard.
// PUT replaces the dashboard's cards, so send existing dashcards too when updating.
await fetch(`${BASE}/dashboard/${dashboard.id}`, {
method: 'PUT',
headers,
body: JSON.stringify({
dashcards: [
{ id: -1, card_id: 1, row: 0, col: 0, size_x: 12, size_y: 6 },
{ id: -2, card_id: 2, row: 6, col: 0, size_x: 8, size_y: 4 },
],
}),
});
console.log(`Dashboard created: http://localhost:3000/dashboard/${dashboard.id}`);
Embedding
Static embedding (iframe URLs of the form /embed/dashboard/<token>) is deprecated; Metabase now calls signed-JWT embeds without logins "guest embeds" and renders them with web components. Turn it on under Embedding hub > Security (Enable embedding), then copy the embedding secret key from the same area. SSO-based embedding needs a Pro or Enterprise plan.
Server: sign a short-lived JWT (never in the browser, the secret stays on your server).
// embed-token.js: sign a guest-emb
Установить metabase в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл metabase?
Metabase is an open-source business intelligence tool for creating dashboards and visualizations. Learn Docker deployment, database connections, creating questions and dashboards, embedding analytics, and API usage.
Как установить скилл metabase?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл metabase запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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…
от 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…
от 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…
от 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…
от Anthropic