stata

stata is a skill for Claude Code from kennethkhoocy/applied-micro-skills. It costs 165 tokens per session (2,492 once invoked), scanned A, original, MIT.

A way to run Stata, a statistics program used for data analysis and econometrics, through Python. It uses Stata's official Python integration to run commands and do-files in one live session.

In plain words
What is it for?
Use it to run Stata commands or do-files, work with Stata data files, estimate econometric models, and transfer data through pandas.
Why use it?
It keeps Python and Stata data and results connected in memory and reports Stata errors directly to Python instead of requiring separate batch runs and log-file handling.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the applied-micro plugin — 17 skills shipped together

Good fit Use it to run Stata commands or do-files, work with Stata data files, estimate econometric models, and transfer data through pandas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kennethkhoocy/applied-micro-skills/stata
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 kennethkhoocy/applied-micro-skills --skill stata
Clone the repo
git clone --depth 1 https://github.com/kennethkhoocy/applied-micro-skills

Made for: Claude Code.

Or install applied-micro, the plugin that ships this one along with the rest of its 17 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kennethkhoocy/applied-micro-skills/stata"><img src="https://agentmods.dev/badge/skills/kennethkhoocy/applied-micro-skills/stata.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,492 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 20
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00165 $0.02492
Opus 5 $0.00082 $0.01246
Sonnet 5 $0.00033 $0.00498
Haiku 4.5 $0.00016 $0.00249

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

Security

Grade A, and why

stata 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 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/stata_runner.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/applied-micro/skills/stata/SKILL.md · 248 lines

How it starts

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

Stata Skill — pystata on StataNow 19.5 BE

Run Stata entirely through pystata, the official Python integration that ships with Stata. Configure the session once, then issue every command — and run every .do file — with stata.run(). Data crosses between Python and Stata in memory through pandas, so there is no need to write intermediate .dta files or read .log files unless the user wants them.

The one rule that matters most

Always execute Stata through pystata. Both individual commands and entire .do files go through stata.run(...). Never launch StataBE-64.exe as a subprocess and never run a do-file in batch mode — pystata keeps a single live Stata session in the Python process, gives direct access to data and stored results, and raises real Python exceptions on errors. Running a do-file is just stata.run('do "path/to/file.do"').

Setup

This machine has StataNow 19.5 BE at C:\Program Files\StataNow19, and it is already on PATH. pystata and stata_setup are installed for the system Python (3.14). Basic Edition (BE) is the only licensed edition; "se" and "mp" cannot be initialized.

Configure once per Python process:

import stata_setup
stata_setup.config(r"C:\Program Files\StataNow19", "be")
from pystata import stata

For clean output without the StataCorp splash banner, drive pystata.config directly instead:

import sys
sys.path.insert(0, r"C:\Program Files\StataNow19\utilities")
import pystata
pystata.config.init("be", splash=False)
from pystata import stata

config.init can run only once per process; to start over, launch a fresh Python process.

Bundled helper (optional)

scripts/stata_runner.py removes the boilerplate: it bakes in the path and edition, configures pystata lazily on first use, and wraps command-running, output capture, and data exchange. Reach for it when a script makes several Stata calls.

import os
import sys
sys.path.insert(0, os.path.expanduser("~/.claude/skills/stata/scripts"))
import stata_runner as sr

sr.run("sysuse auto, clear")
log = sr.run("regress price mpg weight, robust", capture=True)
print(log)
print("R-squared:", sr.ereturn()["e(r2)"])

Read the full file on GitHub · 248 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 248 lines · 165 tokens per session scan A fd6c63b8d4f6

Subscribe to this mod's changes

stata is a skill published in the GitHub repository kennethkhoocy/applied-micro-skills (28 stars, last pushed 6d ago), licensed MIT. It adds 165 tokens to every session and 2,492 once invoked, about $0.0008 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

literature-searcher

Search CrossRef, OpenAlex, PubMed, Semantic Scholar, and optional Scopus; deduplicate results, download open-access PDFs by DOI, classify papers, monitor new results, and analyze coverage. Use when asked to search literature, monitor a topic, download an open-access paper, classify papers, or analyze literature gaps.

Dianel555/DSkills · 72 tokens

ccdb

A lookup tool for Carbonstop's CCDB, a database of carbon-emission factors for activities and materials. It supports checking factors by region and year and comparing their units, boundaries, specifications, and sources.

aiskillstore/marketplace · 151 tokens

ieee-letter

Write or compress an IEEE communications LETTER for WCL (IEEE Wireless Communications Letters) or CL (IEEE Communications Letters): a single-contribution paper with a compressed introduction, no standalone related-work section, one system model, one core result (an algorithm OR a closed-form expression), and a tight…

TenWalk/ieee-skills · 209 tokens

ieee-experiments

Design and audit IEEE communications simulation and numerical-results sections for JSAC, TWC, TCOM, WCL, and CL. Covers benchmark schemes, Monte-Carlo protocol, BER/SER/outage/rate/EE metrics, SNR/antenna/user sweeps, analysis-vs-simulation validation, convergence and complexity, learning-based evaluation, ISAC…

TenWalk/ieee-skills · 137 tokens

ieee-polishing

Polish academic prose to IEEE-journal style at the sentence level — clarity, sentence length, section-appropriate tense, calibrated hedging, US English, acronym discipline, numbered-citation phrasing, and unit/number formatting. Also translate Chinese drafts into IEEE-style English. Use this whenever the user wants to…

TenWalk/ieee-skills · 152 tokens

ieee-response

Draft the two letters an IEEE submission needs — the point-by-point response to reviewers and the cover letter to the editor — so every comment is answered, every change is traceable to the revised manuscript, and the tone stays cooperative without conceding more than the evidence requires. Use this whenever the user…

TenWalk/ieee-skills · 151 tokens