# dril-dataset-construction

dril-dataset-construction implements the DRIL methodology to assemble economic datasets from primary sources via AI agents. Ideal for constructing panel data, legal variables, and cited codebooks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 240 repo stars
- Author: franklee16
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/franklee16/academic-research-skills/tree/HEAD/data-sourcing/dril-dataset-construction/SKILL.md
- Updated: 2026-09-18
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/dril-dataset-construction

## What it does

This skill brings the Deep Research on a Loop (DRIL) framework from Afonso et al. (NBER w35188) into Claude Code. It turns open-ended web digging into a standardized data extraction routine across enumerable units like countries and years. The pipeline separates protocol design from per-unit data collection.

During the design stage, the agent writes a frozen protocol consisting of `codebook.yaml` and a unit index in `units.csv`. The execution phase then iterates through every mapped row, issuing search queries, scoring variables against rules, and compiling answers into `dataset.csv`. Every coded cell pairs with exact quotes and source locators inside `evidence_records.json`.

Reviewing the codebook requires domain knowledge. You must inspect it before full-scale extraction begins. If target dimensions remain vague, the agent cannot freeze a valid instrument.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill dril-dataset-construction -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/dril-dataset-construction/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/dril-dataset-construction/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill dril-dataset-construction -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/dril-dataset-construction/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill dril-dataset-construction -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/dril-dataset-construction/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install franklee16/academic-research-skills data-sourcing/dril-dataset-construction/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/dril-dataset-construction/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add franklee16/academic-research-skills --skill dril-dataset-construction -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/franklee16/academic-research-skills --path data-sourcing/dril-dataset-construction
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/dril-dataset-construction/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/franklee16/academic-research-skills/tree/HEAD/data-sourcing/dril-dataset-construction/SKILL.md

## When to use it
- Build cross-country panel datasets from primary legal and government documents
- Generate formal codebooks with explicit coding rules and value types
- Extract institutional variables while preserving verbatim citation evidence
- Log search queries and document missing data reasons systematically

## Example prompts
- Build a dataset on central bank independence for OECD countries between 2010 and 2023 using DRIL.
- Create a codebook and unit space to compare subnational borrowing rules across Latin America.
- Collect corporate tax rates across our target countries and document exact legal citations for each year.

## Similar
- [dataset-curation](https://affpapa.org/en/nevibecode/skills/dataset-curation.md) — skill · 2600 installs
- [tao-validate-dataset-format](https://affpapa.org/en/nevibecode/skills/tao-validate-dataset-format.md) — skill · 1600 installs
- [tao-convert-dataset-format](https://affpapa.org/en/nevibecode/skills/tao-convert-dataset-format.md) — skill · 1600 installs
- [arize-dataset](https://affpapa.org/en/nevibecode/skills/arize-dataset.md) — skill · 1100 installs
- [wildworld-dataset](https://affpapa.org/en/nevibecode/skills/wildworld-dataset.md) — skill · 790 installs
- [python-panel-data](https://affpapa.org/en/nevibecode/skills/python-panel-data.md) — skill · 163 installs

From the same set: [franklee16/academic-research-skills](https://affpapa.org/en/nevibecode/by/franklee16/academic-research-skills.md) — 98 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
