Apply Difference-in-Differences (DID) to estimate causal treatment effects by comparing changes in outcomes between treatment and control groups. Use this skill when the user evaluates policy interventions, natural experiments, or regulatory changes, needs to test parallel trends, or when they ask 'did this policy work', 'how do I identify causal effects without randomization', or 'what is the treatment effect'.
npx skills add https://github.com/asgard-ai-platform/skills --skill grad-did
Difference-in-Differences (DID) estimates causal effects by comparing the change in outcomes over time between a treatment group (affected by an intervention) and a control group (unaffected). By differencing out both time-invariant group differences and common time trends, DID isolates the treatment effect under the parallel trends assumption.
IRON LAW: DID is valid ONLY if the parallel trends assumption holds —
without it, the estimated treatment effect is biased by differential
pre-existing trends.
Key assumptions:
Define who is treated and when. Verify groups are comparable on pre-treatment observables. Document the treatment event and its timing.
Plot outcome trends for treatment vs control groups in pre-treatment periods. Run an event-study specification with leads and lags. Pre-treatment coefficients should be statistically insignificant.
Y = β₀ + β₁×Treat + β₂×Post + β₃×(Treat×Post) + Controls + ε. The coefficient β₃ is the DID estimator. Cluster standard errors at the treatment assignment level. See references/ for staggered adoption extensions.
Run placebo tests (fake treatment dates, fake treatment groups). Test sensitivity to control group choice. For staggered DID, use Callaway-Sant'Anna or Sun-Abraham estimators.
## DID Analysis: [Policy / Intervention]
### Research Design
| Element | Description |
|---------|-------------|
| Treatment group | [who] |
| Control group | [who] |
| Treatment date | [when] |
| Pre-treatment periods | [range] |
### Parallel Trends Test
| Pre-period lead | Coefficient | S.E. | p-value |
|-----------------|-------------|------|---------|
| t-3 | x.xx | x.xx | x.xx |
| t-2 | x.xx | x.xx | x.xx |
| t-1 | x.xx | x.xx | x.xx |
### DID Estimate
| Specification | β (Treat×Post) | S.E. | p-value | N |
|---------------|----------------|------|---------|---|
| Baseline | x.xx | x.xx | x.xx | xxx |
| With controls | x.xx | x.xx | x.xx | xxx |
### Robustness
- Placebo test result: [pass/fail]
- Alternative control group: [result]
### Limitations
- [Note any assumption violations]
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take asgard-ai-platform/grad-did from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.