Community研究&データ分析github.com

grahama1970/analytics

あらゆるデータセットに対応した柔軟なデータサイエンス分析スキル。スキーマを自動検出し、グラフを推奨し、create-figure でエクスポートします。JSONL、JSON、CSV など、あらゆるソースからのデータを処理できます。

analytics とは?

このスキルは、Agent にデータ分析と可視化機能を提供します。任意の JSONL、JSON、CSV データセットを分析し、そのスキーマを自動検出、列タイプを識別、最適なグラフを推奨します。分析結果は create-figure フォーマットでエクスポートでき、高品質な PDF/PNG 画像を生成します。主なコマンドは `describe` (データ探索とグラフ推奨)、`group-by` (グループ化と集計)、`stats` (数値統計)、`chart` (グラフ仕様生成) などがあります。また、`insights`、`trends`、`sessions`、`time-patterns` などのコマンドにより、タイムスタンプ付きデータの時系列分析やセッション分析も可能です。Agent はスキーマを自動検出して適切な可視化を生成するため、データの前処理や分析手法に関する深い知識なしでも、データの洞察を素早く得ることができます。対応フォーマットは JSONL、JSON、CSV で、CREATE-FIGURE と HORUS スキルと組み合わせて使用することで、本格的なレポートやダッシュボードを生成できます。

対応~Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/analytics

Installed? Explore more 研究&データ分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Analytics スキル

あらゆるデータセットに対応する柔軟なデータサイエンス分析。スキーマを自動検出し、可視化を推奨し、create-figure 形式でエクスポートします。

クイックスタート(任意のデータセット)

cd .pi/skills/analytics

# Step 1: データの内容を確認
./run.sh describe data.jsonl

# Step 2: 推奨を確認し、グラフを生成
./run.sh chart data.jsonl --name distribution_channel -o chart.json

# Step 3: create-figure でレンダリング
cd .agent/skills/create-figure
./run.sh metrics -i /path/to/chart.json --type bar -o chart.pdf

シームレスなパイプライン

任意のデータ (JSONL/JSON/CSV)
         │
         ▼
┌─────────────────────────────────┐
│     analytics describe          │  ← スキーマを検出、グラフを推奨
│  "5 カテゴリ、2 数値、         │
│   1 時系列列を検出"           │
│  推奨:			      │
│   - distribution_channel (棒)   │
│   - trend_by_date (折れ線)      │
│   - heatmap_hour_x_day          │
└─────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────┐
│     analytics chart/group-by    │  ← create-figure 形式でグラフデータを生成
│  --name distribution_channel    │
│  -o chart.json                  │
└─────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────┐
│     create-figure metrics       │  ← 出版品質の PDF/PNG をレンダリング
│  -i chart.json --type bar       │
│  -o channel_distribution.pdf    │
└─────────────────────────────────┘

コマンド

探索(ここから開始)

コマンド説明
describe <file>スキーマを検出、列タイプを識別、グラフを推奨
./run.sh describe sales.jsonl
# 出力:
# Columns: date (temporal), product (categorical), amount (numerical), region (categorical)
# Recommendations:
#   1. distribution_product - Distribution of product
#   2. distribution_region - Distribution of region
#   3. trend_by_date - Count over date
#   4. heatmap_product_x_region - product vs region

柔軟な分析

コマンド説明
group-by <file>任意の列でグループ化し集計
stats <file>数値統計と相関
chart <file>create-figure 用のグラフ仕様を生成
# 任意の列でグループ化
./run.sh group-by data.jsonl --by channel --for-figure -o by_channel.json
./run.sh group-by data.jsonl --by category --agg price --func sum

# 数値統計
./run.sh stats data.jsonl --columns revenue,cost,profit

# 推奨からグラフを生成
./run.sh chart data.jsonl --name distribution_channel -o chart.json

タイムスタンプ付きデータ(ingest-* の出力)

コマンド説明
insights <file>完全な分析サマリー(トレンド、セッション、パターン)
trends <file>移動平均を含む視聴トレンド
sessions <file>セッション検出とビンジ分析
time-patterns <file>時間/曜日分布
evolution <file>経時的な嗜好の変化

出力

コマンド説明
export <file>すべての標準グラフを一括エクスポート
report <file>Horus スタイルのナラティブレポート

対応フォーマット

フォーマット拡張子自動検出
JSONL.jsonl行区切り JSON
JSON.json配列または {data: [...]}
CSV.csvカンマ区切り

列タイプ検出

describe コマンドは自動的に以下を検出します:

タイプ検出ロジック推奨グラフ
temporal (時系列)datetime64、日付のような文字列折れ線、面積、ヒートマップ(時間軸)
numerical (数値)int64、float64ヒストグラム、散布図、統計
categorical (カテゴリ)低カーディナリティ(≤20 ユニーク)棒、円、ヒートマップ
boolean (ブーリアン)bool 型円(true/false)
text (テキスト)高カーディナリティ文字列ワードクラウド、Top-N

