Agent skill

Stata C Plugins

by dylantmoore in dylantmoore/stata-skill

Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK.

Custom licenceAuto-check passedResearch & Science

Install Stata C Plugins

skills CLI
$ npx skills add dylantmoore/stata-skill --skill stata-c-plugins -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dylantmoore/stata-skill stata-c-plugins --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dylantmoore/stata-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/stata-c-plugins/skills/stata-c-plugins .claude/skills/stata-c-plugins && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stata-c-plugins
GitHub stars
291
Used in
1 other repo
Token cost
~5.8k tokens
SKILL.md length
2,314 words
Files
6 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
Custom licence

At a glance

Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK.

  • Works in 6 steps: Complete inventory — every feature,… → Architecture decisions — wrap C++… → Relevant reference files — identify up… → …
  • The user asks to create a Stata plugin
  • SKILL.md covers How to Approach Every Task, Wrap First, Write From Scratch…, The Plugin SDK and Memory Safety, plus 8 more sections
  • Calls brew, docker and bash; reaches raw.githubusercontent.com

What it does

Stata C Plugins is an agent skill from dylantmoore/stata-skill. Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK. Use when the user asks to create a Stata plugin, write C/C++ code for Stata, accelerate a Stata command with C, build cross-platform Stata plugins, or translate/port a Python or R package into Stata. Covers the full lifecycle: SDK setup, data flow, memory safety, .ado wrappers with preserve/merge, cross-platform compilation, performance optimization (pthreads, pre-sorted indices, XorShift RNG), debugging, and distribution via net install…

Its SKILL.md is about 5.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/cpp_plugins.md`, `references/packaging_and_help.md` and `references/performance_patterns.md`).

It sits in Research & Science, covering Econometrics and empirical research and Translation. It works with C++, Python and macOS. The repository describes itself as: Claude Code skill for writing correct, idiomatic Stata code — covers syntax, data management, econometrics, causal inference, graphics, Mata, and 20 community packages.

When your agent uses it

  • The user asks to create a Stata plugin
  • Write C/C++ code for Stata
  • Accelerate a Stata command with C
  • Build cross-platform Stata plugins

Example prompts

  • “/stata-c-plugins”

Requirements

  • Python 3
  • Docker

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Complete inventory — every feature, option, and component to build (for translation: exhaustive catalog of the source package's API)
  2. Architecture decisions — wrap C++ backend vs. write C from scratch vs. pure Stata
  3. Relevant reference files — identify up front which of this skill's reference files contain info you'll need, and cite them explicitly in…
  4. Phase-by-phase steps with dependencies between them
  5. For each step: what gets built, what tests get written, and that the review loop runs before proceeding
  6. For translation projects: a final fidelity audit as the last step (see translation_workflow.md)

What it can do on your machine

Read from SKILL.md and the folder at commit 33a7efc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • brew
    • docker
    • bash
    • apt-get
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • raw.githubusercontent.com

    Also links to:

    • stata.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Stata C Plugins loads about 5.8k tokens when it runs, and up to ~23k if it reads all its reference files. Until then it costs about 174 tokens; SKILL.md has 2,314 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~174
When it runs · the whole SKILL.md, loaded when a task matches
~5.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~23k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 2,314 words (~5,848 tokens).

“Build high-performance C/C++ plugins for Stata. This skill covers the full lifecycle from SDK setup through cross-platform distribution, based on real experience building production Stata plugins for statistical imputation, random forests, string matching, and causal inference.”

— opening of SKILL.md by dylantmoore, Custom licence
name
stata-c-plugins

Read the full SKILL.md on GitHub

Files

SKILL.md and 5 other files (references) in plugins/stata-c-plugins/skills/stata-c-plugins of dylantmoore/stata-skill.

  • SKILL.md
  • references/cpp_plugins.md
  • references/packaging_and_help.md
  • references/performance_patterns.md
  • references/testing_strategy.md
  • references/translation_workflow.md

Open the folder on GitHubat commit 33a7efc

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dylantmoore/stata-skill, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Stata C Plugins next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stata C Plugins compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stata C Plugins this skilldylantmoore/stata-skill2911 repos~5.8kAutomated safety check: PassCustom licence
Stata Python Translationbrycewang-stanford/Auto-Empirical-Research-Skills4.5k—~6.2kAutomated safety check: PassCustom licence
NSFC Abstract Writerhuangwb8/ChineseResearchLaTeX2.9k1 repos~1.3kAutomated safety check: PassMIT
Edge Bringupexeex/edge-cores110—~1.7kAutomated safety check: NotesApache-2.0
Smooth Translationopenforecast-org/smooth107—~2.2kAutomated safety check: PassLGPL-2.1
Capture Environmentpedrohcgs/claude-code-my-workflow1.7k—~2.8kAutomated safety check: NotesMIT

Similar skills

  • Stata Python Translation

    brycewang-stanford/Auto-Empirical-Research-Skills

    Stata-to-Python translation for data analysis. An agent skill from brycewang-stanford/Auto-Empirical-Research-Skills.

    4.5k GitHub stars~6.2k tokensUpdated 3 days ago
    Research & ScienceAuto-check passed
  • NSFC Abstract Writer

    huangwb8/ChineseResearchLaTeX

    Writes Chinese and English abstracts for NSFC grant applications, with a recommended title and five alternatives, within set character limits.

    2.9k GitHub starsUsed in 1 repo~1.3k tokens
    Research & ScienceAuto-check passed
  • Edge Bringup

    exeex/edge-cores

    Prepare a macOS or Ubuntu machine for edge-e3 development, diagnose missing Verilator/LLVM/Python dependencies, initialize the public repository, and answer or act on the example prompts in the root…

    110 GitHub stars~1.7k tokensUpdated 13 days ago
    AI & LLM EngineeringAuto-check: notes
  • Smooth Translation

    openforecast-org/smooth

    Port a feature from the R smooth package to the Python port, or check how an R name maps to Python.

    107 GitHub stars~2.2k tokensUpdated today
    Writing & ContentAuto-check passed
  • Capture Environment

    pedrohcgs/claude-code-my-workflow

    Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt /…

    1.7k GitHub stars~2.8k tokensUpdated 11 days ago
    Research & ScienceAuto-check: notes
  • Stata Discover

    SepineTam/mcp-for-stata

    A skill your agent uses when you need to find Stata on the user's machine or configure stata-mcp to use it.

    264 GitHub stars~1.7k tokensUpdated 3 days ago
    Research & ScienceAuto-check passed

More from dylantmoore/stata-skill

  • Stata

    dylantmoore/stata-skill

    Comprehensive Stata reference for writing correct .do files, data management, econometrics, causal inference, graphics, Mata programming, and 20 community packages (reghdfe, estout, did, rdrobust…

    291 GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • Stata Skill Contributor

    dylantmoore/stata-skill

    Guide for contributing to the stata-skill project. An agent skill from dylantmoore/stata-skill.

    291 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed

Works with

Questions about Stata C Plugins

What does Stata C Plugins do?

Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK. Stata C Plugins is an agent skill from dylantmoore/stata-skill.h SDK.

When should I use Stata C Plugins?

Stata C Plugins fits situations like: the user asks to create a Stata plugin; write C/C++ code for Stata; accelerate a Stata command with C; build cross-platform Stata plugins.

How do I install Stata C Plugins in Claude Code?

Run `npx skills add dylantmoore/stata-skill --skill stata-c-plugins -a claude-code`. Or copy the skill folder (plugins/stata-c-plugins/skills/stata-c-plugins in dylantmoore/stata-skill) into .claude/skills/stata-c-plugins in your project. Claude Code loads it when a task matches its description.

How do I install Stata C Plugins in Codex?

Run `npx skills add dylantmoore/stata-skill --skill stata-c-plugins -a codex`. Or copy the skill folder (plugins/stata-c-plugins/skills/stata-c-plugins in dylantmoore/stata-skill) into .agents/skills/stata-c-plugins in your project. Codex loads it when a task matches its description.

Can I use Stata C Plugins in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dylantmoore/stata-skill --skill stata-c-plugins -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stata-c-plugins, .gemini/skills/stata-c-plugins, .github/skills/stata-c-plugins and .opencode/skills/stata-c-plugins in your project.

What does Stata C Plugins need to run?

Going by SKILL.md and its folder, Stata C Plugins needs the command-line tools its instructions call (brew, docker, bash, apt-get and make). Our summary lists: Python 3; Docker.

Does Stata C Plugins access the network?

SKILL.md names 2 domains. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. As links in the text: stata.com. This is read from the text; nothing was executed.

Is Stata C Plugins safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Stata C Plugins use?

Stata C Plugins has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Stata C Plugins use?

About 5.8k tokens (SKILL.md is roughly 23k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17k tokens, read only when the agent opens those files.

What are the alternatives to Stata C Plugins?

Skills that share tags, products or a category with Stata C Plugins: Stata Python Translation (brycewang-stanford/Auto-Empirical-Research-Skills, 4.5k stars), NSFC Abstract Writer (huangwb8/ChineseResearchLaTeX, 2.9k stars), Edge Bringup (exeex/edge-cores, 110 stars) and Smooth Translation (openforecast-org/smooth, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stata C Plugins?

dylantmoore (a GitHub user) maintains it in dylantmoore/stata-skill, which has 291 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on April 10, 2026.

Source: dylantmoore/stata-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.