jpskill.com
🛠️ 開発・MCP コミュニティ

explore-data

Profile and explore a dataset to understand its shape, quality, and patterns. Use when encountering a new table or file, checking null rates and column distributions, spotting data quality issues like duplicates or suspicious values, or deciding which dimensions and metrics to analyze.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o explore-data.zip https://jpskill.com/download/22587.zip && unzip -o explore-data.zip && rm explore-data.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22587.zip -OutFile "$d\explore-data.zip"; Expand-Archive "$d\explore-data.zip" -DestinationPath $d -Force; ri "$d\explore-data.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して explore-data.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → explore-data フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] explore-data

/explore-data - データセットのプロファイルと探索

見慣れないプレースホルダーが表示されたり、どのツールが接続されているかを確認する必要がある場合は、CONNECTORS.md を参照してください。

テーブルまたはアップロードされたファイルの包括的なデータプロファイルを生成します。分析に深く入る前に、その形状、品質、パターンを理解します。

使用方法

/explore-data <table_name or file>

ワークフロー

1. データへのアクセス

データウェアハウスの MCP サーバーが接続されている場合:

  1. テーブル名を解決します(スキーマプレフィックスを処理し、曖昧な場合は一致するものを提案します)。
  2. テーブルメタデータをクエリします:列名、型、利用可能な場合は説明。
  3. ライブデータに対してプロファイリングクエリを実行します。

ファイルが提供された場合(CSV、Excel、Parquet、JSON):

  1. ファイルを読み込み、作業用データセットにロードします。
  2. データから列の型を推測します。

どちらでもない場合:

  1. ユーザーにテーブル名(ウェアハウスが接続されている場合)またはファイルのアップロードを依頼します。
  2. テーブルスキーマを記述した場合、実行すべきプロファイリングクエリについてガイダンスを提供します。

2. 構造の理解

データを分析する前に、その構造を理解します。

テーブルレベルの質問:

  • 行と列の数はいくつですか?
  • 粒度(1行あたり何を表すか)は何ですか?
  • 主キーは何ですか?一意ですか?
  • データはいつ最終更新されましたか?
  • データはどこまで遡ることができますか?

列の分類 — 各列を次のいずれかに分類します。

  • 識別子: 一意キー、外部キー、エンティティ ID
  • ディメンション: グループ化/フィルタリングのためのカテゴリ属性(status、type、region、category)
  • メトリック: 測定のための定量的値(revenue、count、duration、score)
  • 時間: 日付とタイムスタンプ(created_at、updated_at、event_date)
  • テキスト: 自由形式のテキストフィールド(description、notes、name)
  • ブール: True/false フラグ
  • 構造: JSON、配列、ネストされた構造

3. データプロファイルの生成

以下のプロファイリングチェックを実行します。

テーブルレベルのメトリック:

  • 総行数
  • 列数と型の内訳
  • おおよそのテーブルサイズ(メタデータから利用可能な場合)
  • 日付範囲のカバー率(日付列の最小/最大)

すべての列:

  • Null 数と Null 率
  • 個別数とカーディナリティ比率(個別数 / 総数)
  • 最も一般的な値(頻度とともに上位5~10個)
  • 最も一般的でない値(異常を発見するための下位5個)

数値列(メトリック):

min, max, mean, median (p50)
standard deviation
percentiles: p1, p5, p25, p75, p95, p99
zero count
negative count (if unexpected)

文字列列(ディメンション、テキスト):

min length, max length, avg length
empty string count
pattern analysis (do values follow a format?)
case consistency (all upper, all lower, mixed?)
leading/trailing whitespace count

日付/タイムスタンプ列:

min date, max date
null dates
future dates (if unexpected)
distribution by month/week
gaps in time series

ブール列:

true count, false count, null count
true rate

プロファイルを、列の型(ディメンション、メトリック、日付、ID)でグループ化されたクリーンな要約テーブルとして提示します。

4. データ品質問題の特定

