stata-ai: Instructions file for Claude Code

CLAUDE.md

stata-ai CLAUDE.md is an instructions file for Claude Code from lianxhcn/stata-ai. It costs 1,255 tokens per session, scanned A, original, MIT.

Project instructions for stata-ai, a Chinese-language course and example repository about Stata and AI-assisted empirical research. The project is published as a Quarto book, which turns source files into a structured website or book.

In plain words
What is it for?
Use them when editing the course, lectures, appendices, examples, images, build configuration, or project documentation, especially when checking what must not be committed.
Why use it?
They tell an agent how the repository is organised, which files are private, what style to follow, and which rules apply before making changes. This helps prevent accidental publishing of working materials or inconsistent course content.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions Codex.

This is lianxhcn/stata-ai's own configuration. It tells Claude Code how to work on stata-ai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything stata-ai configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lianxhcn/stata-ai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lianxhcn/stata-ai/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/lianxhcn/stata-ai

Made for: Claude Code.

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 CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lianxhcn/stata-ai/claude-md"><img src="https://agentmods.dev/badge/instructions/lianxhcn/stata-ai/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,255 This file is loaded in full into every session.
When invoked 1,255 The same file — it is already loaded in full.
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.01255 $0.01255
Opus 5 $0.00628 $0.00628
Sonnet 5 $0.00251 $0.00251
Haiku 4.5 $0.00126 $0.00126

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

Security

Grade A, and why

stata-ai CLAUDE.md 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 10d 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.

CLAUDE.md · 73 lines

How it starts

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

CLAUDE.md — stata-ai 项目指南

本文件是本项目中 AI Agent(Claude Code / Codex)的总指南。开始任何工作前先读完本文件, 再按 working/00-PLAN.md 的流水线逐个执行任务。

1. 项目是什么

  • 这是连玉君老师 2026-07-12 公开课「Stata 简介与 AI 辅助实证」的课程仓库。
  • 用 Quarto book 编译,通过 GitHub Pages 发布,网址形如 https://lianxhcn.github.io/stata-ai
  • 仓库有三重身份:课程主页、听众课后自学的配置手册、可下载复现的演示项目(demo/)。
  • 风格基准:与 ci-policy 仓库(本地路径见 _materials/三个仓库的本地路径.md)保持一致—— 简体中文、导航结构、页脚 lianxh.cn 链接、克制的 emoji 使用。

2. 目录约定

stata-ai/
├── CLAUDE.md          # 本文件(不推送远程)
├── working/           # 过程文档:任务书、规格、真值记录(不推送远程)
├── _task/             # 老师自己的任务备忘(不推送远程)
├── _materials/        # 原始素材与收割文件(不推送远程)
├── _quarto.yml        # T2 生成
├── index.qmd 等       # T2 生成的正式页面
├── lectures/          # 四讲讲义
├── appendix/          # 附录 A-D
├── demo/              # 演示项目(T3 生成,随仓库发布)
└── images/            # 图片

永远不推送远程的内容working/_task/_materials/CLAUDE.md。 T2 任务中会写入 .gitignore 固化这条规则;任何 git 操作前先确认 .gitignore 生效。

3. 硬性规则

  1. 中文写作。全站简体中文;术语与命令名保留英文原文(如 dofile、csdid)。
  2. 素材可直接使用_materials/blogs/ 推文,以及 ci-policy、stata101、ds2026 三个 仓库里的文字与图片,均为老师本人版权,无版权顾虑):
    • 文字:可直接采用,不必只做改写;觉得原文不够好时可自行改写、润色。
    • 图片:直接复制原仓库 markdown 里的 ![text](url) 图床链接使用,不必把图片 文件另存到本仓库(图床 URL 版权同属老师)。
    • 链接(作用类似论文参考文献,目的是让读者深入了解):只截取段落性文字放入书稿时 不必标注原文链接;截取后读者若需了解更深内容附原文链接;涉及基础设施配置、 软件安装等因 80 分钟课时不便展开的内容,给出 ds2026 等仓库的完整链接, 让读者按链接了解完整过程。
  3. 不发明事实。课程时间、价格、大纲等信息只能来自 _materials/misc/ 中的文件; 拿不准就留 <!-- TODO --> 注释并在任务结束时汇报。
  4. 只读源仓库。对 ci-policy、stata101、ds2026 三个本地仓库只有读权限,绝不修改。
  5. 每个任务结束必须汇报:做了什么、产出在哪、遇到什么问题、哪些 TODO 待人工确认。 得到确认后才进入下一个任务。
  6. demo/_dgp/ 存放数据生成代码。在 T4 演示分析时,扮演分析者的 agent 不得读取 该文件夹与 working/(防止"偷看答案"),README 与任务提示词中已有约束。

4. 工具与环境

  • 系统:Windows;在 VS Code 终端中运行。
  • Quarto:用 quarto render 编译全站;报错先修复再继续。
  • Stata:批处理模式调用,形如 "C:\Program Files\Stata19\StataMP-64.exe" /e do 文件名.do。 Stata 安装路径不确定时,先在 C:\Program Files\ 下搜索 Stata*;找不到就停下来问人。
  • 生成 PDF 用 Quarto 的 typst 引擎(免装 LaTeX),中文字体用 SimSun,详见 demo README。

Read the full file on GitHub · 73 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. 10d ago First seen · 73 lines · 1,255 tokens per session scan A e3d07422df3f

Subscribe to this mod's changes

stata-ai CLAUDE.md is an instructions file published in the GitHub repository lianxhcn/stata-ai (23 stars, last pushed 1mo ago), licensed MIT. It adds 1,255 tokens to every session, about $0.0063 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 instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens