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.
npx agentmods add instructions/wess/stim/agents-mdgit clone --depth 1 https://github.com/wess/stimWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.03280 | $0.03280 |
| Opus 5 | $0.01640 | $0.01640 |
| Sonnet 5 | $0.00656 | $0.00656 |
| Haiku 4.5 | $0.00328 | $0.00328 |
Grade A, and why
stim AGENTS.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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Instructions for AI coding agents (Claude Code, Cursor, Copilot, etc.) working in this repository.
What this project is
Stim is a DSL for writing AI prompts — slash commands, agent personas, and reusable orchestration harnesses — that compiles to whatever AI tool you target (Claude Code, ChatGPT, Cursor). You write one .stim file; stim parses it, resolves imports and file-references, and emits tool-specific markdown.
It is a compiler, not a runtime. Nothing in .stim "runs" — it compiles to natural-language instructions that an AI tool then interprets.
- Language: TypeScript, run on Bun (not Node).
- Output: a single compiled binary (
dist/stim), no runtime dependency. - Source of truth for the language:
docs/Syntax-Reference.mdandsrc/types/index.ts(the AST).
Build, test, run
bun install # install deps
bun run dev -- <args> # run the CLI from source (e.g. bun run dev -- compile f.stim)
bun run build # compile single binary → dist/stim
bun run build:all # cross-platform binaries (scripts/build-all.sh)
bun test # full suite (tests/, bun:test) — 300 tests
bun test tests/parser.test.ts # one file
bun test -t "parses tools" # tests matching a name
There is no lint or format script and no CI test gate beyond the release workflow. Run bun test yourself before claiming a change works. tsconfig.json is noEmit + strict; type errors surface through bun / the editor, not a build step.
The release workflow is .github/workflows/release.yml (tag-triggered cross-platform build + GitHub release). Do not touch it without being asked.
Repository layout
src/
main.ts entry point — calls cli/
cli/ argument parsing, `compile` subcommand, --lsp dispatch, file I/O
parser/ .stim source → AST (Declaration) [PURE]
resolve/ inline task("file.stim") + parallel bodies [I/O: reads files]
imports/ resolve `import "x.stim"` → variable scope [I/O: reads files]
optimize/ AST → AST optimize/sanitize passes + normalizeOutput, opt-in [PURE]
compiler/ AST → natural-language markdown prompt body, shared by all targets [PURE]
targets/ one adapter per AI tool
index.ts Target type, registry, getTarget, extractFlags, warnDropped
claude/ chatgpt/ cursor/
install/ `install` subcommand + bundle install
add/ remove/ update/ package-manager subcommands
tokens/ `tokens` subcommand — heuristic token estimator [countTokens is PURE]
registry/ GitHub package fetching (parseSource, fetchManifest, fetchStimFile)
lockfile/ stim.lock read/write
types/ AST type definitions — the contract everything shares
lsp/ Language Server (diagnostics, completion, hover, symbols, highlighting)
packages/ first-party packages (reviews, gitflow, planning, writing) — each has stim.yaml
engine/ meta-workflow .stim files (annotated commands + topology fragments)
examples/ ready-to-use .stim files (commands and agents)
plugins/ editor integrations: vscode, neovim, zed
docs/ documentation (see "Docs map" below)
tests/ bun:test suite, one file per concern
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.
- 2d ago First seen · 159 lines · 3,280 tokens per session scan A fbe4da443bb2
stim AGENTS.md is an instructions file published in the GitHub repository wess/stim (4 stars, last pushed 1mo ago), licensed MIT. It adds 3,280 tokens to every session, about $0.0164 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-31.
Other instructions, from other repositories
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.
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).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
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).
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.
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.