以下の品質評価フレームワークを適用します。潜在的な問題をフラグ付けします。

  • 高い Null 率: Null が5%を超える列(警告)、20%を超える列(アラート)
  • 低いカーディナリティの驚き: 高いカーディナリティであるべき列がそうでない場合(例:「user_id」が50個の異なる値しか持たない場合)
  • 高いカーディナリティの驚き: カテゴリカルであるべき列が多すぎる異なる値を持つ場合
  • 疑わしい値: 正の値のみが期待される場所での負の値、履歴データにおける未来の日付、明らかにプレースホルダーの値(例:「N/A」、「TBD」、「test」、「999999」)
  • 重複検出: 自然キーがあるかどうか、および重複があるかどうかを確認します。
  • 分布の歪み: 平均に影響を与える可能性のある極端に歪んだ数値分布
  • エンコーディングの問題: カテゴリカルフィールドでの大文字小文字の混在、末尾の空白、一貫性のない形式

5. 関係とパターンの発見

個々の列のプロファイリング後:

  • 外部キー候補: 他のテーブルにリンクする可能性のある ID 列
  • 階層: 自然なドリルダウンパスを形成する列(国 > 州 > 市)
  • 相関: 共に変動する数値列
  • 派生列: 他の列から計算されているように見える列
  • 冗長列: 同一またはほぼ同一の情報を持つ列

6. 興味深いディメンションとメトリックの提案

列のプロファイルに基づいて、以下を推奨します。

  • データをスライスするための最適なディメンション列(適切なカーディナリティを持つカテゴリカル列、3~50個の値)
  • 測定のための主要なメトリック列(意味のある分布を持つ数値列)
  • トレンド分析に適した時間列
  • データに現れる自然なグループ化または階層
  • 他のテーブルにリンクする潜在的な結合キー(ID 列、外部キー)

7. フォローアップ分析の推奨

ユーザーが次に実行できる3~5つの具体的な分析を提案します。

  • 「[metric] のトレンド分析を [time_column] で、[dimension] でグループ化」
  • 「[skewed_column] の分布の詳細分析で外れ値を理解」
  • 「[problematic_column] のデータ品質調査」
  • 「[metric_a] と [metric_b] の相関分析」
  • 「[date_column] と [status_column] を使用したコホート分析」

出力形式

## Data Profile: [table_name]

### Overview
- Rows: 2,340,891
- Columns: 23 (8 dimensions, 6 metrics, 4 dates, 5 IDs)
- Date range: 2021-03-15 to 2024-01-22

### Column Details
[summary table]

### Data Quality Issues
[flagged issues with severity]

### Recommended Explorations
[numbered list of suggested follow-up analyses]

品質評価フレームワーク

完全性スコア

各列を評価します。

  • 完全(99%以上の非 Null):緑
  • ほぼ完全(95-99%):黄 -- Null を調査してください
  • 不完全(80-95%):オレンジ -- 理由と重要性を理解してください
  • スパース(80%未満):赤 -- 補完なしでは使用できない可能性があります

一貫性チェック

以下を探します。

  • 値の形式の不一致: 同じ概念が異なる方法で表現されている場合(「USA」、「US」、「United States」、「us」)
  • Typ
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

/explore-data - Profile and Explore a Dataset

If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.

Generate a comprehensive data profile for a table or uploaded file. Understand its shape, quality, and patterns before diving into analysis.

Usage

/explore-data <table_name or file>

Workflow

1. Access the Data

If a data warehouse MCP server is connected:

  1. Resolve the table name (handle schema prefixes, suggest matches if ambiguous)
  2. Query table metadata: column names, types, descriptions if available
  3. Run profiling queries against the live data

If a file is provided (CSV, Excel, Parquet, JSON):

  1. Read the file and load into a working dataset
  2. Infer column types from the data

If neither:

  1. Ask the user to provide a table name (with their warehouse connected) or upload a file
  2. If they describe a table schema, provide guidance on what profiling queries to run

2. Understand Structure

Before analyzing any data, understand its structure:

Table-level questions:

  • How many rows and columns?
  • What is the grain (one row per what)?
  • What is the primary key? Is it unique?
  • When was the data last updated?
  • How far back does the data go?

Column classification — categorize each column as one of:

  • Identifier: Unique keys, foreign keys, entity IDs
  • Dimension: Categorical attributes for grouping/filtering (status, type, region, category)
  • Metric: Quantitative values for measurement (revenue, count, duration, score)
  • Temporal: Dates and timestamps (created_at, updated_at, event_date)
  • Text: Free-form text fields (description, notes, name)
  • Boolean: True/false flags
  • Structural: JSON, arrays, nested structures

