skills/32-dylantmoore-stata-skill/plugins/stata-skill-contributor/skills/stata-skill-contributor/SKILL.md
Guide for contributing to the stata-skill project. Use when the user wants to run the eval pipeline, analyze test results, improve reference docs, add new package documentation, or work on roadmap items. Covers the testing infrastructure, multi-agent analysis workflow, cost estimates, and links to prior eval results and improvement history.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research stata-skill-contributorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps you contribute to the stata-skill project — the Stata reference skill for Claude Code. It covers how to run the evaluation pipeline, analyze results, and make data-driven improvements to the skill documentation.
Running the eval pipeline uses Claude Agent SDK query() calls, which consume API credits.
| What | Approximate cost | |------|-----------------| | Single task, 1 run | $0.50 - $1.50 | | Single task, 5 runs | $2.50 - $7.50 | | All 24 tasks, 1 run each | $12 - $36 | | All 24 tasks, 5 runs each | $60 - $120 | | Full A/B comparison (2 arms × 24 tasks × 5 runs) | $120 - $240 | | Multi-agent post-test analysis (5 Sonnet subagents) | $3 - $8 |
Start small: run 1-3 tasks relevant to your change before running the full suite. Use --runs 1 to validate the pipeline works before scaling up.
| File | What it is |
|------|-----------|
| tests/eval.py | Evaluation harness — sends tasks to Claude, judges responses |
| tests/rubric.md | 7-category scoring rubric (max 55 points) |
| tests/tasks/task_*.md | 24 test task definitions |
| tests/runner-only-plugin/ | Minimal baseline plugin (execution instructions only) |
| tests/results/ | All run directories and aggregate JSON results |
| tests/EVAL_RESULTS_2026-03-22.md | Prior eval results with full analysis and run index |
| ROADMAP.md | Open problems and improvement directions |
| CONTRIBUTING.md | General contribution guide (adding packages, filing issues) |
# Single task, single run — fast sanity check (~$1)
python tests/eval.py tests/tasks/task_01_data_cleaning.md
# Single task, 5 runs — measure variance (~$5)
python tests/eval.py tests/tasks/task_01_data_cleaning.md --runs 5
# Save results as a named baseline
python tests/eval.py tests/tasks/task_01_data_cleaning.md --runs 5 \
--save tests/results/my_baseline.json
# Compare against a baseline
python tests/eval.py tests/tasks/task_01_data_cleaning.md --runs 5 \
--compare tests/results/my_baseline.json
# 1. Save baseline BEFORE your edit
python tests/eval.py tests/tasks/task_16_multiple_imputation.md --runs 5 \
--save tests/results/before_mi_fix.json
# 2. Make your edit to the reference doc
# 3. Re-run and compare
python tests/eval.py tests/tasks/task_16_multiple_imputation.md --runs 5 \
--compare tests/results/before_mi_fix.json
Look for: mean score going up, SD staying flat or going down, no new failure modes.
# Full skill (default) — loads the complete plugin
python tests/eval.py tests/tasks/task_*.md
# Runner-only — minimal plugin with just execution instructions, no reference docs
python tests/eval.py tests/tasks/task_*.md --runner-only
# No skill — no plugin at all
python tests/eval.py tests/tasks/task_*.md --no-skill
# Alternative skill version — point at a different plugin directory
python tests/eval.py tests/tasks/task_*.md --skill-path /path/to/modified/plugin
The runner-only baseline is the meaningful comparison. It isolates what the reference material adds beyond "here's how to run Stata." The no-skill baseline is weaker (agent can't even execute code).
Run multiple tasks in parallel by launching separate processes:
python tests/eval.py tests/tasks/task_01_data_cleaning.md --runs 5 \
--save tests/results/v3_task01.json &
python tests/eval.py tests/tasks/task_07_did.md --runs 5 \
--save tests/results/v3_task07.json &
wait
Batch 3-4 tasks at a time to avoid resource exhaustion. Run directories are created atomically, so parallel execution is safe.
Each run creates tests/results/run_NNN/ containing:
| File | Contents |
|------|----------|
| transcript.json | The test agent's full response |
| judge_findings.md | Per-category scores with justifications |
| metadata.json | Score, model, skill_mode, cost, duration, timestamp |
| code_files/ | Any .do/.log files the agent wrote |
Aggregate results are saved to the --save path as a JSON list of per-run results.
After running evals, dispatch Sonnet subagents to analyze the results in parallel. This is the workflow that surfaces actionable improvements.
# Quick script to build the comparison table from saved results
import json, statistics
for i in range(1, 25):
tn = f"{i:02d}"
with open(f"tests/results/v3_task{tn}.json") as f:
full = [r["score"] for r in json.load(f) if r["score"] is not None]
with open(f"tests/results/v3_runner_task{tn}.json") as f:
runner = [r["score"] for r in json.load(f) if r["score"] is not None]
fm, rm = statistics.mean(full), statistics.mean(runner)
print(f"Task {tn}: full={fm:.1f} runner={rm:.1f} delta={fm-rm:+.1f}")
Launch 4-5 parallel subagents, each investigating a specific pattern in the results. The prompts below are templates — adapt them to your actual results.
Agent 1 — Regression analysis (skill hurts):
Investigate tasks where the full skill scores LOWER than runner-only. Read the result JSONs, the relevant reference docs, and the judge reasoning for low-scoring runs. Identify specific examples in the reference docs that teach wrong patterns. Compare what the with-skill agent does vs the runner-only agent.
Agent 2 — Redundancy analysis (skill adds nothing):
Investigate tasks where full skill and runner-only score identically. Read the reference docs that would be triggered. Determine whether the content is redundant — the model already knows this material from training. Identify which reference files could be deprioritized or trimmed.
Agent 3 — High-variance analysis (unreliable tasks):
Investigate tasks with SD > 10. Compare the LOW-scoring run vs HIGH-scoring run for each. Identify what went wrong — wrong syntax in the doc? Agent misinterpretation? Context collapse (agent wrote code for wrong task)? Quote specific code that failed.
Agent 4 — Biggest wins analysis (what works):
Investigate the 5 tasks with the largest positive deltas. Read the runner-only judge reasoning to identify specific knowledge gaps. Categorize: community package syntax, Stata-specific idioms, workflow patterns, gotcha avoidance.
Agent 5 — Graphics/weak area analysis:
Investigate the lowest-scoring full-skill tasks. Compare successful vs failed runs. Identify missing content in the reference docs.
Each agent returns specific, evidence-backed proposals. Typical findings:
Fix bugs first, add missing gotchas second, then re-run to verify improvement.
See tests/EVAL_RESULTS_2026-03-22.md for a complete example of this workflow applied to the full 24-task suite. That analysis:
mi estimate pattern, wrong ssc install command, wrong variable names)graph box/twoway incompatibility, DiD event-study syntax, nlcom clobbers e())See ROADMAP.md for bigger-picture improvement directions:
--runs 5 --save on the relevant tasks--compare against the baselineCONTRIBUTING.md for details.development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.