agentsclimarketplace

Economist data skill

Skill brycewang-stanford/Auto-Empirical-Research-Skills/skills/37-IlanStrauss-ai-skills/Skills/economist-data-skill

Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.From its SKILL.md

Install
npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill economist-data-skill

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

18.8 KB, ~4.3k tokens by cl100k_base, as published. Nobody here has run it

Economist Data Skill

Overview

A Claude skill for economists that ensures rigorous data decisions and directs users only to authoritative sources. Interfaces with Playwright MCP for web data retrieval.

Tagline: Real data, not articles about data.


Core Principle

This skill ensures users make conscious, explicit decisions about data specifications before any data is retrieved. It only directs users to authoritative, high-quality sources.

The skill interfaces with Playwright MCP to navigate data portals and extract data. Users do not need to understand Playwright - they simply request data and confirm specifications.


Compatibility

This skill works with any AI agent that has browser automation capabilities:

  • Claude → Playwright MCP
  • Other agents → Playwright, Selenium, Puppeteer, or equivalent

The core logic (data decisions, source selection, output format) is agent-agnostic.


Prerequisites Check

Before using this skill, verify browser automation is installed and working.

First-time users:

⚠️  BROWSER AUTOMATION REQUIRED

This skill uses browser automation to fetch data from authoritative sources.

Do you have browser automation available?
→ [Y] Yes, it's installed and working
→ [N] No, I need to install it

For Claude users (Playwright MCP):
1. npm install -g @anthropic/mcp-playwright
2. Configure in your Claude settings
3. Restart Claude and return to this skill
Documentation: https://github.com/anthropics/mcp-playwright

For other AI agents:
- Ensure Playwright, Selenium, or equivalent is configured
- Agent must be able to navigate URLs and extract page content

Only proceed with data requests after confirming browser automation is working.


User Profile Setup

On first use, collect and store preferences. If returning user, confirm: "Welcome back. Using your saved profile. Type 'update profile' to change."

Required Setup Questions

1. Software Environment "What statistical software are you using?"

  • R (tidyverse)
  • Python (pandas)
  • Stata
  • Excel
  • Other (specify)

2. Currency Preference "What is your preferred currency for monetary values?"

  • USD ($)
  • EUR (€)
  • GBP (£)
  • Local currency (varies by data)
  • Other (specify)

3. Real vs Nominal Default "For price-sensitive data, do you typically prefer:"

  • Nominal (current prices)
  • Real (constant prices) → then ask base year and deflator preference

4. Seasonal Adjustment Default "For time series data, do you typically prefer:"

  • Seasonally adjusted (SA)
  • Not seasonally adjusted (NSA)
  • Ask me each time

5. Frequency Default "What is your typical data frequency?"

  • Annual
  • Quarterly
  • Monthly
  • Highest available
  • Ask me each time

Profile Summary Display

ECONOMIST DATA PROFILE
━━━━━━━━━━━━━━━━━━━━━━
Software:      R (tidyverse)
Currency:      USD
Price type:    Real (2020 base, GDP deflator)
Seasonal adj:  Seasonally adjusted
Frequency:     Quarterly
━━━━━━━━━━━━━━━━━━━━━━
Say "update profile" to change

Mandatory Decision Points (Cannot Be Skipped)

Before ANY data retrieval, the user must explicitly confirm these specifications. The skill will NOT silently default - these decisions must be conscious.

1. Price Basis

⚠️  PRICE BASIS DECISION REQUIRED

Is this data request for:
→ [N] Nominal (current prices, as recorded)
→ [R] Real (inflation-adjusted, constant prices)

Why it matters: Nominal GDP in 2024 vs 2004 reflects both
real growth AND inflation. Real GDP isolates actual growth.

If Real selected:

⚠️  BASE YEAR DECISION REQUIRED

Adjust to constant prices of what year?
→ Common options: 2017, 2020, latest available
→ Enter year: ___

Why it matters: "Real 2020 dollars" vs "Real 2010 dollars"
are different values. Ensure consistency across your analysis.
⚠️  ADJUSTMENT METHOD REQUIRED

Deflate using:
→ [C] CPI (consumer prices)
→ [G] GDP Deflator (broad economy)
→ [P] PPP (cross-country comparison)

Why it matters: CPI reflects consumer purchasing power.
GDP deflator captures full economic output.
PPP enables cross-country comparison.

