Replication Package logo

Replication Package

Community
HaipingXu
replication-package

Use when the user asks to "prepare replication package", "create replication files", "AER replication standards", "APSR replication requirements", "organize code for submission", "data availability statement", "make research reproducible", "package data and code", "openICPSR submission", "dataverse upload", "write data README", "code README for replication", "clean up code for publication", or "submit replication materials".

Overview

PublisherHaipingXu
Repositorysocial-science-claude-scholar
Skill namereplication-package
Stars
26
Forks
5
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by HaipingXu on GitHub. Read the source before you install it.

Installation

Install the Replication Package AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/HaipingXu/social-science-claude-scholar/tree/main/skills/replication-package
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HaipingXu/social-science-claude-scholar.git /tmp/social-science-claude-scholar
mkdir -p .claude/skills
cp -r /tmp/social-science-claude-scholar/skills/replication-package .claude/skills/replication-package
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Replication Package in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Replication Package on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Replication Package is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Replication Package Preparation

Guide for preparing publication-ready replication packages for top economics and political science journals. Covers AER (American Economic Association) and APSR/AJPS (political science) standards.

Journal Requirements Overview

JournalPolicyData ArchiveCode RequiredStandard
AER / AEJMandatoryopenICPSRYesAEA Data & Code Availability Policy
QJEMandatoryHarvard DataverseYesHarvard Dataverse
JPEMandatoryopenICPSRYesAEA-compatible
APSRMandatoryHarvard DataverseYesAPSA Guidelines
AJPSMandatoryHarvard DataverseYesAJPS Replication Policy
JOPMandatoryHarvard DataverseYesJOP Policy

Replication Package Structure

replication-package/
├── README.pdf               ← required by AEA; describes everything
├── README.md                ← same content, markdown version
│
├── data/
│   ├── raw/                 ← original data (if shareable)
│   │   ├── census_2020.dta
│   │   └── README_data.txt  ← source, access, citation for each dataset
│   └── processed/           ← cleaned data used in analysis
│
├── code/
│   ├── 00_master.do/.py     ← single entry point: runs everything
│   ├── 01_clean.do/.py
│   ├── 02_main_analysis.do/.py
│   ├── 03_robustness.do/.py
│   ├── 04_figures.do/.py
│   └── 05_tables.do/.py
│
├── output/
│   ├── figures/             ← all figures in paper
│   └── tables/              ← all tables (LaTeX + CSV)
│
└── requirements/
    ├── stata_packages.txt   ← ado packages + versions
    └── requirements.txt     ← Python packages + versions

Step 1: README.md / README.pdf

The README is the most important file. AEA requires PDF format. Structure:

markdown
# Replication Package for "[Paper Title]"

**Authors**: [Names]
**Journal**: [Journal Name]
**DOI**: [final DOI if available]
**Date**: YYYY-MM-DD

---

## Overview

This package replicates all tables and figures in [Paper Title].
Running `code/00_master.do` (or `00_master.py`) reproduces all results.

---

## Data Availability and Sources

| Dataset | Source | Access | Notes |
|---------|--------|--------|-------|
| Census 2020 | US Census Bureau | Public | Downloaded YYYY-MM-DD |
| Proprietary XYZ | [Provider] | Restricted | See data/raw/README_data.txt |

**Restricted-access data**: [Explain how to obtain; typical wait time; contact]

---

## Software Requirements

**Stata**: Version 17+
Required packages (auto-installed by `00_master.do`):
- reghdfe (Correia 2016) — version X.X
- rdrobust (Calonico et al. 2014) — version X.X
- estout (Jann 2007) — version X.X

**Python**: 3.10+
See `requirements/requirements.txt` for full package list.
Key packages: linearmodels 6.x, pyfixest 0.x, stargazer 0.x

---

## Instructions to Replicators

1. Set the global path in `code/00_master.do`: `global root "/path/to/replication-package"`
2. Run: `do code/00_master.do`
3. All figures saved to `output/figures/`; all tables to `output/tables/`
4. Expected run time: ~XX minutes on standard hardware

---

## Package Contents

| File/Directory | Description |
|----------------|-------------|
| `README.pdf` | This file |
| `data/raw/` | Original input datasets |
| `data/processed/` | Intermediate cleaned data |
| `code/00_master.do` | Master script (run this) |
| `code/01_clean.do` | Data cleaning |
| `code/02_main_analysis.do` | Main results (Tables 1–4) |
| `code/03_robustness.do` | Robustness checks (Appendix Tables) |
| `code/04_figures.do` | All figures |
| `output/figures/` | Figures 1–N (PDF format) |
| `output/tables/` | Tables 1–N (.tex + .csv) |

---

## Correspondence

Questions: [author email]

Step 2: Master Script (00_master.do / 00_master.py)

Stata master script:

stata
* ============================================================
* MASTER REPLICATION SCRIPT
* Paper: "[Title]"
* ============================================================

clear all
set more off
set scheme s2color

* ── 1. Set root path (CHANGE THIS) ──────────────────────────
global root "/Users/yourname/replication-package"

* ── 2. Define sub-paths ─────────────────────────────────────
global data    "$root/data"
global raw     "$data/raw"
global proc    "$data/processed"
global code    "$root/code"
global figures "$root/output/figures"
global tables  "$root/output/tables"

