Skip to main content

Plugins and marketplaces

Plugins package reusable skills, subagents, MCP server configurations, custom slash commands, and lifecycle hooks into a distributable unit. You can commit project-specific plugins directly to your repository or distribute them across teams through a Git-hosted plugin marketplace.

Plugin types​

OpsCode supports three plugin patterns depending on how the capabilities bind to the agent runtime:

TypeContentsHow it binds
Agent pluginsDedicated subagent (agents/), scoped skills, and optional .mcp.jsonSkills and MCP tools bind exclusively to the subagent—never cluttering the root agent
Vertical pluginsSkills (skills/), custom slash commands (commands/), and hooks (hooks/)Skills, slash commands, and hooks bind directly to the main agent
Partner-built pluginsDomain skills, .mcp.json server definitions, and CONNECTORS.md setup docsConnects external SaaS APIs (such as cost estimation or security scanners) to the main agent

OpsCode detects the plugin type automatically: if a plugin contains an agents/ directory, it loads as an agent plugin; otherwise, its skills, commands, and MCP servers bind to the main agent.

Only install plugins and marketplaces from sources you trust. Enabled plugins can inject system instructions, spawn MCP server processes, and register lifecycle hooks under your user account.

Manage plugins interactively​

Use /plugins inside an interactive session to browse marketplaces and manage installed plugins:

  1. Run /plugins to open the interactive plugin modal.
  2. Switch to the Marketplaces tab to add a catalog source:
    • A GitHub repository in owner/repo format (optionally with @branch-or-tag)
    • An HTTPS Git URL (optionally with #branch-or-tag)
    • An HTTPS URL serving a marketplace.json manifest
    • A local filesystem directory or JSON file
  3. Select a plugin from the catalog to install it.
  4. Run /reload to activate newly installed skills, subagents, and MCP servers without restarting your session.

Manage plugins from the CLI​

Use ops plugin for terminal administration and automated setup scripts. Plugin identifiers use the plugin-name@marketplace-name format:

# Add and inspect a marketplace
ops plugin marketplace add acme/devops-plugins
ops plugin marketplace list

# Browse and install plugins
ops plugin list
ops plugin install terraform-linter@devops-terraform-toolkit

# Enable or disable an installed plugin
ops plugin disable terraform-linter@devops-terraform-toolkit
ops plugin enable terraform-linter@devops-terraform-toolkit

# Uninstall a plugin or remove a marketplace
ops plugin uninstall terraform-linter@devops-terraform-toolkit
ops plugin marketplace remove devops-terraform-toolkit

Pass --json to ops plugin list or ops plugin marketplace list for machine-readable output.

Plugin architecture​

Directory layout​

A plugin directory can include any combination of the following components:

my-plugin/
├── .claude-plugin/
│ └── plugin.json # Required — plugin metadata and version
├── agents/ # Optional — subagent definitions (makes it an agent plugin)
│ └── terraform-linter.md
├── skills/ # Optional — domain skills
│ └── tf-validate/
│ └── SKILL.md
├── commands/ # Optional — custom slash commands
│ └── review-module.md
├── hooks/ # Optional — lifecycle event hooks
│ └── hooks.json
├── .mcp.json # Optional — embedded MCP server configuration
├── CONNECTORS.md # Optional — external service setup guide
└── resources/ # Optional — templates, scripts, and static assets

plugin.json manifest​

Every plugin requires a .claude-plugin/plugin.json manifest:

.claude-plugin/plugin.json
{
"name": "terraform-linter",
"version": "0.1.0",
"description": "Lints and validates Terraform modules for formatting, syntax, and best practices.",
"author": {
"name": "Platform Engineering"
}
}

Example: Agent plugin (agents/)​

An agent plugin isolates specialized tools and skills inside a dedicated subagent:

agents/terraform-linter.md
---
name: terraform-linter
description: Lints and validates Terraform modules for formatting, syntax errors, and best-practice compliance.
tools: read_file, execute, glob, grep
skills:
- tf-fmt-check
- tf-validate
permission_tier: read-write
---

You are the **Terraform Linter**, an infrastructure engineer specializing in Terraform code quality.

## Workflow
1. Discover `.tf` files with `glob`.
2. Check formatting with the `tf-fmt-check` skill.
3. Validate syntax with the `tf-validate` skill.
4. Combine findings into a structured report citing exact file paths and line numbers.

Example: Custom slash commands (commands/)​

Vertical plugins can register custom slash commands by placing markdown files in commands/:

commands/review-module.md
---
name: review-module
description: Run a comprehensive code review on a Terraform module directory.
---

## Usage

/review-module <module-path>

## Instructions

Run a full code review on the specified Terraform module:
1. Verify standard file layout (`main.tf`, `variables.tf`, `outputs.tf`, `versions.tf`).
2. Check `snake_case` naming conventions across resources and variables.
3. Confirm every variable and output includes a `description` and `type`.
4. Detect hardcoded account IDs, missing provider version constraints, or untagged resources.

Once enabled, run /review-module modules/vpc directly in the TUI.

Example: Embedded MCP servers (.mcp.json)​

Partner and agent plugins can bundle .mcp.json configurations with runtime variable substitution (${PLUGIN_ROOT}, ${PROJECT_DIR}, and environment variables):

.mcp.json
{
"mcpServers": {
"infracost": {
"command": "${PLUGIN_ROOT}/bin/infracost-mcp",
"args": ["--project-dir", "${PROJECT_DIR}"],
"env": {
"INFRACOST_API_KEY": "${INFRACOST_API_KEY}"
}
}
}
}

Where plugins live​

Project plugins and local marketplaces​

Place team-shared plugins in .opscode/plugins/ inside your repository. You can also register a self-contained project catalog at .opscode/.opscode-plugin/marketplace.json:

.opscode/.opscode-plugin/marketplace.json
{
"name": "devops-terraform-toolkit",
"owner": {
"name": "Platform Engineering"
},
"plugins": [
{
"name": "terraform-linter",
"displayName": "Terraform Linter",
"source": "./plugins/agent-plugins/terraform-linter",
"description": "Agent plugin that lints Terraform modules with a dedicated subagent."
},
{
"name": "module-reviewer",
"displayName": "Module Reviewer",
"source": "./plugins/vertical-plugins/module-reviewer",
"description": "Vertical plugin for Terraform module code review and security scanning."
}
]
}

Enablement scopes​

Plugin activation state is tracked across three settings files:

FileScopeGit-tracked
~/.opscode/settings.jsonUser-wide across all projectsNo
.opscode/settings.jsonProject-wide (shared with team)Yes
.opscode/settings.local.jsonPersonal project overrideNo (gitignored)
.opscode/settings.json
{
"enabledPlugins": {
"terraform-linter@devops-terraform-toolkit": true,
"module-reviewer@devops-terraform-toolkit": true
}
}