Skip to content

Plugin Anatomy

A Recursive plugin is a directory with a plugin.json manifest at the root. Everything else is optional — you include only the capabilities your plugin needs.

Here’s a fully-featured plugin that provides every capability type:

  • Directorymy-plugin/
    • plugin.json — manifest (required)
    • Directorytools/ — MCP tool handlers
      • create-widget.ts
      • list-widgets.ts
    • Directoryroutes/ — HTTP API endpoints
      • widgets.ts
    • Directoryadapters/ — agent CLI adapters
      • my-adapter.ts
    • Directoryskills/ — agent skill definitions
      • Directorybuilding-widgets/
        • SKILL.md
    • Directoryrules/ — agent behavior rules
      • widget-conventions.md
    • Directoryworkflows/ — pipeline definitions
      • widget-pipeline.md
    • Directoryautomations/ — scheduled tasks
      • daily-widget-check.md
    • Directoryhooks/ — lifecycle event handlers
      • on-session-complete.ts
    • Directoryui/ — frontend components
      • WidgetView.svelte
      • widget-store.ts

Each manifest key maps to a capability type. Here’s what each one does:

MCP tools that agents can call. Each file exports a schema and a handler.

Tools are the primary way agents interact with your plugin. They follow the Model Context Protocol and appear in the agent’s tool list.

{ "tools": "./tools/" }

Server-side HTTP endpoints mounted under /api/plugins/{pluginId}/. Useful for custom APIs that the dashboard UI or external services consume.

{ "routes": "./routes/" }

Agent execution adapters that wrap CLI tools (e.g., claude, cursor, codex). Each adapter defines how to spawn, communicate with, and manage an agent process.

{ "adapters": "./adapters/" }

Agent skill definitions — structured knowledge that agents load when performing specific tasks. Each skill is a directory with a SKILL.md file.

{ "skills": "./skills/" }

Behavioral rules injected into agent contexts. Rules are markdown files that get included in agent system prompts.

{ "rules": "./rules/" }

Pipeline definitions that orchestrate multi-step agent work. Workflows define steps, gates, and retry logic.

{ "workflows": "./workflows/" }

Scheduled or triggered automation definitions.

{ "automations": "./automations/" }

Lifecycle event handlers that run server-side when specific events occur (e.g., session complete, task status change).

{ "hooks": "./hooks/" }

Frontend components and configuration that extend the Recursive dashboard. Includes Svelte components, stores, navigation items, commands, and more.

{
"ui": {
"views": [...],
"nav": [...],
"commands": [...],
"panels": [...],
"store": "./ui/my-store.ts"
}
}

The manifest also contains metadata used in the dashboard and registry:

FieldTypeDescription
idstringUnique identifier. Must be kebab-case.
namestringDisplay name shown in the UI.
versionstringSemver version string.
descriptionstringOne-line description for the plugin list.
authorstring | objectAuthor name or { name, url } object.
colorstringHex color for the plugin icon badge.
iconstringIcon name from the Recursive icon set.
thumbnailstringPath to a thumbnail image.

Plugins can declare file patterns that trigger automatic enablement when a project matches:

{
"detect": {
"files": ["Package.swift", "*.xcodeproj"],
"strategy": "any"
}
}

When Recursive opens a project containing any of those files, the plugin is automatically enabled. The strategy can be "any" (default) or "all".

Plugins can declare configurable settings with defaults and a schema for the settings UI:

{
"settings": {
"defaults": {
"auto_greet": true,
"greeting_style": "formal"
},
"schema": [
{
"key": "auto_greet",
"type": "boolean",
"label": "Auto-greet on session start",
"section": "General"
},
{
"key": "greeting_style",
"type": "select",
"label": "Greeting style",
"options": ["formal", "casual", "pirate"],
"section": "General"
}
]
}
}