* ── 3. Install required packages ────────────────────────────
* Uncomment on first run:
* ssc install reghdfe, replace
* ssc install ftools, replace
* ssc install rdrobust, replace
* ssc install estout, replace

* ── 4. Run analysis scripts in order ────────────────────────
do "$code/01_clean.do"
do "$code/02_main_analysis.do"
do "$code/03_robustness.do"
do "$code/04_figures.do"
do "$code/05_tables.do"

display "✓ Replication complete. Check output/ directory."

Python master script:

python
"""
Master replication script.
Run: python code/00_master.py
"""
from pathlib import Path
import subprocess
import sys

ROOT = Path(__file__).parent.parent  # adjust as needed

scripts = [
    "01_clean.py",
    "02_main_analysis.py",
    "03_robustness.py",
    "04_figures.py",
    "05_tables.py",
]

for script in scripts:
    print(f"\n{'='*50}\nRunning {script}...\n{'='*50}")
    result = subprocess.run(
        [sys.executable, ROOT / "code" / script],
        check=True
    )

print("\n✓ Replication complete. Check output/ directory.")

Step 3: Code Quality Checklist

Before packaging, verify each script:

Stata scripts:

  • All paths use global macros ($root, $data, etc.) — no hardcoded paths
  • set seed XXXXX at the top if any random processes
  • set more off and clear all at top
  • Comments explain what each section does
  • log using to capture output (helps debugging)
  • All user-written packages listed in README

Python scripts:

  • All paths relative to ROOT using pathlib.Path
  • random.seed(), np.random.seed() set at top
  • requirements.txt captures exact package versions
  • No hardcoded absolute paths
  • Comments in English

Both:

  • Script runs top-to-bottom without manual intervention
  • Output files don't overwrite themselves if script run twice
  • Numbered in logical order matching paper sections

Step 4: Data README

Create data/raw/README_data.txt:

DATA SOURCES AND AVAILABILITY
===============================

1. [Dataset Name] (file: census_2020.dta)
   Source: [Full citation]
   URL: [download link]
   Access: Public / Restricted
   Downloaded: YYYY-MM-DD
   Version: [version or as-of date]
   Notes: [any relevant details, subsetting, etc.]

2. [Proprietary Dataset] (file: firm_panel.dta)
   Source: [Provider name]
   Access: Restricted — requires signed data use agreement
   Contact: [contact info]
   Typical wait: [X weeks]
   Notes: We obtained access under agreement #XXX. Variables used: [list]

Step 5: Software Version Capture

Stata:

stata
* At end of 00_master.do, log environment:
display "Stata version: `c(stata_version)'"
display "OS: `c(os)'"
display "Date: `c(current_date)'"
ado describe  // lists installed packages with versions

Python:

bash
# Generate requirements.txt with pinned versions
uv pip freeze > requirements/requirements.txt

# Or: only direct dependencies
uv pip list --format=json | python -c "
import json, sys
pkgs = json.load(sys.stdin)
for p in pkgs: print(f\"{p['name']}=={p['version']}\")
" > requirements/requirements.txt

Step 6: Self-Test Before Submission

bash
# Create a clean test environment
mkdir /tmp/replication-test
cp -r replication-package/ /tmp/replication-test/

# Python: test in fresh venv
cd /tmp/replication-test
python -m venv .venv
source .venv/bin/activate
pip install -r requirements/requirements.txt
python code/00_master.py

# Stata: open fresh Stata, run 00_master.do
# Verify all outputs in output/ match paper figures/tables

Step 7: Upload to openICPSR / Harvard Dataverse

openICPSR (AEA journals):

  1. Go to openicpsr.org
  2. Create new deposit → select "ICPSR" or "AEA"
  3. Upload zip of replication package
  4. Fill metadata: title, authors, keywords, geographic coverage
  5. Submit for AEA review; receive deposit number (e.g., openICPSR-XXXXXX)
  6. Add deposit DOI to paper before final submission

Harvard Dataverse (APSR/AJPS/QJE):

  1. Go to dataverse.harvard.edu
  2. Create dataset under your account or journal's dataverse
  3. Upload files, fill metadata
  4. Publish to get DOI

Common Issues

ProblemSolution
Hardcoded pathsUse $root globals (Stata) or pathlib.Path (Python)
Package not installedAdd to master script install section
Results don't matchCheck seed, Stata version, package versions
Data too large to uploadUse restricted access + describe access procedure
Proprietary dataProvide synthetic data or describe access

Reference Resources

  • references/aea-policy.md — Full AEA Data & Code Availability Policy summary
  • references/journal-specific.md — APSR/AJPS/QJE/JPE specific requirements

External Standards

Frequently asked questions

What does the Replication Package AI skill do?

Use when the user asks to "prepare replication package", "create replication files", "AER replication standards", "APSR replication requirements", "organize code for submission", "data availability statement", "make research reproducible", "package data and code", "openICPSR submission", "dataverse upload", "write data README", "code README for replication", "clean up code for publication", or "submit replication materials".

Why use Replication Package on TypingMind?

Because you install it once and use it with any model. Replication Package is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Replication Package in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HaipingXu/social-science-claude-scholar/tree/main/skills/replication-package. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Replication Package?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Replication Package?

As many as you like. As long as a model supports skills, you can use Replication Package with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Replication Package AI skill free?

It is published on GitHub by HaipingXu. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