Did Empirical Skill — Productivity skill for Claude Code
结构化 DID 实证 workflow:Stage 0–9 标准流程 + Stata 模板 + 最小可运行示例(100 单位 × 10 年).
How to install Did Empirical Skill
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open yichaoli921/did-empirical-skill and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Did Empirical Skill does
结构化 DID 实证 workflow:Stage 0–9 标准流程 + Stata 模板 + 最小可运行示例(100 单位 × 10 年)。基期固定 t=-1;TWFE 为主回归;csdid / eventstudyinteract 只进稳健性。
Alternatives in Productivity
- Gm Brilliant Implementation — Run the complete 34-stage implementation workflow for a large, multi-system, multi-wave, or CPU-delegated 5 St 416 ★
- Spectre — Spectre is a battle-tested 6 stage agentic engineering workflow for building complex, production-ready feature 156 ★
- Task Complete — Validate task completion with multi-stage verification (22 verify- agents), run all checks, and archive with l 21 ★
README
did-empirical-skill
一个**结构化的 DID(双重差分)实证研究 workflow**,把"识别—判断—基准—诊断—稳健性"完整流程固化下来,配合 Stata 模板 + 真实可跑的最小示例,让首次使用者能在 30 分钟内跑完一套规范的双重差分。
[]() []() []() []() []()
一、这个 skill 是什么 / 不是什么
它是什么
- 一个DID 实证项目的脚手架:从"能不能做 DID"一直推到"稳健性菜单交给谁",按 Stage 0–9 顺序固定,不允许跳步
- 一组Stata 代码模板:覆盖 TWFE 基准、手工 stacked DID、干净事件研究、聚合事件研究、
csdid/eventstudyinteract/did_imputation现代估计量、Bacon 分解、负权重检测 - 一份苏格拉底式提问清单:每一步末尾强制问 3 个问题(事实 / 判断 / 边界),逼使用者先想清楚再继续
- 一套可跑的最小示例:100 单位 × 10 年的故意构造面板,让你
do一下就能看到每一阶段的产出
它**不是**什么
- ❌ 不是 DID 教程(请看 references/design-checklist.md 里指向的文献)
- ❌ 不是显著性搜索工具(显著性搜索 / 控制变量调参转
xianzhu-skill) - ❌ 不是自动化跑全流程的"一键脚本"——每一阶段都要停下来回答苏格拉底 3 问
- ❌ 不是只跑 TWFE 就交差的版本——交错 DID 默认就要上 Bacon 分解、负权重检测,必要时上现代估计量
- ❌ 不会自动帮你判断"题目适不适合做 DID"——这件事留给人来做
二、核心硬标准(必须先记住)
| 编号 | 硬标准 | 适用阶段 |
|---|---|---|
| S1 | 基期 = t = -1。事件研究图上永远用红色三角标出基期,所有相对时间系数相对它解释 |
Stage 4(事件研究) |
| S2 | 主回归固定为 TWFE(reghdfe y DID, absorb(ID Year) vce(cluster ID))。csdid / eventstudyinteract 只进稳健性 |
Stage 2 / Stage 9 |
| S3 | 不跳步:Stage 0–9 顺序固定。Stage 5(stacked DID)触发条件 = 交错实施 + TWFE 已跑 | 全流程 |
| S4 | 不同时换多个东西:x / y / 分母 / FE / 事件窗口 / 控制变量——一次只动一个 |
全流程 |
| S5 | 不把超短窗口、被 FE 吸收的结果自动升为主结果 | Stage 3 / Stage 6 |
| S6 | 每加一层 FE,先问"会不会吸收 DID"。一旦 DID omitted,这条规格不能用 |
Stage 3 |
| S7 | 经济含义 > 显著性:事件窗口先服从经济含义,再看显著性,最后才看样本覆盖 | Stage 6 |
这些不是建议,是约束。详见 [SKILL.md](SKILL.md) 与 [references/workflow-by-stage.md](references/workflow-by-stage.md)。
三、目录结构
did-empirical-skill/
├── S
Related Skills
Clavain Help
Show Clavain commands organized by daily drivers first, then by workflow stage
Implementer
Factory stage 4 — Implementer: implement one task from the change folder
Task Redo
Redo a single stage or phase of a task / Переделать одну стадию или фазу задачи
Task Restart
Restart a task from a stage to the end (with archival) / Перезапустить задачу с этапа до конца (с архивацией)
Epic Decompose
Break an epic into task children without creating task branches.
Workflow BundlesREADME
Workflow Bundles
Related Agents
Methodology Reviewer Agent
v1.0 You are a methodology reviewer specializing in empirical social science. You evaluate papers with the rig
Strategist Critic
Empirical strategy critic and gatekeeper. Reviews strategy memos and papers through 4 sequential phases. Paper
Council Karpathy
Council member. Use standalone for neural network intuition & empirical ML analysis, or via /council for multi