Agent skill

Mostly Harmless Guide

by wentorai in wentorai/research-plugins

Replication code and guide for Mostly Harmless Econometrics methods

MITAuto-check passedResearch & Science

Install Mostly Harmless Guide

skills CLI
$ npx skills add wentorai/research-plugins --skill mostly-harmless-guide -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wentorai/research-plugins mostly-harmless-guide --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/analysis/econometrics/mostly-harmless-guide .claude/skills/mostly-harmless-guide && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mostly-harmless-guide
GitHub stars
298
Used in
1 other repo
Token cost
~2k tokens
SKILL.md length
1,006 words
Files
1
Skills in repo
428
Repo updated
First seen
Licence
MIT

At a glance

Replication code and guide for Mostly Harmless Econometrics methods

  • Tasks that involve Econometrics and empirical research
  • SKILL.md covers Overview, Regression Fundamentals, Instrumental Variables and Difference-in-Differences, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mostly Harmless Guide is an agent skill from wentorai/research-plugins. Replication code and guide for Mostly Harmless Econometrics methods

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Research & Science, covering Econometrics and empirical research. The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Econometrics and empirical research

Example prompts

  • “/mostly-harmless-guide”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit bf44b3c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mostly Harmless Guide loads about 2k tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 1,006 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 1,006 words, ~2,023 tokens.

