Skip to Content
DocsPlugins

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.

NameDefaultDescription
RIG_USAGE_LOG_PATH~/.rig/usage.jsonlJSONL file path to append usage events to.
RIG_USAGE_SOURCEopencodeSource value written into each event.
RIG_USAGE_DISABLEDunsetSet 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 opencode

Claude Code

Add the Rig marketplace and install the Claude Code plugin:

/plugin marketplace add builder-mafia/rig /plugin install rig-claude-code@rig /reload-plugins

For local testing from a checkout, add the repository path instead:

/plugin marketplace add ./path/to/rig /plugin install rig-claude-code@rig

Recorded 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.

Last updated on