plugin-installer
Find, install, and configure OpenCode plugins from the catalog or community. Use proactively when user asks about plugins, requests new capabilities, or mentions extending OpenCode functionality. Examples: - user: "Is there a plugin for Tailwind CSS?" → list catalog, read tailwind plugin details, install if available - user: "How do I add a custom slash command?" → suggest command-creator skill or guide through opencode.json setup - user: "What plugins are available for database work?" → list catalog, filter for database-related plugins - user: "Install the playwright plugin" → read plugin file, add to opencode.json, verify installation
What this skill does
# OpenCode Plugin Installer
Help users discover, evaluate, and install OpenCode plugins from the community catalog.
<workflow>
## 1. List Available Plugins
Run the catalog script to see what's available:
```bash
python3 ~/.config/opencode/skill/plugin-installer/scripts/list_plugins.py
```
Output shows `name: description` with path to detailed file.
## 2. Read Plugin Details
For relevant matches, read the full plugin file:
```
references/plugins/<filename>.md
```
Each file contains:
- Installation config (copy-paste JSON)
- Setup steps
- Features and caveats
- Links to docs
## 3. Recommend and Install
Show the user:
- What the plugin does
- Install snippet for `opencode.json`
- Any setup steps (OAuth, config files, etc.)
</workflow>
<question_tool>
**Batching:** Use the `question` tool for 2+ related questions. Single questions → plain text.
**Syntax:** `header` ≤12 chars, `label` 1-5 words, add "(Recommended)" to default.
When to ask: Multiple plugins match the need, or plugin has complex setup.
</question_tool>
<installation>
## Installation Format
Add to `plugin` array in opencode.json:
```jsonc
{
"plugin": [
"package-name@version"
]
}
```
**Config locations:**
- Global: `~/.config/opencode/opencode.json`
- Project: `.opencode/opencode.json`
## Version Pinning
```jsonc
// Pin version (RECOMMENDED)
"plugin": ["[email protected]"]
// Auto-update on restart
"plugin": ["package@latest"]
// Locked to first install (never updates)
"plugin": ["package"]
```
Force update when stuck:
```bash
rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lock
```
</installation>
<documenting_new_plugins>
## Adding New Plugins to the Catalog
When you discover a new OpenCode plugin (from web search, GitHub, npm, user mention), you MUST document it for future reference.
### Step 1: Gather Plugin Information
Before creating the doc, collect:
| Info | Where to Find |
|------|---------------|
| Package name | npm registry, GitHub repo name |
| Description | README, package.json description |
| Install syntax | Check if scoped (`@org/pkg`) or plain (`pkg`) |
| Version strategy | Does it recommend `@latest` or pinned? |
| Setup steps | OAuth flows, config files, env vars |
| Provider/model requirements | Does it only work with specific providers? |
| Known issues | GitHub issues, compatibility notes |
### Step 2: Create the Plugin File
**Location:** `~/.config/opencode/skill/plugin-installer/references/plugins/<name>.md`
**Naming convention:** Use the npm package name with `/` replaced by `-` for scoped packages:
- `opencode-foo` → `opencode-foo.md`
- `@org/opencode-bar` → `org-opencode-bar.md`
### Step 3: Use This Template
```markdown
---
name: package-name-or-@scope/package-name
description: One-line description for catalog listing (max ~80 chars)
---
# Plugin Display Name
Brief description of what this plugin does and why someone would use it.
## Installation
\`\`\`jsonc
{
"plugin": ["package-name@latest"]
}
\`\`\`
## Setup
### Prerequisites
- List any requirements (accounts, API keys, other tools)
### Configuration
Step-by-step setup instructions.
## Features
- Key feature 1
- Key feature 2
## Caveats
- Known limitations
- Compatibility notes
## Links
- [GitHub](https://github.com/...)
- [npm](https://www.npmjs.com/package/...)
```
### Step 4: Verify the Catalog
After creating, run the listing script to confirm it appears:
```bash
python3 ~/.config/opencode/skill/plugin-installer/scripts/list_plugins.py
```
</documenting_new_plugins>
<frontmatter_requirements>
| Field | Required | Purpose |
|-------|----------|---------|
| `name` | Yes | Package name exactly as used in `"plugin": []` |
| `description` | Yes | One-liner shown in catalog listings |
**Important:** The `name` MUST match the npm package name exactly (including scope if any). This is what users will copy into their `opencode.json`.
</frontmatter_requirements>
<example>
## Documenting a New Plugin
Say you found `@cooldev/opencode-metrics` on npm. Create:
**File:** `~/.config/opencode/skill/plugin-installer/references/plugins/cooldev-opencode-metrics.md`
```markdown
---
name: @cooldev/opencode-metrics
description: Track AI usage metrics and export to dashboards
---
# OpenCode Metrics
Export your OpenCode usage data to external dashboards...
## Installation
\`\`\`jsonc
{
"plugin": ["@cooldev/opencode-metrics@latest"]
}
\`\`\`
...
```
</example>
Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.