opencode-memory
Installation
SKILL.md
OpenCode memory
Models get smarter, but they never arrive knowing your machines, projects and preferences. That knowledge is context, and context compounds: every rule or memory you curate makes every future session better. This skill sets up four layers, each built on the one before:
| Step | What you build | Why |
|---|---|---|
| 1. Versioned config | The config folder is a git repo, with no secrets in it | Every memory or rule change can be traced and rolled back |
| 2. Lean AGENTS.md | Only rules that matter in nearly every session stay always-loaded; the rest become skills | Always-loaded context bloats; skills load only when relevant |
| 3. Memory folder | Markdown files agents search with grep, plus an append-only inbox | Agents learn during a session without corrupting shared rules |
| 4. Dreaming | A nightly job that reads the day's sessions and the inbox, updates memory and proposes rule changes | A single session can't see patterns across sessions or spare effort for curation |
Paths below use $CONFIG for the OpenCode config folder, normally
${XDG_CONFIG_HOME:-$HOME/.config}/opencode. scripts/ and references/
are relative to this skill's folder.