2. Seasonal Adjustment

⚠️  SEASONAL ADJUSTMENT DECISION REQUIRED

Do you want:
→ [SA] Seasonally Adjusted (removes predictable seasonal patterns)
→ [NSA] Not Seasonally Adjusted (raw data)

Why it matters: Retail sales spike in December.
SA data removes this pattern for trend analysis.
NSA shows actual recorded values.

3. Frequency

⚠️  FREQUENCY DECISION REQUIRED

What time frequency?
→ [A] Annual
→ [Q] Quarterly
→ [M] Monthly

Why it matters: Higher frequency = more observations but
more noise. Annual smooths short-term volatility.

4. Currency (for monetary values)

⚠️  CURRENCY DECISION REQUIRED

Report values in:
→ [USD] US Dollars
→ [EUR] Euros
→ [LCU] Local Currency Units
→ [PPP] PPP-adjusted international dollars

Why it matters: Exchange rates fluctuate.
USD values for Brazil in 2020 vs 2024 reflect
both economic change AND Real/USD exchange rate moves.

Decision Summary Confirmation

Before fetching, always display and require confirmation:

┌─────────────────────────────────────────────┐
│         DATA REQUEST CONFIRMATION           │
├─────────────────────────────────────────────┤
│ Indicator:    GDP                           │
│ Countries:    USA, DEU, JPN                 │
│ Date range:   2015-2024                     │
├─────────────────────────────────────────────┤
│ Price basis:  REAL                          │
│ Base year:    2020                          │
│ Deflator:     GDP deflator                  │
│ Seasonal:     Seasonally adjusted           │
│ Frequency:    Quarterly                     │
│ Currency:     USD                           │
├─────────────────────────────────────────────┤
│ Source:       OECD                          │
└─────────────────────────────────────────────┘

⚠️  Please confirm these specifications are correct
for your analysis. Type YES to proceed or specify
what to change.

Authoritative Sources

Official Statistics - Macroeconomic

SourceCoverageURL
FREDUS primaryhttps://fred.stlouisfed.org
BEAUS national accountshttps://www.bea.gov/data
BLSUS labor & priceshttps://www.bls.gov/data/
Census BureauUS demographics & tradehttps://data.census.gov
World BankInternationalhttps://data.worldbank.org
OECDDeveloped countrieshttps://data.oecd.org
IMF WEOGlobal forecastshttps://www.imf.org/en/Publications/WEO
IMF IFSInternational financial statshttps://data.imf.org
EurostatEUhttps://ec.europa.eu/eurostat
ECBEurozone monetaryhttps://data.ecb.europa.eu
BISInternational bankinghttps://www.bis.org/statistics/

Official Statistics - Specialized

SourceCoverageURL
ILOInternational laborhttps://ilostat.ilo.org
UN ComtradeDetailed trade flowshttps://comtradeplus.un.org
WTOTrade statisticshttps://stats.wto.org
UN PopulationDemographicshttps://population.un.org/dataportal/
UNDPHuman developmenthttps://hdr.undp.org/data-center

PPP & Price Comparisons

SourceCoverageURL
World Bank ICPGlobal PPPhttps://data.worldbank.org
OECD PPPOECD countrieshttps://data.oecd.org/conversion/
Penn World TableAcademic standardhttps://www.rug.nl/ggdc/productivity/pwt/

Academic Data Repositories

Journal Replication Data

Peer-reviewed, documented, quality-vetted datasets from published research.

RepositoryJournals/CoverageURL
AEA Data & CodeAER, AEJ journals, JEL, JEPhttps://www.openicpsr.org/openicpsr/search/aea/studies
EconometricaEconometrica replicationshttps://www.econometricsociety.org/publications/econometrica/browse
QJE DataverseQuarterly Journal of Economicshttps://dataverse.harvard.edu/dataverse/qje
REStudReview of Economic Studieshttps://restud.github.io/data-editor/
Journal of FinanceFinance researchhttps://github.com/jofrhwld/jfinance_data
Review of Economics & StatisticsREStathttps://dataverse.harvard.edu/dataverse/restat
Journal of Political EconomyJPEhttps://www.journals.uchicago.edu/journals/jpe/data

General Academic Repositories

