compiler for ai prompts

One prompt language. Every AI surface.

Stim lets you write commands, agents, and orchestration once, then compile clean instructions for Claude Code, ChatGPT, Cursor, and whatever comes next.

stim workbench live target output
source reviewer.stim
agent reviewer {
  description "Reviews PRs"
  tools [Read, Grep, Bash]
  model "sonnet"

  "Cite files and lines."
  "Rank findings by severity."
}
~/.claude/agents/reviewer.md

              
$ stim install reviewer.stim --target claude compiled
parse .stim to AST
ship agents, commands, rules
parse resolve imports optimize compile install share packages

the language

Prompts stop being loose markdown.

Stim gives prompt work the structure engineers expect: declarations, imports, variables, control flow, tasks, and target adapters. It compiles to prose, because the AI tool still reads instructions.

command

Interactive slash-command workflows with questions, branches, loops, and subagent tasks.

agent

Portable personas with metadata and stable prompt bodies.

harness

Reusable orchestration templates for repeatable multi-agent patterns.

package

Install shared command and agent kits from GitHub with one CLI call.

Raw prompts do not scale.

Source files do.
01write .stim
02resolve files
03compile target
04install anywhere

try it now

A standalone binary. No runtime ceremony.

Install Stim, write one agent, and compile it for multiple tools. The same source can become a Claude agent, a Cursor rule, or a ChatGPT instruction file.

terminal
curl -fsSL https://raw.githubusercontent.com/wess/stim/main/install.sh | sh
stim version

cat > reviewer.stim <<'STIM'
agent reviewer {
  description "Reviews PRs for security and correctness"
  tools [Read, Grep, Bash]
  "Cite specific files and line numbers."
}
STIM

stim install reviewer.stim
stim compile reviewer.stim --target chatgpt

open source

Star Stim if prompts deserve a compiler.

Built with TypeScript and Bun. MIT licensed. Small enough to read, useful enough to put in your prompt workflow today.