analytics

Analyse de science des données flexible pour tout ensemble de données. Découverte automatique du schéma, recommandation de graphiques, export vers create-figure. Fonctionne avec JSONL, JSON, CSV de toute source.

Qu'est-ce que analytics ?

Cette compétence offre une analyse de science des données flexible qui fonctionne avec n'importe quel ensemble de données, en détectant automatiquement le schéma et en recommandant des visualisations. Elle prend en charge les formats JSONL, JSON et CSV, et permet une intégration transparente avec l'outil create-figure pour produire des graphiques de qualité publication. Son pipeline commence par la découverte du schéma via la commande `describe`, qui identifie les types de colonnes (temporel, numérique, catégoriel, booléen, texte) et recommande des types de graphiques appropriés. Ensuite, les commandes `chart` ou `group-by` génèrent les données de graphique dans un format compatible avec create-figure, qui peut ensuite produire des PDF ou PNG. La compétence est particulièrement utile pour les agents travaillant avec des données provenant d'ingesteurs ou d'API, et inclut des commandes spécialisées (comme `insights`, `trends`, `sessions`) pour les données horodatées. Elle s'intègre également avec l'outil Horus pour générer des rapports narratifs.

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

Installed? Explore more Recherche et analyse de données skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Compétence Analytics

Analyse de science des données flexible qui fonctionne avec n'importe quel ensemble de données. Découverte automatique du schéma, recommandation de visualisations et export au format create-figure.

Démarrage rapide (Tout ensemble de données)

cd .pi/skills/analytics

# Étape 1 : Découvrir ce que contiennent les données
./run.sh describe data.jsonl

# Étape 2 : Voir les recommandations et générer un graphique
./run.sh chart data.jsonl --name distribution_channel -o chart.json

# Étape 3 : Rendre avec create-figure
cd .agent/skills/create-figure
./run.sh metrics -i /path/to/chart.json --type bar -o chart.pdf

Le Pipeline Transparent

Toutes données (JSONL/JSON/CSV)
         │
         ▼
┌─────────────────────────────────┐
│     analytics describe          │  ← Découvre le schéma, recommande des graphiques
│  "5 colonnes catégorie, 2       │
│   numériques, 1 temporelle"     │
│  Recommandations :              │
│   - distribution_channel (bar)  │
│   - trend_by_date (line)        │
│   - heatmap_hour_x_day          │
└─────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────┐
│     analytics chart/group-by    │  ← Génère les données du graphique au format create-figure
│  --name distribution_channel    │
│  -o chart.json                  │
└─────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────┐
│     create-figure metrics       │  ← Produit des PDF/PNG de qualité publication
│  -i chart.json --type bar       │
│  -o channel_distribution.pdf    │
└─────────────────────────────────┘

Commandes

Découverte (Commencez ici)

CommandeDescription
describe <file>Découvrir le schéma, détecter les types de colonnes, recommander des graphiques
./run.sh describe sales.jsonl
# Résultat :
# Colonnes : date (temporelle), product (catégorie), amount (numérique), region (catégorie)
# Recommandations :
#   1. distribution_product - Distribution de product
#   2. distribution_region - Distribution de region
#   3. trend_by_date - Comptage par date
#   4. heatmap_product_x_region - product vs region

Analyse Flexible

CommandeDescription
group-by <file>Grouper par n'importe quelle colonne avec agrégation
stats <file>Statistiques numériques et corrélations
chart <file>Générer une spécification de graphique pour create-figure
# Grouper par n'importe quelle colonne
./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

# Statistiques numériques
./run.sh stats data.jsonl --columns revenue,cost,profit

# Générer un graphique à partir d'une recommandation
./run.sh chart data.jsonl --name distribution_channel -o chart.json

Données Horodatées (sorties ingest-*)

CommandeDescription
insights <file>Résumé d'analyse complet (tendances, sessions, motifs)
trends <file>Tendances de visualisation avec moyennes mobiles
sessions <file>Détection de sessions et analyse de binge
time-patterns <file>Distribution horaire/journalière
evolution <file>Comment les préférences changent au fil du temps

Sortie

CommandeDescription
export <file>Exportation groupée de tous les graphiques standard
report <file>Rapport narratif de style Horus

Formats Pris en Charge

FormatExtensionDétection automatique
JSONL.jsonlJSON délimité par ligne
JSON.jsonTableau ou {data: [...]}
CSV.csvValeurs séparées par des virgules

Détection des Types de Colonnes

La commande describe détecte automatiquement :

TypeLogique de détectionGraphiques recommandés
temporeldatetime64, chaînes de type dateline, area, heatmap (axe temporel)
numériqueint64, float64histogram, scatter, stats
catégorielfaible cardinalité (≤20 uniques)bar, pie, heatmap
booléendtype boolpie (vrai/faux)
textechaînes de haute cardinaliténuage de mots, top-N

Recommandations de Graphiques

Basées sur les types de colonnes, analytics recommande :

Motif de donnéesType de graphiqueCommande create-figure
1 catégorielbar, piemetrics --type bar
1 temporellinetraining-curves
2 catégorielsheatmapheatmap
temporel + catégorielheatmapheatmap
2+ numériquesmatrice de corrélationheatmap
1 numériquehistogrammetrics --type bar

Flux de Travail pour Agent

Pour qu'un agent projet analyse n'importe quel ensemble de données et le visualise :

# 1. Découvrir le schéma
result = run("./run.sh describe data.jsonl --json")
recommendations = result["recommendations"]

# 2. Choisir la première recommandation
chart_name = recommendations[0]["name"]
cmd = recommendations[0]["create_figure_cmd"]

# 3. Générer les données du graphique
run(f"./run.sh chart data.jsonl --name {chart_name} -o chart.json")

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

Exemples

Données de Vente E-commerce

# Données : orders.jsonl avec date, product, category, amount, region

./run.sh describe orders.jsonl
# → Recommande : 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

Historique YouTube (ingest-yt-history)

# Utiliser des commandes spécialisées pour données horodatées
./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

Données de Réponse API

# Données : api_logs.json avec 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

Dépendances

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

Intégration avec Horus

# Style narratif Horus
./run.sh insights ~/.pi/ingest-yt-history/history.jsonl --horus

# Résultat :
# "Vos habitudes de visionnage révèlent une tendance nocturne vers un contenu mélancolique.
#  L'activité maximale se produit pendant les heures crépusculaires, avec une consommation musicale
#  qui s'intensifie lors des sessions nocturnes introspectives..."

Erreurs Courantes

# FAUX : Appeler stats directement sur un ensemble de données inconnu
./run.sh stats data.jsonl --columns revenue,cost
# → Échoue sur les colonnes non numériques ("USD 1000" est du texte, pas un nombre)
# JUSTE : Toujours exécuter describe d'abord
./run.sh describe data.jsonl
# → Affiche les types de colonnes, recommande les commandes de graphiques correctes

# FAUX : Choisir manuellement le type de graphique sans la recommandation de describe
./run.sh group-by data.jsonl --by date --agg views | ./run.sh metrics --type pie
# → Un graphique circulaire pour des données temporelles est inutile
# JUSTE : Utiliser la commande create-figure recommandée par describe

# FAUX : Supposer que le schéma JSONL correspond aux attentes
# → Champs renommés, valeurs NULL présentes, types mélangés
# JUSTE : describe détecte automatiquement tout cela

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.

Skills associés