stim: Instructions file for Codex

AGENTS.md

stim AGENTS.md is an instructions file for Codex, OpenCode from wess/stim. It costs 3,280 tokens per session, scanned A, original, MIT.

Project instructions for Stim, a TypeScript and Bun program that turns reusable AI instructions into text for tools such as Claude Code, ChatGPT, and Cursor.

In plain words
What is it for?
Use them when developing, testing, or understanding Stim’s compiler, its .stim files, and the generated tool-specific instructions.
Why use it?
They give coding agents the project’s build commands, test commands, layout, and design rules so changes fit the repository.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is wess/stim's own configuration. It tells Codex and OpenCode how to work on stim 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 stim configures →

Reuse

Borrowing it

Nothing to install: this file belongs to wess/stim. 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/wess/stim/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/wess/stim

Made for: Codex, OpenCode.

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 stim AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/wess/stim/agents-md/github.svg)](https://agentmods.dev/instructions/wess/stim/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/wess/stim/agents-md"><img src="https://agentmods.dev/badge/instructions/wess/stim/agents-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 stim AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/wess/stim/agents-md"><img src="https://agentmods.dev/badge/instructions/wess/stim/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,280 This file is loaded in full into every session.
When invoked 3,280 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.03280 $0.03280
Opus 5.5 $0.01312 $0.01312
Sonnet 5.5 $0.00656 $0.00656
Haiku 4.5 $0.00328 $0.00328

Measured 2mo ago against content hash fbe4da443bb2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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.

AGENTS.md · 159 lines

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.md and src/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

Read the full file on GitHub · 159 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. 2mo ago First seen · 159 lines · 3,280 tokens per session scan A fbe4da443bb2

Subscribe to this mod's changes

stim AGENTS.md is an instructions file published in the GitHub repository wess/stim (4 stars, last pushed 3mo ago), licensed MIT. It adds 3,280 tokens to every session, about $0.0131 per session on Opus 5.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.

Related

stim AGENTS.md compared with instructions from other repositories

stim AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stim AGENTS.mdwess/stimInstructions file43mo agoMITA3,280Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k3d agoMITA4,313Codex, OpenCode