stata-ai-fusion

stata-ai-fusion is a skill for Claude Code, Codex from haoyu-haoyu/stata-ai-fusion. It costs 117 tokens per session (3,849 once invoked), scanned A, original, MIT.

An AI assistant for Stata, a statistics program used to analyse data. It covers writing, running, and debugging Stata code and working with datasets, regression models, and other statistical analyses.

In plain words
What is it for?
Use it for .do scripts, .dta datasets, data cleaning, regression, panel-data and survival analysis, causal research, graphs, packages, and debugging.
Why use it?
It helps with the repeated work of writing analysis code, finding errors, inspecting data, and interpreting Stata results. It can also work from Stata log files when commands fail.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for .do scripts, .dta datasets, data cleaning, regression, panel-data and survival analysis, causal research, graphs, packages, and debugging.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/haoyu-haoyu/stata-ai-fusion/skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add haoyu-haoyu/stata-ai-fusion --skill skill
Clone the repo
git clone --depth 1 https://github.com/haoyu-haoyu/stata-ai-fusion

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for stata-ai-fusion

README.md
[![agentmods](https://agentmods.dev/badge/skills/haoyu-haoyu/stata-ai-fusion/skill/github.svg)](https://agentmods.dev/skills/haoyu-haoyu/stata-ai-fusion/skill)
Your own site
<a href="https://agentmods.dev/skills/haoyu-haoyu/stata-ai-fusion/skill"><img src="https://agentmods.dev/badge/skills/haoyu-haoyu/stata-ai-fusion/skill/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.

agentmods 80×15 button for stata-ai-fusion

Your own site · 80×15
<a href="https://agentmods.dev/skills/haoyu-haoyu/stata-ai-fusion/skill"><img src="https://agentmods.dev/badge/skills/haoyu-haoyu/stata-ai-fusion/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,849 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.03849
Opus 5 $0.00059 $0.01924
Sonnet 5 $0.00023 $0.00770
Haiku 4.5 $0.00012 $0.00385

Measured 12d ago against content hash c7f2f5fd82bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

stata-ai-fusion scanned grade A with 0 findings 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 12d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/SKILL.md · 495 lines

How it starts

The opening of the file, as written. The whole thing — 495 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stata AI Fusion Skill

You have access to comprehensive Stata reference files. Do not load all files. Read only the 1-3 files relevant to the user's current task using the routing table below.


1. Execution Mode Detection

Detect which execution mode is available and adapt accordingly.

MCP Mode (Stata MCP Server Available)

When the MCP server is connected, you can execute Stata code directly:

  • Use stata_run_command to run code and return results
  • Use stata_run_do_file to run full .do files
  • Use stata_inspect_data to inspect loaded datasets (summary stats, variable info)
  • Use stata_codebook to generate a codebook for the current dataset
  • Use stata_get_results to retrieve stored estimation results (r(), e(), s())
  • Use stata_export_graph to export the current Stata graph to an image
  • Use stata_search_log to search through Stata log output
  • Use stata_install_package to install community-contributed packages
  • Use stata_cancel_command to cancel a running Stata command
  • Use stata_list_sessions to list all active Stata sessions
  • Use stata_close_session to close a specific Stata session
  • Always check execution results before proceeding
  • If execution fails, read references/error-codes.md for diagnosis

Offline Mode (No MCP Server)

When MCP is not available, generate code for the user to run manually:

  • Write complete, self-contained .do files
  • Include version, clear all, set more off preamble
  • Add log using for output capture
  • Comment every non-obvious line
  • Wrap risky operations with capture and check _rc

Detection Logic

IF MCP tools are listed in available tools:
    -> Use MCP execution mode
    -> Run code incrementally, check results between steps
ELSE:
    -> Use offline code generation mode
    -> Produce complete .do file with full preamble

2. Core Coding Standards (Mandatory Rules)

Every piece of Stata code you generate MUST follow these rules. Violations cause silent bugs.

Read the full file on GitHub · 495 lines

Changes

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.

  1. 12d ago First seen · 495 lines · 117 tokens per session scan A c7f2f5fd82bf

Subscribe to this mod's changes

stata-ai-fusion is a skill published in the GitHub repository haoyu-haoyu/stata-ai-fusion (43 stars, last pushed 2mo ago), licensed MIT. It adds 117 tokens to every session and 3,849 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

anomaly-characterization

SOP: Describe and classify anomalous phenomena that existing theory cannot explain.

yogsoth-ai/de-anthropocentric-research-engine · 19 tokens

anomaly-driven-abduction

Tactic: Inductive/abductive path — describe anomalous phenomena, generate candidate explanations, rank by plausibility.

yogsoth-ai/de-anthropocentric-research-engine · 30 tokens

fin-data-acquisition

A data-preparation workflow for financial research. It reads variable definitions from a completed research design and produces data-acquisition work plus executable Python or Stata regression scripts.

csmar432/finai-research · 36 tokens

stata-regression

Run regression analyses in Stata with publication-ready output tables.

brycewang-stanford/Auto-Empirical-Research-Skills · 16 tokens

stata-skill

A packaged Stata Runner skill via official MCP-for-Stata server including statado, adopackageinstall, help, readlog and getdatainfo tools. Use it when (1) need to execute Stata do-file; (2) missing ado-packages; (3) find code error caused by syntax in Stata; (4) want to read smcl and text format log file with rich…

SepineTam/mcp-for-stata · 105 tokens

statsmodels

Statistical models library for Python. Use when you need specific model classes (OLS, GLM, mixed models, ARIMA) with detailed diagnostics, residuals, and inference. Best for econometrics, time series, rigorous inference with coefficient tables. For guided statistical test selection with APA reporting use…

synthetic-sciences/openscience · 65 tokens