Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Upload messy CSVs with minimal prompting for deep automated analysis
.claude/skills/brycewang-stanford-data-cog-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-13 | ✓→✗ | ▼ Worse | -20% | 0% |
An intelligent data analysis assistant that accepts messy, poorly documented CSV files and automatically infers structure, cleans anomalies, and produces deep analytical reports with minimal user prompting. Designed for researchers who need quick insights from unfamiliar or inherited datasets without spending hours on manual data preparation.
Researchers frequently receive datasets from collaborators, public repositories, or legacy systems that lack documentation, use inconsistent formatting, and contain mixed data quality. Traditional analysis requires significant upfront effort to understand and prepare such data. Data Cog automates this process by applying heuristic inference, pattern recognition, and iterative cleaning to produce analysis-ready data along with a comprehensive profile report.
The skill implements a "zero-configuration" philosophy: provide the CSV file path and an optional research question, and it handles encoding detection, delimiter inference, type casting, missingness assessment, and initial exploratory statistics automatically.
pythonimport pandas as pd import chardet import io def smart_load_csv(filepath: str) -> tuple: """ Intelligently load a CSV file, auto-detecting encoding, delimiter, header row, and comment lines. """ # Step 1: Detect encoding with open(filepath, 'rb') as f: raw = f.read(100000) encoding = chardet.detect(raw)['encoding'] # Step 2: Detect delimiter import csv with open(filepath, 'r', encoding=encoding, errors='replace') as f: sample = f.read(8192) sniffer = csv.Sniffer() try: dialect = sniffer.sniff(sample) delimiter = dialect.delimiter except csv.Error: delimiter = ',' # Step 3: Detect header row (skip comment lines) skip_rows = 0 with open(filepath, 'r', encoding=encoding, errors='replace') as f: for line in f: if line.startswith('#') or line.startswith('//') or line.strip() == '': skip_rows += 1 else: break # Step 4: Load with inferred parameters df = pd.read_csv( filepath, encoding=encoding, delimiter=delimiter, skiprows=skip_rows, low_memory=False ) metadata = { 'encoding': encoding, 'delimiter': repr(delimiter), 'skipped_rows': skip_rows, 'shape': df.shape } return df, metadata
pythondef auto_cast_columns(df: pd.DataFrame) -> pd.DataFrame: """ Automatically cast columns to their most appropriate types. Handles dates, numerics stored as strings, booleans, and categories. """ for col in df.columns: # Try numeric conversion numeric = pd.to_numeric(df[col], errors='coerce') if numeric.notna().mean() > 0.85: df[col] = numeric continue # Try datetime conversion datetime = pd.to_datetime(df[col], errors='coerce', infer_datetime_format=True) if datetime.notna().mean() > 0.85: df[col] = datetime continue # Try boolean detection unique_lower = df[col].dropna().astype(str).str.lower().unique() if set(unique_lower).issubset({'true', 'false', 'yes', 'no', '1', '0', 'y', 'n'}): df[col] = df[col].astype(str).str.lower().map( {'true': True, 'false': False, 'yes': True, 'no': False, '1': True, '0': False, 'y': True, 'n': False} ) continue # Convert low-cardinality strings to category if df[col].nunique() / len(df) < 0.05 and df[col].nunique() < 50: df[col] = df[col].astype('category') return df
The profiling stage produces a structured report covering:
| Metric | Numeric Columns | Categorical Columns | |--------|----------------|-------------------| | Central tendency | Mean, median, mode | Mode, frequency | | Dispersion | Std, IQR, range, CV | Unique count, entropy | | Shape | Skewness, kurtosis | Imbalance ratio | | Quality | Missing %, zero %, outlier % | Missing %, rare labels % |
The recommended workflow requires only three inputs:
User: Analyze /data/survey_results_2025.csv
Question: What factors predict participant satisfaction?
Output: full_report
Data Cog will:
1. Load and profile the dataset (auto-detect everything)
2. Clean and transform (handle missing data, encode categoricals)
3. Run correlation analysis focused on satisfaction-related columns
4. Generate regression models predicting satisfaction
5. Produce a structured report with findings and visualizationsAfter the initial automated analysis, you can refine by asking targeted follow-up questions:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 26,993 | 39,188 | +45% | 1 | 1 | 0% | 5,399 | 8,717 | +61% | 0 | 0 | — |
case-02 | fail→fail | 6,991 | 13,862 | +98% | 1 | 1 | 0% | 315 | 2,870 | +811% | 0 | 0 | — |
case-03 | fail→pass | 12,646 | 13,900 | +10% | 1 | 1 | 0% | 2,261 | 4,086 | +81% | 0 | 0 | — |
case-04 | pass→pass | 14,863 | 11,644 | -22% | 1 | 1 | 0% | 2,423 | 3,540 | +46% | 0 | 0 | — |
case-05 | pass→pass | 8,732 | 2,287 | -74% | 1 | 1 | 0% | 1,498 | 1,967 | +31% | 0 | 0 | — |
case-06 | pass→pass | 12,322 | 2,715 | -78% | 1 | 1 | 0% | 2,033 | 2,156 | +6% | 0 | 0 | — |
case-07 | fail→pass | 13,388 | 4,192 | -69% | 1 | 1 | 0% | 2,201 | 2,324 | +6% | 0 | 0 | — |
case-08 | pass→pass | 11,170 | 14,079 | +26% | 1 | 1 | 0% | 2,070 | 4,128 | +99% | 0 | 0 | — |
case-09 | fail→fail | 19,205 | 17,158 | -11% | 1 | 1 | 0% | 3,342 | 4,733 | +42% | 0 | 0 | — |
case-10 | pass→pass | 16,264 | 16,116 | -1% | 1 | 1 | 0% | 2,738 | 4,301 | +57% | 0 | 0 | — |
case-11 | fail→pass | 12,685 | 8,394 | -34% | 1 | 1 | 0% | 2,019 | 3,051 | +51% | 0 | 0 | — |
case-12 | pass→pass | 12,173 | 3,074 | -75% | 1 | 1 | 0% | 1,965 | 2,153 | +10% | 0 | 0 | — |
case-13 | pass→fail | 18,522 | 4,068 | -78% | 1 | 1 | 0% | 2,740 | 2,199 | -20% | 0 | 0 | — |
case-14 | pass→pass | 11,749 | 10,114 | -14% | 1 | 1 | 0% | 1,947 | 3,420 | +76% | 0 | 0 | — |
case-15 | pass→pass | 11,589 | 5,184 | -55% | 1 | 1 | 0% | 1,816 | 2,386 | +31% | 0 | 0 | — |
case-16 | pass→pass | 10,249 | 2,640 | -74% | 1 | 1 | 0% | 1,580 | 2,066 | +31% | 0 | 0 | — |
case-17 | pass→pass | 13,025 | 3,926 | -70% | 1 | 1 | 0% | 2,036 | 2,292 | +13% | 0 | 0 | — |
case-18 | fail→fail | 11,234 | 4,049 | -64% | 1 | 1 | 0% | 1,806 | 2,316 | +28% | 0 | 0 | — |
case-19 | fail→pass | 11,137 | 2,588 | -77% | 1 | 1 | 0% | 1,732 | 2,103 | +21% | 0 | 0 | — |
case-20 | pass→pass | 19,914 | 19,859 | -0% | 1 | 1 | 0% | 3,371 | 5,002 | +48% | 0 | 0 | — |
case-21 | pass→pass | 18,135 | 22,448 | +24% | 1 | 1 | 0% | 2,630 | 4,942 | +88% | 0 | 0 | — |
case-22 | pass→pass | 23,316 | 25,234 | +8% | 1 | 1 | 0% | 4,169 | 6,074 | +46% | 0 | 0 | — |
case-23 | pass→pass | 20,570 | 24,625 | +20% | 1 | 1 | 0% | 3,691 | 5,483 | +49% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 22 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +13 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.