Explains how to execute Synapse plugins programmatically. Use when the user mentions "run_plugin", "ExecutionMode", "LocalExecutor", "RayActorExecutor", "RayJobExecutor", "PluginDiscovery", "from_path", "from_module", or needs help with running plugins programmatically.
Executes Synapse plugins programmatically with local, task, or job execution modes.
/plugin marketplace add datamaker-kr/synapse-claude-marketplace/plugin install datamaker-kr-synapse-plugin-2@datamaker-kr/synapse-claude-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/discovery.mdreferences/executors.mdreferences/run-plugin.mdSynapse SDK provides multiple ways to execute plugin actions programmatically.
The simplest way to run a plugin action:
from synapse_sdk.plugins.runner import run_plugin, ExecutionMode
# Local execution (in-process, good for dev)
result = run_plugin(
plugin_code='/path/to/plugin',
action='train',
params={'epochs': 100},
mode=ExecutionMode.LOCAL,
)
# Ray Actor execution (fast startup)
result = run_plugin(
plugin_code='/path/to/plugin',
action='train',
params={'epochs': 100},
mode=ExecutionMode.TASK,
)
# Ray Job execution (heavy workloads)
job_id = run_plugin(
plugin_code='/path/to/plugin',
action='train',
params={'epochs': 100},
mode=ExecutionMode.JOB,
)
| Mode | Class | Use Case | Returns |
|---|---|---|---|
LOCAL | LocalExecutor | Development, testing | Result dict |
TASK | RayActorExecutor | Fast startup, medium work | Result dict |
JOB | RayJobExecutor | Heavy workloads, isolation | Job ID string |
Discover and inspect plugins before execution:
from synapse_sdk.plugins.discovery import PluginDiscovery
# From filesystem path
discovery = PluginDiscovery.from_path('/path/to/plugin')
# From Python module
import my_plugin
discovery = PluginDiscovery.from_module(my_plugin)
# List available actions
actions = discovery.list_actions() # ['train', 'inference']
# Get action class
action_cls = discovery.get_action_class('train')
# Get action metadata
config = discovery.get_action_config('train')
params_model = discovery.get_action_params_model('train')
For more control, use executors directly:
from synapse_sdk.plugins.executors.local import LocalExecutor
from synapse_sdk.plugins.discovery import PluginDiscovery
discovery = PluginDiscovery.from_path('/path/to/plugin')
action_cls = discovery.get_action_class('train')
executor = LocalExecutor()
result = executor.execute(action_cls, {'epochs': 100})
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Activates when the user asks about Agent Skills, wants to find reusable AI capabilities, needs to install skills, or mentions skills for Claude. Use for discovering, retrieving, and installing skills.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.