Download SKILL.mdSave it as .claude/skills/mostly-harmless-guide/SKILL.md (or your agent's skills folder).
name
mostly-harmless-guide
description
Replication code and guide for Mostly Harmless Econometrics methods

Mostly Harmless Econometrics Guide

A skill providing replication code, explanations, and practical guidance for the econometric methods presented in Angrist and Pischke's "Mostly Harmless Econometrics" (MHE). Based on the mostly-harmless-replication repository (642 stars), this skill helps researchers understand and correctly apply core causal inference techniques.

Overview

"Mostly Harmless Econometrics" is one of the most influential applied econometrics textbooks, providing accessible explanations of the methods that dominate modern empirical research in economics and increasingly in other social sciences. This skill translates the book's core methods into practical guidance that the agent can use to help researchers design studies, select appropriate estimators, and interpret results correctly.

The skill covers regression, instrumental variables, difference-in-differences, regression discontinuity, and related methods, with emphasis on the practical decisions researchers face when applying these techniques to real data.

Regression Fundamentals

Ordinary Least Squares (OLS)

  • OLS provides the best linear approximation to the conditional expectation function
  • The regression anatomy theorem: each coefficient can be obtained from a bivariate regression of the outcome on the residualized regressor
  • Omitted variable bias formula: bias equals the effect of the omitted variable times its correlation with the included regressor
  • Control variables should be selected based on the conditional independence assumption, not on statistical significance
  • Robust standard errors (Huber-White) should be the default; cluster when observations are not independent

Regression Interpretation

  • The causal interpretation of regression requires the conditional independence assumption (CIA)
  • CIA states that treatment is as good as randomly assigned after conditioning on controls
  • Saturated models (fully interacted categorical variables) are always correctly specified
  • Linear regression with continuous variables approximates the true conditional expectation
  • Report both statistical and economic significance; a large t-statistic does not mean a large effect

Practical Decisions

  • Include controls that are correlated with both the treatment and outcome
  • Do not include controls that are consequences of treatment (bad controls)
  • Use the most parsimonious specification that satisfies the CIA
  • Test sensitivity to alternative control sets to assess robustness
  • Report multiple specifications to demonstrate that results are not driven by a particular set of controls

Instrumental Variables

Core Concepts

  • IV addresses endogeneity when the treatment is correlated with unobserved factors affecting the outcome
  • A valid instrument must be relevant (correlated with treatment) and excludable (affects outcome only through treatment)
  • Two-stage least squares (2SLS) is the standard IV estimator
  • The Wald estimator (reduced form divided by first stage) gives the IV estimate in the simplest case
  • IV estimates the Local Average Treatment Effect (LATE) for compliers

Implementation Guide

  • Always report the first-stage F-statistic; values below 10 indicate weak instruments
  • Use the Anderson-Rubin test for inference robust to weak instruments
  • Over-identification tests (Sargan-Hansen) can detect violations of the exclusion restriction with multiple instruments, but cannot validate a just-identified model
  • Report the first stage, reduced form, and IV estimates together
  • Compare OLS and IV estimates; if IV is much larger, consider LATE interpretation or measurement error

Common Applications

  • Returns to education using quarter of birth as an instrument
  • Effect of institutions on growth using settler mortality as an instrument
  • Peer effects using random assignment to groups
  • Supply and demand estimation using shift variables
  • Policy evaluation using eligibility rules as instruments

Difference-in-Differences

Design Principles

  • DID compares changes in outcomes over time between treated and control groups
  • The parallel trends assumption: absent treatment, both groups would have followed the same trend
  • DID removes time-invariant unobserved confounders
  • The standard estimator is a two-way fixed effects regression (unit and time fixed effects plus treatment indicator)
  • Staggered adoption designs require careful attention to treatment timing heterogeneity

Implementation

  • Always plot pre-treatment trends to assess the parallel trends assumption visually
  • Include leads of the treatment indicator to test for pre-trends formally
  • Cluster standard errors at the group level (state, firm, school)
  • With few clusters (fewer than 50), use wild cluster bootstrap for inference
  • Consider synthetic control methods when the control group is not a natural comparator

Recent Developments

  • Callaway and Sant'Anna (2021): heterogeneity-robust DID with staggered treatment
  • Sun and Abraham (2021): interaction-weighted estimator for event studies
  • de Chaisemartin and D'Haultfoeuille (2020): decomposition of two-way FE estimator
  • Goodman-Bacon (2021): DID with variation in treatment timing decomposition
  • These methods address bias in standard two-way FE when treatment effects are heterogeneous
Show full SKILL.md (317 more words)Show less

Regression Discontinuity

Sharp RD Design

  • Treatment is a deterministic function of a running variable at a known cutoff
  • Causal effect is identified at the cutoff by comparing outcomes just above and just below
  • Local linear regression is preferred over global polynomial fitting
  • Bandwidth selection should use data-driven methods (Imbens-Kalyanaraman, Calonico-Cattaneo-Titiunik)
  • Always show the RD plot: binned means of the outcome against the running variable

Fuzzy RD Design

  • Treatment probability jumps at the cutoff but is not deterministic
  • Fuzzy RD is analogous to IV where the instrument is being above the cutoff
  • Estimates a LATE for units whose treatment status is changed by crossing the cutoff
  • Report both the first stage (jump in treatment probability) and the reduced form (jump in outcome)
  • Validity requires that other covariates do not jump at the cutoff (density test, covariate balance)

Practical Guidance

  • Test for manipulation of the running variable using the McCrary density test
  • Show robustness to alternative bandwidth choices
  • Include covariates to improve precision but the estimate should not change substantially
  • Avoid high-order polynomial specifications that can be misleading
  • Report the effective sample size used in the local estimation

Integration with Research-Claw

This skill enhances the Research-Claw econometric analysis workflow:

  • Guide researchers in selecting the appropriate causal inference method for their question
  • Help implement estimators correctly with proper standard errors and diagnostics
  • Provide code templates for common econometric analyses in R, Stata, and Python
  • Connect with data wrangling skills for cleaning and preparing analysis datasets
  • Support writing skills with correctly formatted regression tables and result descriptions

Best Practices

  • Start by clearly stating the causal question and the source of identification
  • Draw a directed acyclic graph (DAG) to clarify assumptions about causal relationships
  • Report all relevant diagnostics (first-stage F, pre-trends, balance tests)
  • Show robustness across specifications rather than selecting a single preferred model
  • Distinguish between statistical significance, economic significance, and policy relevance
  • Be transparent about the limitations of your identification strategy

© wentorai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/analysis/econometrics/mostly-harmless-guide of wentorai/research-plugins.

Open the folder on GitHubat commit bf44b3c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Mostly Harmless Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mostly Harmless Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mostly Harmless Guide this skillwentorai/research-plugins2981 repos~2kAutomated safety check: PassMIT
Statadylantmoore/stata-skill2911 repos~4.2kAutomated safety check: PassCustom licence
Stata C Pluginsdylantmoore/stata-skill2911 repos~5.8kAutomated safety check: PassCustom licence
Example Datasetspymc-labs/CausalPy1.2k—~587Automated safety check: PassApache-2.0
Stata AuditSepineTam/mcp-for-stata263—~1.2kAutomated safety check: PassAGPL-3.0
Stata Skill Contributordylantmoore/stata-skill2911 repos~2.4kAutomated safety check: PassCustom licence

Similar skills

  • Stata

    dylantmoore/stata-skill

    Comprehensive Stata reference for writing correct .do files, data management, econometrics, causal inference, graphics, Mata programming, and 20 community packages (reghdfe, estout, did, rdrobust…

    291 GitHub starsUsed in 1 repo~4.2k tokens
    Research & ScienceAuto-check passed
  • Stata C Plugins

    dylantmoore/stata-skill

    Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK.

    291 GitHub starsUsed in 1 repo~5.8k tokens
    Research & ScienceAuto-check passed
  • Example Datasets

    pymc-labs/CausalPy

    Load built-in CausalPy example datasets for demos, tutorials, tests, and quick causal-analysis prototypes.

    1.2k GitHub stars~587 tokensUpdated today
    Research & ScienceAuto-check passed
  • Stata Audit

    SepineTam/mcp-for-stata

    Inspect, validate, summarize, and render local Stata-MCP audit evidence under .statamcp.

    263 GitHub stars~1.2k tokensUpdated yesterday
    Research & ScienceAuto-check passed
  • Stata Skill Contributor

    dylantmoore/stata-skill

    Guide for contributing to the stata-skill project. An agent skill from dylantmoore/stata-skill.

    291 GitHub starsUsed in 1 repo~2.4k tokens
    Research & ScienceAuto-check passed
  • Review Paper

    maxwell2732/paper-replicate-agent-demo

    Comprehensive manuscript review covering argument structure, econometric specification, citation completeness, and potential referee objections

    136 GitHub starsUsed in 3 repos~1.1k tokens
    Research & ScienceAuto-check passed

More from wentorai/research-plugins

All 428 skills in this repo
  • Abstract Writing Guide

    wentorai/research-plugins

    Craft structured research abstracts that maximize clarity and journal acceptance

    298 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Academic Citation Manager

    wentorai/research-plugins

    Manage academic citations across BibTeX, APA, MLA, and Chicago formats

    298 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Academic Paper Summarizer

    wentorai/research-plugins

    Summarize academic papers with structured extraction of key elements

    298 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Academic Study Methods

    wentorai/research-plugins

    Evidence-based study techniques for academic learning and retention

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Academic Tone Guide

    wentorai/research-plugins

    Adjust writing tone and register for academic audiences and venues

    298 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Academic Translation Guide

    wentorai/research-plugins

    Academic translation, post-editing, and Chinglish correction guide

    298 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Mostly Harmless Guide

What does Mostly Harmless Guide do?

Replication code and guide for Mostly Harmless Econometrics methods. Mostly Harmless Guide is an agent skill from wentorai/research-plugins.

When should I use Mostly Harmless Guide?

Mostly Harmless Guide fits situations like: tasks that involve Econometrics and empirical research.

How do I install Mostly Harmless Guide in Claude Code?

Run `npx skills add wentorai/research-plugins --skill mostly-harmless-guide -a claude-code`. Or copy the skill folder (skills/analysis/econometrics/mostly-harmless-guide in wentorai/research-plugins) into .claude/skills/mostly-harmless-guide in your project. Claude Code loads it when a task matches its description.

How do I install Mostly Harmless Guide in Codex?

Run `npx skills add wentorai/research-plugins --skill mostly-harmless-guide -a codex`. Or copy the skill folder (skills/analysis/econometrics/mostly-harmless-guide in wentorai/research-plugins) into .agents/skills/mostly-harmless-guide in your project. Codex loads it when a task matches its description.

Can I use Mostly Harmless Guide in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wentorai/research-plugins --skill mostly-harmless-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mostly-harmless-guide, .gemini/skills/mostly-harmless-guide, .github/skills/mostly-harmless-guide and .opencode/skills/mostly-harmless-guide in your project.

What does Mostly Harmless Guide need to run?

SKILL.md names no scripts, command-line tools or credentials: Mostly Harmless Guide is instructions for the agent only. Our summary lists: Python 3.

Does Mostly Harmless Guide access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mostly Harmless Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mostly Harmless Guide use?

Mostly Harmless Guide is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mostly Harmless Guide use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mostly Harmless Guide?

Skills that share tags, products or a category with Mostly Harmless Guide: Stata (dylantmoore/stata-skill, 291 stars), Stata C Plugins (dylantmoore/stata-skill, 291 stars), Example Datasets (pymc-labs/CausalPy, 1.2k stars) and Stata Audit (SepineTam/mcp-for-stata, 263 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mostly Harmless Guide?

wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 428 skills in this directory. The repository was last updated on June 19, 2026.

Source: wentorai/research-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.