Plugins
Rig plugins write local skill usage events to ~/.rig/usage.jsonl. Rig then reads that file to power skill counts, trends, and dashboard summaries.
OpenCode
Add rig-opencode to your OpenCode config. The config file is usually located at ~/.config/opencode/opencode.json.
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["rig-opencode"]
}Restart OpenCode after saving the config. OpenCode installs npm plugins automatically at startup.
OpenCode Environment Variables
The OpenCode plugin works without environment variables. Use these only when you need to customize logging.
| Name | Default | Description |
|---|---|---|
RIG_USAGE_LOG_PATH | ~/.rig/usage.jsonl | JSONL file path to append usage events to. |
RIG_USAGE_SOURCE | opencode | Source value written into each event. |
RIG_USAGE_DISABLED | unset | Set to 1 or true to disable recording. |
Examples:
RIG_USAGE_LOG_PATH=./.rig/usage/rig-usage.jsonl opencode
RIG_USAGE_SOURCE=opencode-local opencode
RIG_USAGE_DISABLED=1 opencodeClaude Code
Add the Rig marketplace and install the Claude Code plugin:
/plugin marketplace add builder-mafia/rig
/plugin install rig-claude-code@rig
/reload-pluginsFor local testing from a checkout, add the repository path instead:
/plugin marketplace add ./path/to/rig
/plugin install rig-claude-code@rigRecorded Event Shape
Both plugins write one event per skill invocation:
{"source":"opencode","skillName":"typescript-fix-null-safety","usedAt":"2026-05-30T01:12:00.000Z"}source identifies the agent integration, skillName is matched against discovered skills, and usedAt must be an RFC 3339 timestamp.