From 5cf3779f8a20e4ba09ed9330b3ba98d128ed49d4 Mon Sep 17 00:00:00 2001 From: alpha nerd Date: Sat, 13 Jun 2026 15:38:30 +0200 Subject: [PATCH] Fix install docs: opencode auto-discovers skills, no skills.paths config --- INSTALL.md | 55 ++++++++++++++++++++++++++++++------------------------ README.md | 28 ++++++++++----------------- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index f639aa1..9d086e2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,35 +4,35 @@ ## Quick Install -### Option A: Local (recommended) +### Local (recommended) + +Opencode auto-discovers skills from `~/.config/opencode/skills/` and agents from `.opencode/agents/` — no config changes needed. + +```bash +# Clone the repo +git clone /tmp/opencode-for-legal + +# Copy skills to your opencode skills directory +cp -r /tmp/opencode-for-legal/opencode-for-legal/skills/* ~/.config/opencode/skills/ + +# Copy agents to your opencode agents directory +mkdir -p ~/.opencode/agents +cp /tmp/opencode-for-legal/opencode-for-legal/agents/* ~/.opencode/agents/ +``` + +### Symlink alternative + +If you prefer to keep the repo in one place and sync updates: ```bash # Clone the repo git clone ~/legal-tools -# Add skills path to your opencode config -# ~/.config/opencode/opencode.json: -{ - "skills": { - "paths": ["~/legal-tools/opencode-for-legal/skills"] - } -} +# Symlink individual skills (avoids name conflicts) +ln -s ~/legal-tools/opencode-for-legal/skills/* ~/.config/opencode/skills/ +ln -s ~/legal-tools/opencode-for-legal/agents/* ~/.opencode/agents/ ``` -### Option B: Remote catalog - -If the repo is hosted at a URL that serves `index.json`: - -```json -{ - "skills": { - "urls": ["https:///index.json"] - } -} -``` - -Opencode downloads and caches skills automatically. - ## Setup After install, run the setup wizard: @@ -47,9 +47,15 @@ This guides you through: 3. Replacing `[PLACEHOLDER]` values with your company's configuration 4. Enabling the MCP servers you have access to +**Note:** The setup skill copies templates from `opencode-for-legal/legal-config/` (the repo). Make sure that directory is accessible, or copy the templates manually: +```bash +mkdir -p ~/.config/opencode/opencode-for-legal +cp /tmp/opencode-for-legal/opencode-for-legal/legal-config/* ~/.config/opencode/opencode-for-legal/ +``` + ## MCP Servers -Copy `opencode-for-legal/opencode.json.example` to `~/.config/opencode/opencode.json`, then uncomment and configure only the servers you use: +Copy `opencode-for-legal/opencode.json.example` to `~/.config/opencode/opencode.json`, then uncomment and configure only the servers you use. Or merge the `mcp` block into your existing config. ```json { @@ -313,7 +319,8 @@ Each plugin has a practice-profile template in `opencode-for-legal/legal-config/ ## Differences from Opencode Version -- **No plugin manifests** — Opencode discovers skills by directory structure +- **No plugin manifests** — Opencode auto-discovers skills from `~/.config/opencode/skills/` +- **No `skills.paths` config** — copy or symlink skills directly to `~/.config/opencode/skills/` - **Skill names are namespaced** — `{plugin}-{skill}` instead of `/plugin:skill` - **MCP config is in opencode.json** — not per-plugin `.mcp.json` files - **No hooks** — Opencode's `hooks.json` was empty stubs; Opencode hooks require TypeScript plugins diff --git a/README.md b/README.md index 19301e1..016d453 100644 --- a/README.md +++ b/README.md @@ -11,26 +11,18 @@ ## Quick Install ```bash -# Local install -git clone ~/.config/opencode/opencode-for-legal +# Clone the repo +git clone /tmp/opencode-for-legal -# Add to opencode.json: -{ - "skills": { - "paths": ["~/.config/opencode/opencode-for-legal/skills"] - } -} +# Copy skills to your opencode skills directory +cp -r /tmp/opencode-for-legal/opencode-for-legal/skills/* ~/.config/opencode/skills/ + +# Copy agents to your opencode agents directory +mkdir -p ~/.opencode/agents +cp /tmp/opencode-for-legal/opencode-for-legal/agents/* ~/.opencode/agents/ ``` -Or use the remote catalog: - -```json -{ - "skills": { - "urls": ["https:///index.json"] - } -} -``` +Opencode auto-discovers skills from `~/.config/opencode/skills/` and agents from `.opencode/agents/` — no config changes needed. See [INSTALL.md](INSTALL.md) for full setup instructions. @@ -123,7 +115,7 @@ Each plugin has a practice-profile template in `opencode-for-legal/legal-config/ | Aspect | Original (Claude Code) | This Port (Opencode) | |---|---|---| -| **Distribution** | Claude Code plugin marketplace | Opencode skills (local or remote catalog) | +| **Distribution** | Claude Code plugin marketplace | Copy to `~/.config/opencode/skills/` (auto-discovered) | | **Skill invocation** | `/plugin:skill` slash commands | Auto-loaded by model from `skills/` directory | | **Skill naming** | Short names within plugin namespace | Namespaced: `{plugin}-{skill}` (e.g., `commercial-legal-nda-review`) | | **MCP config** | Per-plugin `.mcp.json` files | Single `opencode.json` with `mcp` key |