Plugins
Plugins are the building blocks of every Specialist node. Each plugin is a self-contained package that defines an AI agent's identity, domain expertise, and capabilities. Modular9 ships with 120+ plugins organized into named packs, and the plugin system is designed to be extended.
Plugin System Overview
Plugins live in src/plugins/. The Plugin Registry discovers, validates, and loads them at server startup. Every plugin must pass a Zod schema validation before it's made available in the UI.
src/plugins/
code-review/
.claude-plugin/
plugin.json ← Anthropic-standard manifest
modular9.json ← Modular9 extensions (id, icon, color)
.mcp.json ← MCP connector config (optional)
skills/
analysis/
SKILL.md ← Skill definition with YAML frontmatter
review/
SKILL.md
commands/
full-review.md ← Command definition
Hot reload in development
The plugin registry is called fresh on each server-side request in development mode (Next.js revalidates at runtime). Changes to plugin files are reflected immediately without restarting the dev server.
Plugin Formats
The registry supports two formats:
New Format (Anthropic-aligned)
The current standard. Three separate files:
.claude-plugin/plugin.json — Anthropic standard manifest:
{
"name": "Code Review",
"version": "1.0.0",
"description": "Expert code reviewer with security and performance focus",
"author": "Modular9"
}
modular9.json — Modular9-specific extensions:
{
"id": "code-review",
"icon": "code",
"color": "#22c55e",
"category": "dev",
"systemPrompt": "You are a senior software engineer specializing in code review...",
"connectors": []
}
.mcp.json (optional) — MCP server configuration for plugins with external tool access:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
}
}
}
Legacy Format
The original flat format. A single plugin.json at the plugin root. Still supported by the registry via dual-format detection.
Plugin Manifest Schema
The merged manifest (all three files combined) is validated against PluginManifestSchema:
// From src/types/plugin.ts
interface PluginManifest {
id: string // Unique kebab-case slug
name: string // Display name
description: string // Short description
version: string // Semver
author: string // Author name
icon: string // Lucide icon name
color: string // Hex color for pack badge
category: PluginCategory // Pack assignment category
systemPrompt?: string // Domain-expert LLM system prompt
skills: SkillDefinition[] // Loaded from skills/*/SKILL.md
commands: CommandDefinition[] // Loaded from commands/*.md
mcp?: McpConfig // Optional MCP server config
logic?: LogicSpec // Optional LOGIC.md reasoning spec
}
Skills
Skills are markdown files that inject domain-specific knowledge into the LLM call at execution time. Each skill lives in its own directory under skills/:
skills/
owasp-focus/
SKILL.md
Skill file format (SKILL.md):
---
name: OWASP Top 10 Deep Focus
description: Apply OWASP Top 10 security analysis framework
category: security
---
# OWASP Top 10 Deep Focus
When reviewing code, explicitly check for each OWASP Top 10 vulnerability:
1. **A01 - Broken Access Control**: Verify authorization checks on every route...
2. **A02 - Cryptographic Failures**: Check for plaintext secrets, weak hashing...
[...]
At execution time, the agent runner loads all skill files for the plugin and injects them between the system prompt and the user message. Skills are additive — they extend the base expertise without replacing it.
Commands
Commands are task-specific instruction files. They define discrete, named operations the plugin can perform:
---
name: Full Review
description: Comprehensive code review covering correctness, security, and performance
---
Perform a comprehensive review of the provided code. Cover:
- Correctness and logic errors
- Security vulnerabilities (OWASP Top 10)
- Performance bottlenecks
- Code readability and maintainability
- Test coverage gaps
Format your response as a structured report with severity ratings.
Plugin Packs
Plugins are grouped into Packs — named bundles with a display name, accent color, and icon. Packs are defined in src/lib/plugins/packs.ts and are the single source of truth for sidebar grouping.
| Pack | Plugins | Focus | |------|---------|-------| | DevPack | 18 | Engineering, code review, PR review, testing, security, debugging | | GrowthPack | 7 | Marketing, sales, customer support, SEO | | ContentPack | 10 | Blog writing, email copywriting, social content | | FinancePack | 7 | Financial analysis, investment banking, equity research | | SecurityPack | 6 | Security audit, dependency scanning, compliance | | DataPack | 6 | Data engineering, ML, analytics, vector DB | | OpsPack | 10 | Legal, HR, operations, data analysis | | BuildPack | 14 | Frontend, artifacts, themes, agent SDK | | SocialPack | 8 | Social media management and scheduling | | AgencyPack | 8 | Client services, creative direction | | MediaPack | 8 | Video, audio, and media production |
Plugin Registry
The registry is the server-side module that discovers and loads all plugins:
// src/lib/plugins/registry.ts
export async function loadPlugins(): Promise<PluginManifest[]>
Registry behavior:
- Reads all directories under
src/plugins/ - Detects new vs. legacy format automatically
- Parses and Zod-validates each manifest
- Loads skill and command files from disk
- Skips invalid plugins with a console error — one bad plugin never crashes the whole registry
- Returns validated manifests to API routes and server components
Plugin Registry API
The /api/plugins route exposes the loaded plugin list to client-side components:
// GET /api/plugins
// Returns: PluginManifest[]
This is marked export const dynamic = 'force-dynamic' to prevent stale static pre-rendering.
Creating Your Own Plugin
See the Creating Plugins guide for a full walkthrough.
Next Steps
- Connectors — how connector plugins bridge to external services
- Execution Engine — how plugins are invoked during workflow execution
- Creating Plugins — build your own specialist plugin