# Skills and plugins

| Kind | What it is |
| --- | --- |
| Skill | A directory with `SKILL.md` and optional `references/`, `templates/`. The description is listed in the system prompt; the `skill` tool loads the body |
| Plugin | A manifest contributing skills, commands, agents, hooks, MCP servers and provider directories. Carries no code, so enabling one runs nothing in the worker |

Managed on the Abilities pages and with `openprogram skills`, `openprogram plugins`. Mounting: [Plugin runtime](https://fzkuji.github.io/OpenProgram/docs/reference/design/integrations/extensions/plugin-runtime.html).

## Skills

```
---
name: my-skill
description: One-line trigger description
category: devops              # hermes-style grouping
optional: false               # replaces hermes optional-skills directory
allowed-tools: [Read, Edit]   # claude-code: restrict usable tools
triggers:                     # OpenProgram extension
  keywords: ["deploy", "ci"]
  file_patterns: ["*.yml"]
  slash: "/deploy"
version: 1.0.0
author: ...
---
```

| Precedence, lowest first | Location |
| --- | --- |
| Remote cache | `~/.openprogram/cache/skills/<name>/`, pulled from a remote index |
| Plugin | Contributed by enabled plugins |
| User | `~/.openprogram/skills/<name>/` |
| Project | `<project>/skills/<name>/` |

A later source overrides on conflict. The name is the path relative to the source root (`anthropic-skills/docx`), so a collision means one skill from two sources.

## Plugins

| Manifest form | From |
| --- | --- |
| `.claude-plugin/plugin.json`, `.codex-plugin/plugin.json`, root `plugin.json` | Claude Code, Codex |
| `[tool.openprogram.plugin]` in `pyproject.toml` | OpenProgram |
| `openprogram`, `opencode` or `hermes` field in `package.json` | npm packages |
| `plugin.yaml`, `plugin.yml` | Hermes |

| Source | Location |
| --- | --- |
| npm | `~/.openprogram/plugins/node_modules/<name>/` |
| Local path, git clone | `~/.openprogram/plugins/<name>/`; a link for a local path |
| Project pin | `<project>/.openprogram/plugins.json`: enablement, version, source |

| Entrypoint | Injected into |
| --- | --- |
| skills | Skill registry, merged with filesystem skills |
| commands | `availableFunctions`, tagged `source=plugin:<name>` |
| mcpServers | The `openprogram/extensions/mcp/` registry |
| providers | Provider registry; same `provider.json` contract as built-in adapters |
| agents | Subagent registry |
| hooks | Event bus, as shell commands |

| Trust | Loading |
| --- | --- |
| `verified`, `community` | Contents mount. Hooks and MCP servers run as their own processes |
| `untrusted`, and any plugin not listed | Not enabled; the UI asks for trust. Stored in `~/.openprogram/plugin-trust.json` |

A manifest naming code is refused; code that adds tools or a UI is an [application](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/program-model.html#4-plugins). With no code in the worker there is no in-process or RPC mode.

## Code

| Path | Holds |
| --- | --- |
| `openprogram/extensions/skills/` | `loader.py` four-source loading and prompt listing; `tool.py` the `skill` tool and trace; `discovery.py` remote pull; `watcher.py` hot reload on file events and WS broadcast; a 5-second look only where file events are unavailable, a 300-second resync |
| `openprogram/extensions/plugins/` | `manifest.py`, `loader.py`, `installer.py`, `hooks.py`, `marketplace.py`, `trust.py`, `autoupdate.py`, `inspect.py` |
| `openprogram/interfaces/server/routes/catalog/` | `skills.py`, `plugins.py` |
| `openprogram/state/frontmatter.py` | `SKILL.md` parsing, shared with output styles and the CLI |
| `apps/web/components/skills/`, `apps/web/components/plugins/` | Pages, `views/`, `dialogs/`, `discovery/` |
| `apps/web/lib/abilities/` | `skills-store.ts`, `plugins-store.ts`, subscribed to the WS events |

**Skills API**

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/skills` | Merged list with source, enabled, category, optional |
| GET | `/api/skills/_complete`, `_search`, `_resolve` | Completion, search, resolution for the composer and `skill` tool |
| GET | `/api/skills/{name}` | Full text, frontmatter, resource tree |
| GET | `/api/skills/{name}/file` | One resource file |
| POST, PUT | `/api/skills`, `/api/skills/{name}` | Create in project or user; edit |
| DELETE | `/api/skills/{name}` | Project, user or remote cache only |
| POST | `/api/skills/{name}/toggle` | Enable or disable |
| POST | `/api/skills/{name}/invoke-trace` | Injection record of the last invocation |
| GET, POST | `/api/skills/discovery/sources` | List or add remote indexes |
| POST | `/api/skills/discovery/pull` | Pull one skill into the cache |
| GET | `/api/skills/discovery/suggested`, `browse`, `diff` | Suggested indexes, browsing, comparing with the source |
| POST | `/api/skills/discovery/install` | Install from an index |
| WS | `skills:changed` | From the watcher and mutating routes |

**Plugins API**

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/plugins` | Installed list, status, errors |
| GET | `/api/plugins/inspect` | Live self-description for authors |
| GET | `/api/plugins/updates` | Available updates |
| GET | `/api/plugins/commands`, `builtin` | Contributed slash commands; built-in entries |
| GET | `/api/plugins/{name}` | Details, manifest, entrypoint status |
| POST | `/api/plugins/install` | `{source: npm\|git\|path, spec, ref}`; code is refused |
| POST | `/api/plugins/{name}/uninstall`, `toggle` | Uninstall, enable or disable |
| POST | `/api/plugins/{name}/reload` | As claude-code `/reload-plugins` |
| POST | `/api/plugins/{name}/validate` | Dry run: manifest, entrypoints, dependencies, compatibility |
| GET, POST | `/api/plugins/{name}/options` | Read or write options |
| POST | `/api/plugins/{name}/trust` | Set the trust level |
| GET, POST | `/api/plugins/marketplaces` | List or add, claude-code schema compatible |
| DELETE | `/api/plugins/marketplaces/{id}` | Remove |
| GET | `/api/plugins/marketplace/{id}/index` | Browse with search, category, pagination |
| WS | `plugins:changed`, `plugins:update_available` | After changes; after update polling |

**Frontend**

| Route | Shows |
| --- | --- |
| Navigation | Under Abilities, next to Programs and MCP servers; active on `/skills`, `/plugins`, `/mcp`, `/programs` |
| `/skills` | List by category with optional collapsed, details with invocation trace, create, remote indexes |
| `/plugins` | Installed, Marketplace, Errors tabs |

Skill detail views render `SKILL.md` as untrusted Markdown: raw HTML and HTML-like math show as text, and skill links gain no resource resolver or filesystem access.

**Beyond and across the reference implementations**

| Capability | Detail |
| --- | --- |
| Invocation trace | Each call records `{ skill, injected_md_hash, accessed_refs, ts }`, shown on the detail page |
| Hot reload | Source changes re-parse and broadcast, no `/reload` |
| Manifest unification | Every form above, no migration |
| Marketplace interop | Claude Code marketplace schema adapter; official and third-party marketplaces |
| Explicit triggers | A keyword, file or command hit surfaces an activation prompt |
| Provider contribution | From opencode |
| claude-code coverage | Bundled skills, frontmatter, skill tool, marketplace management, plugin management, reload, five entrypoints |
| opencode coverage | Remote discovery, npm plugins, Provider plugin, compatibility and deprecated fields, concurrency and retry with httpx and tenacity |
| hermes coverage | Category, optional, resource layout, `plugin.yaml`. A Python `plugin_api.py` or `dashboard/dist/` is an application |

References: `references/opencode/packages/opencode/src/{skill,plugin}`, `references/hermes-agent/{skills,plugins,optional-skills}`.