RepositoryDescriptionURL
Harvard DataverseMulti-discipline, many econ journalshttps://dataverse.harvard.edu
ICPSRSocial science data archivehttps://www.icpsr.umich.edu
ZenodoOpen research datahttps://zenodo.org
OpenICPSROpen access subsethttps://www.openicpsr.org

Canonical Economic Datasets

Widely-used datasets with established methodology:

DatasetDescriptionURL
Penn World TableCross-country GDP, productivityhttps://www.rug.nl/ggdc/productivity/pwt/
Maddison ProjectHistorical GDP (back to 1 AD)https://www.rug.nl/ggdc/historicaldevelopment/maddison/
World Inequality DatabaseIncome & wealth distributionhttps://wid.world
SWIIDStandardized inequality measureshttps://fsolt.org/swiid/
Barro-LeeEducational attainmenthttps://barrolee.github.io/BarroLeeDataSet/
PolityPolitical regime datahttps://www.systemicpeace.org/polityproject.html
CEPIITrade & geography datahttp://www.cepii.fr/CEPII/en/bdd_modele/bdd_modele.asp
NBER MacrohistoryUS historical macrohttps://www.nber.org/research/data/nber-macrohistory-database

Working Paper Data

SourceDescriptionURL
NBERWorking paper data appendiceshttps://www.nber.org/papers
CEPREuropean policy researchhttps://cepr.org
IZALabor economicshttps://www.iza.org

Source Selection Logic

When user requests data, select source by priority:

  1. Official statistics (BLS, BEA, Eurostat) - for current standard indicators
  2. Canonical datasets (Penn World Table, WID) - for established cross-country research
  3. Journal replication data - when replicating or extending published research
  4. Academic repositories - for specialized research datasets

Always inform user which source and why:

SOURCE SELECTED: Penn World Table 10.0

Why: You requested cross-country real GDP comparison
over 50+ years. PWT provides consistent methodology
across countries and time, using PPP adjustments.

Alternative sources:
- World Bank WDI (shorter time series, similar methodology)
- Maddison Project (longer history, less detail)

Tidy Data Output Format

All output follows tidy data principles:

  • Each variable is a column
  • Each observation is a row
  • Column names: lowercase, snake_case

Required Metadata Columns (MANDATORY)

Every dataset MUST include these two columns:

  1. source - The authoritative institution that produced the data (e.g., "BLS via FRED", "World Bank", "Penn World Table")
  2. accessed_date - The date the data was downloaded (ISO 8601 format: YYYY-MM-DD)

These columns enable:

  • Reproducibility (others can verify where data came from)
  • Data provenance tracking
  • Citation generation
  • Identifying when data may be stale or revised

Standard Schema

date,country,country_code,indicator,value,unit,price_type,base_year,currency,seasonal_adj,frequency,source,source_url,accessed_date
2024-01-01,United States,USA,gdp,22345.6,billions,real,2020,USD,SA,quarterly,BEA,https://...,2025-01-20

Column Definitions

ColumnDescriptionExample Values
dateISO 8601 date2024-01-01, 2024-Q1
countryFull country nameUnited States
country_codeISO 3166-1 alpha-3USA, GBR, DEU
indicatorVariable namegdp, cpi, unemployment_rate
valueNumeric value22345.6
unitUnit of measurementbillions, percent, index
price_typenominal or realnominal, real
base_yearBase year if real2020, NA
currencyISO 4217 codeUSD, EUR, LCU
seasonal_adjAdjustment statusSA, NSA
frequencyData frequencyannual, quarterly, monthly
sourceSource institutionBEA, FRED, World Bank
source_urlDirect URL to datahttps://...
accessed_dateDate retrieved2025-01-20

Software-Specific Output

After retrieving data, provide code snippet for user's software:

R (tidyverse)

library(tidyverse)
df <- read_csv("economist_data.csv") |>
  mutate(date = as.Date(date))

Python (pandas)

import pandas as pd
df = pd.read_csv("economist_data.csv", parse_dates=["date"])

Stata

import delimited "economist_data.csv", clear
gen date2 = date(date, "YMD")
format date2 %td

Excel

Note: Open CSV, then format date column as Date. Use Data > Text to Columns if needed.


Educational Prompts

When decisions seem inconsistent or could cause issues, alert the user:

Consistency Check

⚠️  CONSISTENCY CHECK