3. Generate Data Profile

Run the following profiling checks:

Table-level metrics:

  • Total row count
  • Column count and types breakdown
  • Approximate table size (if available from metadata)
  • Date range coverage (min/max of date columns)

All columns:

  • Null count and null rate
  • Distinct count and cardinality ratio (distinct / total)
  • Most common values (top 5-10 with frequencies)
  • Least common values (bottom 5 to spot anomalies)

Numeric columns (metrics):

min, max, mean, median (p50)
standard deviation
percentiles: p1, p5, p25, p75, p95, p99
zero count
negative count (if unexpected)

String columns (dimensions, text):

min length, max length, avg length
empty string count
pattern analysis (do values follow a format?)
case consistency (all upper, all lower, mixed?)
leading/trailing whitespace count

Date/timestamp columns:

min date, max date
null dates
future dates (if unexpected)
distribution by month/week
gaps in time series

Boolean columns:

true count, false count, null count
true rate

Present the profile as a clean summary table, grouped by column type (dimensions, metrics, dates, IDs).

4. Identify Data Quality Issues

Apply the quality assessment framework below. Flag potential problems:

  • High null rates: Columns with >5% nulls (warn), >20% nulls (alert)
  • Low cardinality surprises: Columns that should be high-cardinality but aren't (e.g., a "user_id" with only 50 distinct values)
  • High cardinality surprises: Columns that should be categorical but have too many distinct values
  • Suspicious values: Negative amounts where only positive expected, future dates in historical data, obviously placeholder values (e.g., "N/A", "TBD", "test", "999999")
  • Duplicate detection: Check if there's a natural key and whether it has duplicates
  • Distribution skew: Extremely skewed numeric distributions that could affect averages
  • Encoding issues: Mixed case in categorical fields, trailing whitespace, inconsistent formats

5. Discover Relationships and Patterns

After profiling individual columns:

  • Foreign key candidates: ID columns that might link to other tables
  • Hierarchies: Columns that form natural drill-down paths (country > state > city)
  • Correlations: Numeric columns that move together
  • Derived columns: Columns that appear to be computed from others
  • Redundant columns: Columns with identical or near-identical information

6. Suggest Interesting Dimensions and Metrics

Based on the column profile, recommend:

  • Best dimension columns for slicing data (categorical columns with reasonable cardinality, 3-50 values)
  • Key metric columns for measurement (numeric columns with meaningful distributions)
  • Time columns suitable for trend analysis
  • Natural groupings or hierarchies apparent in the data
  • Potential join keys linking to other tables (ID columns, foreign keys)

7. Recommend Follow-Up Analyses

Suggest 3-5 specific analyses the user could run next:

  • "Trend analysis on [metric] by [time_column] grouped by [dimension]"
  • "Distribution deep-dive on [skewed_column] to understand outliers"
  • "Data quality investigation on [problematic_column]"
  • "Correlation analysis between [metric_a] and [metric_b]"
  • "Cohort analysis using [date_column] and [status_column]"

Output Format

## Data Profile: [table_name]

### Overview
- Rows: 2,340,891
- Columns: 23 (8 dimensions, 6 metrics, 4 dates, 5 IDs)
- Date range: 2021-03-15 to 2024-01-22

### Column Details
[summary table]

### Data Quality Issues
[flagged issues with severity]

### Recommended Explorations
[numbered list of suggested follow-up analyses]

Quality Assessment Framework

Completeness Score

Rate each column:

  • Complete (>99% non-null): Green
  • Mostly complete (95-99%): Yellow -- investigate the nulls
  • Incomplete (80-95%): Orange -- understand why and whether it matters
  • Sparse (<80%): Red -- may not be usable without imputation

Consistency Checks

Look for:

  • Value format inconsistency: Same concept represented differently ("USA", "US", "United States", "us")
  • Type inconsistency: Numbers stored as strings, dates in various formats
  • Referential integrity: Foreign keys that don't match any parent record
  • Business rule violations: Negative quantities, end dates before start dates, percentages > 100
  • Cross-column consistency: Status = "completed" but completed_at is null

Accuracy Indicators

