Borrowing it
Nothing to install: this file belongs to AlessandroCaforio/Academic-Writing. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AlessandroCaforio/Academic-Writing/main/.claude/skills/build-twfe-explainer/SKILL.mdgit clone --depth 1 https://github.com/AlessandroCaforio/Academic-WritingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alessandrocaforio/academic-writing/build-twfe-explainer)<a href="https://agentmods.dev/skills/alessandrocaforio/academic-writing/build-twfe-explainer"><img src="https://agentmods.dev/badge/skills/alessandrocaforio/academic-writing/build-twfe-explainer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alessandrocaforio/academic-writing/build-twfe-explainer"><img src="https://agentmods.dev/badge/skills/alessandrocaforio/academic-writing/build-twfe-explainer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00025 | $0.05612 |
| Opus 5 | $0.00013 | $0.02806 |
| Sonnet 5 | $0.00005 | $0.01122 |
| Haiku 4.5 | $0.00003 | $0.00561 |
Grade C, and why
build-twfe-explainer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf /Users/alessandro/Projects/Tesi/results/.twfe_workspace How it starts
The opening of the file, as written. The whole thing — 423 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TWFE Math Explainer — Multi-Agent Pipeline
Build a definitive, self-contained HTML teaching document explaining TWFE mathematics, causal inference formalism, and how fixed effects change significance. Uses 6 specialized agents across 5 phases.
Arguments
all— Run the full pipeline (default)phase0throughphase5— Run a specific phase (assumes prior phases completed)data-only— Run only Phase 1 (data extraction)drafts-only— Run only Phase 2 (assumes Phase 1 done)verify-only— Run only Phase 3 (assumes Phases 1-2 done)assemble-only— Run only Phase 4 (assumes Phases 1-3 done)
Target Document Structure (23 sections)
PRIMERS (P1–P7)
P1: What Is a Regression? (Gauss/Legendre history, full OLS derivation)
P1½: Language of Statistics (variance, covariance, key identities)
P2: The Problem of Confounders (Simpson's paradox)
P3: Fixed Effects (within estimator derivation)
P4: The t-Statistic (Student/Gosset 1908 history)
P5: Panel Data & Pseudo-Panels
P6: The Language of Causality ← NEW (Potential Outcomes + DAGs)
ROAD MAP (visual flow diagram)
CORE ANALYSIS (S1–S9)
S1: Setup — The Specification Ladder (empirical table)
S2: FWL Theorem (Frisch & Waugh 1933, Lovell 1963 — full dissertation)
S3: SE Formula (6-step derivation from first principles)
S4: Variance Decomposition (the key asymmetry)
S5: Transition (1)→(2) — The Critical Jump
S6: Transition (2)→(3) — State FE Refinement
S7: Transition (3)→(4) — Cost of Over-Saturation
S8: OVB (full derivation + Simpson's paradox worked example)
S9: Summary
ADVANCED TOPICS (S10–S16)
S10: Identification & Parallel Trends (potential outcomes + DAG + shift-share)
S11: Pseudo-Panel (Deaton 1985 — full history + derivation)
S12: Moulton Problem (Moulton 1990 — history + derivation)
S13: Oster Test (AET 2005 + Oster 2019 — full history)
S14: Statistical Power & Honest Assessment
S15: Geometry of FWL
S16: Causal Graphs Applied ← NEW (full DAG for this study)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 423 lines · 25 tokens per session scan C bf069a07af7d
build-twfe-explainer is a skill published in the GitHub repository AlessandroCaforio/Academic-Writing (17 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 5,612 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
scaffold-exercises
Scaffold a graded problem set with sections, problems, worked solutions, and short "why this matters" explainers across analytical, empirical, and coding types. Use when user says "make a problem set on X", "scaffold exercises for this lecture", "create practice problems", "generate homework with a solution key"…
lean-check
Formalize a self-authored lemma or theorem in Lean 4/mathlib and require a clean lake build without sorry. Use when the mathematical claim can be stated faithfully and machine-checked. For numerical falsification or symbolic algebra, use $numerical-check or $symbolic-check.
mathmodel-skill
An end-to-end workflow for mathematical-modeling competitions, including CUMCM, MCM/ICM, and the Electrical Cup. It guides teams from choosing a problem through modeling, solving, checking, writing, rule compliance, and final review.
math-proof
Write clear, detailed mathematical proofs for academic papers. Use when the user asks to prove a result, derive an equation, justify a claim analytically, or expand a proof sketch into a full proof. Also trigger on "prove", "show analytically", "derive", "justify mathematically", or "write a proof".
proofcheck
A systematic checker for mathematical proofs in statistics and machine-learning research papers.
theory-simulation
Bridge between theoretical results and Monte Carlo simulation, built to top-stat-journal standards (AoS, JASA, JRSS-B, Biometrika, Bernoulli). Two modes: (1) DESIGN mode — for each theoretical claim, design new simulations that verify rates, coverage, stress-test assumptions, and reveal theory-improvement…