databy brycewang-stanford
Generate Variable Codebook
brycewang-stanford/codebook
Auto-generates a Markdown codebook from a dataset (CSV, DTA, Excel, Parquet) with types and summary statistics.
What it changes
Passed 8 of 15 test cases with the skill, and 7 of 15 without it.
Without skill45%
With skill50%
Checks it passed that the model alone missed
- Uses uv run python to execute Python scripts
- Includes the exact text string [FILL: description]
- Asks the user for guidance on how to load the file format
and 3 more in the full report
6 fixed5 passed either way6 still failing5 broke
- Pass-rate lift
- +5 pp
- Tokens
- -34%
- Agent turns
- 0%
- Response time
- -60%
Model gemini-3.6-flashMeasured 8/9/2026v111 of 22 cases passed with skill · 15 comparable
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
PromptWhat exact literal text string is placed in detailed variable sections to signal where human descriptions should be added?
What was checked, without and with the skill| Checked | Without skill | With skill |
|---|
| Includes the exact text string [FILL: description] | Missed | Passed |
|---|
What's inside
The instructions your model reads when the skill loads.
SKILL.md43 linessingle file
Generate Variable Codebook
Auto-generate a Markdown codebook documenting all variables in a dataset.
Arguments
$ARGUMENTS — path to a dataset file (e.g., data/rawData/sample_data.csv, data/panel.dta)
Steps
-
Determine the file format from the extension:
.csv — read with pandas read_csv
.dta — read with pandas read_stata
.xlsx / .xls — read with pandas read_excel
.parquet — read with pandas read_parquet
- Other formats: ask the user how to load it
-
Load the dataset using uv run python and extract metadata for each variable:
- Variable name
- Data type (numeric, string, categorical, datetime)
- Non-missing count and missing count
- Number of unique values
- For numeric variables: min, max, mean, median, standard deviation
- For categorical/string variables: top 5 most frequent values with counts
- For datetime variables: min and max date
-
Generate a Markdown codebook with:
- Header: Dataset name, file path, number of observations, number of variables, date generated
- Summary table: Variable name | Type | Non-missing | Unique | Description (placeholder)
- Detailed sections per variable: Full statistics and a
[FILL: description] placeholder for the user to add a human-readable description
-
Derive the output filename from the dataset name:
data/rawData/sample_data.csv → references/sample-data-codebook.md
-
Save to references/<dataset-name>-codebook.md
-
Report the file path and the number of variables documented.
Error handling
Track record
Benchmark
8 / 15
test cases passed, vs 7 / 15 without
Adoption
- Users
- 0
- Times used
- 0
Safety and source details
SkillSafety
✓ 3 of 3 passed✓Code scan15 of 15 checks clean
0 critical · 0 warning · 0 info — scanner v4 — 8/2/2026
View 15 scanner checks
live_secretremote_code_executionreverse_shelldata_exfiltrationssrf_metadataagent_snoopinganti_refusaldestructive_commandsobfuscated_unicodeunicode_homoglyphopaque_blobsuspicious_urltool_overreachtrigger_abuseprompt_injection_phrasing
✓IntentSafe
LLM judge · does the skill do what it claims
✓ContentClean
LLM judge · policy & harmful-content review
Source
Importedbrycewang-stanford / Auto-Empirical-Research-Skills
skills/29-quarcs-lab-project20XXy/dot-claude/skills/codebook/SKILL.md
View on GitHub ↗License NOASSERTIONImported 8/2/2026Version v1