グラフ推奨

列タイプに基づいて、analytics は以下を推奨します:

データパターングラフタイプcreate-figure コマンド
1 カテゴリ棒、円metrics --type bar
1 時系列折れ線training-curves
2 カテゴリヒートマップheatmap
時系列 + カテゴリヒートマップheatmap
2+ 数値相関行列heatmap
1 数値ヒストグラムmetrics --type bar

Agent ワークフロー

プロジェクトエージェントが任意のデータセットを分析し可視化する場合:

# 1. スキーマを発見
result = run("./run.sh describe data.jsonl --json")
recommendations = result["recommendations"]

# 2. 最初の推奨を選択
chart_name = recommendations[0]["name"]
cmd = recommendations[0]["create_figure_cmd"]

# 3. グラフデータを生成
run(f"./run.sh chart data.jsonl --name {chart_name} -o chart.json")

# 4. レンダリング
run(f"cd .agent/skills/create-figure && ./run.sh {cmd} -i chart.json -o chart.pdf")

例

Eコマース販売データ

# データ: orders.jsonl、date, product, category, amount, region

./run.sh describe orders.jsonl
# → 推奨: distribution_category, distribution_region, trend_by_date

./run.sh group-by orders.jsonl --by category --agg amount --func sum --for-figure -o revenue_by_category.json
# → {"metrics": {"Electronics": 45000, "Clothing": 32000, ...}}

cd .agent/skills/create-figure
./run.sh metrics -i revenue_by_category.json --type bar -o revenue.pdf

YouTube 履歴(ingest-yt-history)

# 専用のタイムスタンプ付きコマンドを使用
./run.sh insights ~/.pi/ingest-yt-history/history.jsonl
./run.sh export ~/.pi/ingest-yt-history/history.jsonl -o ./charts --for-figure

cd .agent/skills/create-figure
./run.sh heatmap -i charts/heatmap.json -o viewing_heatmap.pdf

API レスポンスデータ

# データ: api_logs.json、endpoint, status_code, response_time, user_id

./run.sh describe api_logs.json
./run.sh stats api_logs.json --columns response_time
# → mean=245.3ms, std=89.2ms, p50=220ms, p99=450ms

./run.sh group-by api_logs.json --by endpoint --agg response_time --func mean --for-figure -o latency.json

依存関係

# pyproject.toml
dependencies = [
    "pandas>=2.0.0",
    "typer>=0.9.0",
    "rich>=13.0.0",
]

Horus との統合

# Horus ナラティブスタイル
./run.sh insights ~/.pi/ingest-yt-history/history.jsonl --horus

# 出力:
# "Your viewing patterns reveal a nocturnal tendency toward melancholic content.
#  Peak activity occurs in the twilight hours, with music consumption intensifying
#  during introspective night sessions..."

よくある間違い

# 間違い: 未知のデータセットに直接 stats を実行
./run.sh stats data.jsonl --columns revenue,cost
# → 数値以外の列でエラー("USD 1000" はテキスト)
# 正解: 常に最初に describe を実行
./run.sh describe data.jsonl
# → 列タイプを表示、正しいグラフコマンドを推奨

# 間違い: describe の推奨なしに手動でグラフタイプを選択
./run.sh group-by data.jsonl --by date --agg views | ./run.sh metrics --type pie
# → 時系列データに円グラフは無意味
# 正解: describe の推奨する create-figure コマンドを使用

# 間違い: JSONL スキーマが期待通りであると仮定
# → フィールド名の変更、null 値、型の混在あり
# 正解: describe がこれらをすべて自動検出

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agent-ecosystem

Canonical map and shared contracts for the agent-governance ecosystem: the pi.receipt_envelope.v1 boundary envelope, the component graph, and the rules for which component owns which schema. Use when wiring a skill or extension into the shared receipt world, when asking how shame, triage-error, tau, ask, project-watchdog, ops-herdr, ponytail, and Memory fit together, or when validating an envelope.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/align

Round-based context alignment before execution. Use when the human, project agent, WebGPT, scillm, ask, dogpile, memory, or project-knowledge may each hold different facts about a task; especially before ambiguous design, infographic, product workflow, high-stakes implementation, plan-iterate, project-infographic, or multi-review work.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/assistant-lab

Self-improvement workbench for /assistant. All the tools needed to diagnose, train, evaluate, and promote models in a continuous loop. The "warm pond" where /assistant evolves its own inference stack.

grahama1970/batch-quality

Pre-flight validation and quality gates for batch LLM operations. ACTUALLY tests samples through LLM before burning tokens. Uses SPARTA contracts for DuckDB validation queries. Integrates with task-monitor for enforced quality gates.

関連スキル