Skip to content
Back to search

stata-skill

Claude Code skill for writing correct, idiomatic Stata code — covers syntax, data management, econometrics, causal inference, graphics, Mata, and 20 community packages.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dylantmoore--stata-skill/badge.svg)](/listings/dylantmoore--stata-skill)

HTML

<a href="/listings/dylantmoore--stata-skill"><img src="/api/listings/dylantmoore--stata-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Add this repo as a marketplace in Claude Code:

/plugin marketplace add dylantmoore/stata-skill

Then install whichever option fits your needs:

| Plugin | Command | |--------|---------| | Stata reference only | `/plugin install stata` | | C plugin development only | `/plugin install stata-c-plugins` | | Both skills | `/plugin install stata-bundle` |

You can also find this and other plugins via the [claude-plugins](https://github.com/dylantmoore/claude-plugins) collection.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 31 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "stata-skill",
  4. "description": "Stata skills for Claude Code — comprehensive reference and C/C++ plugin development",
  5. "owner": {
  6. "name": "Dylan Moore"
  7. },
  8. "plugins": [
  9. {
  10. "name": "stata",
  11. "description": "Comprehensive Stata reference for writing correct Stata code — covers syntax, data management, econometrics, causal inference, graphics, Mata, and 20 community packages.",
  12. "category": "development",
  13. "source": "./plugins/stata",
  14. "homepage": "https://github.com/dylantmoore/stata-skill"
  15. },
  16. {
  17. "name": "stata-c-plugins",
  18. "description": "Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK. Covers SDK setup, data flow, memory safety, .ado wrappers, cross-platform compilation, performance optimization, debugging, packaging, and translating Python/R packages into Stata.",
  19. "category": "development",
  20. "source": "./plugins/stata-c-plugins",
  21. "homepage": "https://github.com/dylantmoore/stata-skill"
  22. },
  23. {
  24. "name": "stata-bundle",
  25. "description": "Both Stata skills in one install — comprehensive Stata reference plus C/C++ plugin development for Stata.",
  26. "category": "development",
  27. "source": "./",
  28. "homepage": "https://github.com/dylantmoore/stata-skill"
  29. }
  30. ]
  31. }
README.md · README · 89 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Stata Skills for Claude Code
  2. This project contains two Claude Code skills:
  3. 1. **Stata** — A comprehensive reference that tells Claude how to use Stata. Covers core syntax, data management, econometrics, causal inference, graphics, and 20+ community packages.
  4. 2. **Stata C Plugins** — A skill that tells Claude how to make Stata code that uses C plugins to do things. It includes information that Claude can use to translate existing packages into C plugins that can be called from Stata. This is very useful because it means you can do things in Stata that you wouldn't otherwise be able to do very easily.
  5. As long as you can find an existing package somewhere, you can just let Claude go look at the existing Python package and this skill provides a workflow that Claude can use to develop a replication of whatever it is, implemented in Python or R or whatever, that runs in Stata and uses a C plugin. In many if not most cases, you should be able to get something that runs at least as fast in Stata as it did in the original language, if not faster.
  6. ## Installation
  7. Add this repo as a marketplace in Claude Code:
  8. ```
  9. /plugin marketplace add dylantmoore/stata-skill
  10. ```
  11. Then install whichever option fits your needs:
  12. | Plugin | Command |
  13. |--------|---------|
  14. | Stata reference only | `/plugin install stata` |
  15. | C plugin development only | `/plugin install stata-c-plugins` |
  16. | Both skills | `/plugin install stata-bundle` |
  17. You can also find this and other plugins via the [claude-plugins](https://github.com/dylantmoore/claude-plugins) collection.
  18. ## What's Included
  19. ### Skill 1: Stata
  20. **37 core reference files** covering:
  21. - Data import/export, management, and cleaning
  22. - Linear regression, panel data, time series
  23. - Limited dependent variables, survival analysis, SEM
  24. - Causal inference: DiD, RD, matching, treatment effects
  25. - Mata programming and matrix operations
  26. - Graphics, tables, and reporting
  27. - Workflow best practices
  28. **20 community package guides** including:
  29. - `reghdfe` — high-dimensional fixed effects
  30. - `estout` / `outreg2` — publication-quality tables
  31. - `csdid`, `did_multiplegt` — modern DiD estimators
  32. - `rdrobust` — regression discontinuity
  33. - `psmatch2` — propensity score matching
  34. - `synth` — synthetic control
  35. - `ivreg2` / `xtabond2` — IV and dynamic panel GMM
  36. - And more (binsreg, coefplot, grstyle, winsor2, gtools, ...)
  37. ### Skill 2: Stata C Plugins
  38. **Reference files** covering:
  39. - Stata plugin SDK (`stplugin.h`) setup and data flow
  40. - Memory safety, debugging, and common failure modes
  41. - `.ado` wrapper patterns (preserve/merge, plugin loading)
  42. - Cross-platform compilation (macOS, Linux, Windows)
  43. - Performance optimization (pthreads, pre-sorted indices, XorShift RNG)
  44. - Packaging and distribution via `net install`
  45. - Translation workflow for porting Python/R packages to Stata
  46. - Testing strategy with correlation-based validation against reference implementations
  47. ## How It Works
  48. Both skills use **progressive disclosure**: a compact SKILL.md file loaded on activation directs Claude to read only the reference files relevant to the current task. This keeps context usage efficient while giving Claude access to detailed reference documents when needed.
  49. ## Coverage
  50. | Category | Files | Topics |
  51. |----------|-------|--------|
  52. | Data Operations | 7 | Import, management, strings, dates, math functions |
  53. | Statistics | 10 | Regression, panel, time series, MLE, GMM, survey, MI |
  54. | Causal Inference | 5 | DiD, RD, matching, treatment effects, selection |
  55. | Advanced Methods | 5 | Survival, SEM, nonparametric, spatial, ML/lasso |
  56. | Programming | 6 | Do-files, macros, loops, Mata |
  57. | Output & Workflow | 3 | Tables, reporting, best practices, external tools |
  58. | Packages | 20 | Community-contributed packages |
  59. | C Plugins | 4 | SDK patterns, performance, packaging, translation |
  60. ## Contributing
  61. This repo is also a good place to learn about building Claude Code skills. The [ROADMAP.md](ROADMAP.md) lists open problems around testing, progressive disclosure, and dynamic documentation that apply to skill development in general — not just Stata.
  62. See [CONTRIBUTING.md](CONTRIBUTING.md) for how to add documentation for new Stata packages. Pull requests welcome!
  63. ## Disclaimer
  64. This reference material is derived in part from Stata's official documentation and community package documentation. No copyright is claimed. Stata is a registered trademark of StataCorp LLC. This project is not affiliated with or endorsed by StataCorp.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.