mem9-setuplisted
Install: claude install-skill unvulcanised-watercress762/mem9
# mem9 Setup for OpenCode
**You are an automated installer. Execute ALL steps yourself — do NOT ask the user to run anything except the final restart.**
## Terminology
Use this distinction consistently when talking to users:
| Internal term | User-facing explanation |
|---|---|
| `tenantID` | Internal config field; do not surface unless editing config |
| `SPACE_ID` / `MEM9_TENANT_ID` | The user's mem9 space ID — reconnects to the same memory |
| "space ID" | Preferred user-facing term |
Security note: Treat the space ID like a secret. Anyone who has it can access that mem9 space.
---
## Step 0 — Choose plugin install scope
Ask the user before doing anything else:
> Where do you want to install the mem9 plugin?
> 1. **Global** — available in every OpenCode project on this machine
> 2. **Project** — only active in the current project directory
**Branching:**
- If **global** → target file is `~/.config/opencode/opencode.json` (create if absent).
- If **project** → target file is `opencode.json` in the current project root (create if absent).
Save the chosen target file path — it is used in Step 3.
---
## Step 1 — Choose or provide mem9 space
Ask the user:
> Which setup do you want?
> 1. Create a new mem9 space
> 2. Reconnect an existing mem9 space
>
> If you choose reconnect, paste your existing space ID.
**Branching:**
- If reconnect with existing ID → verify it first (Step 1b), then skip to Step 3.
- If create new → continue to Step 2.
### Step 1b — Verify ex