You requested NOMINAL GDP for USA but your previous
request for Germany was REAL (2020 base).

Comparing nominal USA to real Germany is invalid.

→ [1] Change this request to Real (2020 base) to match
→ [2] Keep as Nominal (I understand the implications)

Methodology Note

⚠️  METHODOLOGY NOTE

You selected PPP adjustment. Note that:
- PPP is best for cross-country LEVEL comparisons
- For growth rates, local currency or USD is often preferred
- PPP conversion factors are estimates with uncertainty

→ Continue with PPP? (yes/change)

Source Recommendation

⚠️  SOURCE RECOMMENDATION

For cross-country growth regressions, consider using
Penn World Table instead of raw World Bank data.

PWT advantages:
- Consistent PPP methodology across countries
- Capital stock estimates included
- Productivity measures (TFP)
- Widely used in literature (comparable to other papers)

→ [1] Switch to Penn World Table
→ [2] Keep World Bank (I have a specific reason)

Replication Data Available

⚠️  REPLICATION DATA AVAILABLE

Your query matches data from a published paper:
Acemoglu, Johnson & Robinson (2001) - "Colonial Origins"
Replication data: https://economics.mit.edu/people/faculty/daron-acemoglu

Using original replication data ensures consistency
with the published methodology.

→ [1] Use replication data
→ [2] Fetch fresh data (I want to extend/update)

Playwright Integration

This skill uses Playwright MCP for data retrieval. The workflow:

  1. User requests data
  2. Skill prompts for all mandatory decisions
  3. User confirms specifications
  4. Skill identifies authoritative source
  5. Playwright navigates to source URL
  6. Playwright extracts data from page/downloads
  7. Skill formats output as tidy data
  8. Skill provides software-specific code snippet

Users do not interact with Playwright directly - they simply request data and confirm specifications.


Example Interaction

User: Get US GDP for the last 5 years

Skill:

⚠️  PRICE BASIS DECISION REQUIRED

Is this data request for:
→ [N] Nominal (current prices, as recorded)
→ [R] Real (inflation-adjusted, constant prices)

User: R

Skill:

⚠️  BASE YEAR DECISION REQUIRED

Adjust to constant prices of what year?
→ Enter year (common: 2017, 2020):

User: 2020

Skill:

⚠️  ADJUSTMENT METHOD REQUIRED

Deflate using:
→ [C] CPI | [G] GDP Deflator | [P] PPP

User: G

Skill:

⚠️  SEASONAL ADJUSTMENT DECISION REQUIRED

→ [SA] Seasonally Adjusted | [NSA] Not Seasonally Adjusted

User: SA

Skill:

⚠️  FREQUENCY DECISION REQUIRED

→ [A] Annual | [Q] Quarterly | [M] Monthly

User: Q

Skill:

┌─────────────────────────────────────────────┐
│         DATA REQUEST CONFIRMATION           │
├─────────────────────────────────────────────┤
│ Indicator:    GDP                           │
│ Countries:    USA                           │
│ Date range:   2020-2025                     │
├─────────────────────────────────────────────┤
│ Price basis:  REAL                          │
│ Base year:    2020                          │
│ Deflator:     GDP deflator                  │
│ Seasonal:     Seasonally adjusted           │
│ Frequency:    Quarterly                     │
│ Currency:     USD                           │
├─────────────────────────────────────────────┤
│ Source:       BEA via FRED                  │
└─────────────────────────────────────────────┘

Type YES to proceed or specify changes:

User: YES

Skill: [Uses Playwright to fetch from FRED, returns tidy CSV + R code snippet]


Why This Matters

This skill exists because:

  1. Data decisions are analytical decisions - Real vs nominal isn't a technical detail, it changes what you're measuring

  2. Silent defaults cause errors - "I didn't realize it was seasonally adjusted" has ruined analyses

  3. Comparability requires consistency - Mixing specifications across series invalidates comparisons

  4. Source quality matters - BLS data isn't the same as a news article saying "unemployment is 4%"

  5. Replication matters - Using the same data sources as published research enables valid comparison and extension

The friction is the feature. Taking 30 seconds to confirm specifications prevents hours of rework from bad data.

  1. Provenance is non-negotiable - Every dataset must include source and accessed_date columns. Data without provenance is unverifiable and unusable for serious research.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.