Red flags that suggest accuracy issues:

  • Placeholder values: 0, -1, 999999, "N/A", "TBD", "test", "xxx"
  • Default values: Suspiciously high frequency of a single value
  • Stale data: Updated_at shows no recent changes in an active system
  • Impossible values: Ages > 150, dates in the far future, negative durations
  • Round number bias: All values ending in 0 or 5 (suggests estimation, not measurement)

Timeliness Assessment

  • When was the table last updated?
  • What is the expected update frequency?
  • Is there a lag between event time and load time?
  • Are there gaps in the time series?

Pattern Discovery Techniques

Distribution Analysis

For numeric columns, characterize the distribution:

  • Normal: Mean and median are close, bell-shaped
  • Skewed right: Long tail of high values (common for revenue, session duration)
  • Skewed left: Long tail of low values (less common)
  • Bimodal: Two peaks (suggests two distinct populations)
  • Power law: Few very large values, many small ones (common for user activity)
  • Uniform: Roughly equal frequency across range (often synthetic or random)

Temporal Patterns

For time series data, look for:

  • Trend: Sustained upward or downward movement
  • Seasonality: Repeating patterns (weekly, monthly, quarterly, annual)
  • Day-of-week effects: Weekday vs. weekend differences
  • Holiday effects: Drops or spikes around known holidays
  • Change points: Sudden shifts in level or trend
  • Anomalies: Individual data points that break the pattern

Segmentation Discovery

Identify natural segments by:

  • Finding categorical columns with 3-20 distinct values
  • Comparing metric distributions across segment values
  • Looking for segments with significantly different behavior
  • Testing whether segments are homogeneous or contain sub-segments

Correlation Exploration

Between numeric columns:

  • Compute correlation matrix for all metric pairs
  • Flag strong correlations (|r| > 0.7) for investigation
  • Note: Correlation does not imply causation -- flag this explicitly
  • Check for non-linear relationships (e.g., quadratic, logarithmic)

Schema Understanding and Documentation

Schema Documentation Template

When documenting a dataset for team use:

## Table: [schema.table_name]

**Description**: [What this table represents]
**Grain**: [One row per...]
**Primary Key**: [column(s)]
**Row Count**: [approximate, with date]
**Update Frequency**: [real-time / hourly / daily / weekly]
**Owner**: [team or person responsible]

### Key Columns

| Column | Type | Description | Example Values | Notes |
|--------|------|-------------|----------------|-------|
| user_id | STRING | Unique user identifier | "usr_abc123" | FK to users.id |
| event_type | STRING | Type of event | "click", "view", "purchase" | 15 distinct values |
| revenue | DECIMAL | Transaction revenue in USD | 29.99, 149.00 | Null for non-purchase events |
| created_at | TIMESTAMP | When the event occurred | 2024-01-15 14:23:01 | Partitioned on this column |

### Relationships
- Joins to `users` on `user_id`
- Joins to `products` on `product_id`
- Parent of `event_details` (1:many on event_id)

### Known Issues
- [List any known data quality issues]
- [Note any gotchas for analysts]

### Common Query Patterns
- [Typical use cases for this table]

Schema Exploration Queries

When connected to a data warehouse, use these patterns to discover schema:

-- List all tables in a schema (PostgreSQL)
SELECT table_name, table_type
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;

-- Column details (PostgreSQL)
SELECT column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_name = 'my_table'
ORDER BY ordinal_position;

-- Table sizes (PostgreSQL)
SELECT relname, pg_size_pretty(pg_total_relation_size(relid))
FROM pg_catalog.pg_statio_user_tables
ORDER BY pg_total_relation_size(relid) DESC;

-- Row counts for all tables (general pattern)
-- Run per-table: SELECT COUNT(*) FROM table_name

Lineage and Dependencies

When exploring an unfamiliar data environment:

  1. Start with the "output" tables (what reports or dashboards consume)
  2. Trace upstream: What tables feed into them?
  3. Identify raw/staging/mart layers
  4. Map the transformation chain from raw data to analytical tables
  5. Note where data is enriched, filtered, or aggregated

Tips

  • For very large tables (100M+ rows), profiling queries use sampling by default -- mention if you need exact counts
  • If exploring a new dataset for the first time, this command gives you the lay of the land before writing specific queries
  • The quality flags are heuristic -- not every flag is a real problem, but each is worth a quick look