Prompts, commands and skills

A typed message is expanded in the kernel, so the terminal UI, line mode, -p, ACP and HTTP behave the same:

  • @path attaches a file as numbered lines, @path:10-20 or @path#L10-20 a range, @dir/ a listing, @image.png the image. Quote paths with spaces: @"my notes.md". Up to 20 files and 1 MB are attached; attached contents are framed as untrusted data, and credential stores and paths a read(...) deny rule covers are skipped with a notice. A word like me@example.com is left alone.
  • /compact [focus] summarizes the conversation now (automatic compaction still runs at compact_threshold).
  • /name args runs a custom command or a skill; /mcp__server__prompt args fetches an MCP prompt (key=value pairs, or words in the prompt's argument order; the last argument takes the rest). The prompt's messages arrive framed as untrusted data from that server.

The user event records the expanded text, the attachments and the command as typed, so history never depends on the files again.

Custom commands are Markdown files in ~/.config/oi/commands/ or .oi/commands/ (a later one replaces an earlier one; git/commit.md is /git:commit), or registered by plugins with oi.registerCommand({name, description, argument_hint, model, prompt}):

---
description: Review a change for bugs
argument-hint: <path>
model: openai/gpt-6.2-sol        # optional: the turn runs on this model
---
Review the changes in $1 for correctness bugs. Context: $ARGUMENTS

$ARGUMENTS is the whole argument string and $1..$9 its words (quotes group words); a template without placeholders gets the arguments appended.

Skills are folders with a SKILL.md (frontmatter name and description, then instructions) and any files it refers to, in ~/.agents/skills/, ~/.config/oi/skills/, .agents/skills/ or .oi/skills/. The system prompt lists each skill's name and description; the model loads one with the skill tool when a task matches, and you can run one directly as /name task. Skills, commands and agent profiles load at start and on /reload, so the prompt prefix stays stable for caching.