synapse-plugin-helper:dry-run Command Workflow
Codex Adaptation
- Treat the user request or explicitly supplied text as the command arguments.
- Use the available Codex file, search, terminal, and clarification capabilities that match the workflow.
- Do not depend on Claude-only slash command variables or tool names.
Dry Run Synapse Plugin
Validate and verify a Synapse plugin before publishing. Performs all pre-deployment checks without actually deploying.
Workflow
Step 0: Prerequisites Check
# Check synapse CLI is available
synapse --version 2>/dev/null || echo "ERROR: synapse-sdk not installed"
If not installed:
synapse-sdk가 설치되어 있지 않습니다.
설치: uv pip install synapse-sdk (또는 pip install synapse-sdk)
Step 1: Run Dry-Run Publish
The SDK provides a built-in dry-run via publish:
synapse plugin publish --dry-run
Optional overrides:
synapse plugin publish --dry-run --path ./my-plugin
synapse plugin publish --dry-run --config ./synapse.yaml
Notes:
- Uses
config.yamlorsynapse.yaml - Auto-syncs entrypoints, input_type/output_type, and hyperparameters from code
Step 2: Config Validation (Optional)
Read and validate config.yaml or synapse.yaml:
# Parse YAML
CONFIG_FILE=config.yaml
if [ -f synapse.yaml ]; then CONFIG_FILE=synapse.yaml; fi
python -c "import yaml; yaml.safe_load(open('$CONFIG_FILE'))"
Required fields:
-
name- Plugin display name -
code- Unique identifier (kebab-case) -
version- Semantic version -
actions- At least one action defined
Optional but recommended:
-
category- Plugin category -
description- What the plugin does -
data_type- Primary data type -
tasks- Supported annotation tasks
Step 3: Action Validation
For each action in the config file:
# Validate entrypoint exists and is importable
from [module.path] import [ClassName]
Check for each action:
- Entrypoint file exists
- Class/function is importable
- No syntax errors
- Method is valid (
job,task, orserve)
Step 4: Dependency Validation
# Check requirements.txt exists
cat requirements.txt
# Verify all packages can be resolved (pip)
pip install --dry-run -r requirements.txt
# If package_manager is uv, use uv
uv sync
Verify:
- requirements.txt exists
- All packages are resolvable
- No version conflicts
- synapse-sdk is included
Step 5: Schema Validation
For class-based actions with Pydantic params:
# Validate parameter schemas
from [module] import [ParamsClass]
print(ParamsClass.model_json_schema())
Check:
- Pydantic model is valid
- All fields have types
- Required fields are marked
Step 6: Package Structure
# Verify package structure
ls -la
ls -la plugin/ # or main module directory
Verify:
-
__init__.pyfiles present - All imported modules exist
- No circular imports
Step 7: Generate Report
Display validation summary:
╔══════════════════════════════════════════════════╗
║ DRY RUN VALIDATION REPORT ║
╠══════════════════════════════════════════════════╣
║ Plugin: [name] v[version] ║
║ Category: [category] ║
╠══════════════════════════════════════════════════╣
║ Config Validation ✓ Passed ║
║ Action Validation ✓ Passed (3 actions) ║
║ Dependency Validation ✓ Passed ║
║ Schema Validation ✓ Passed ║
║ Package Structure ✓ Passed ║
╠══════════════════════════════════════════════════╣
║ RESULT: Ready for publishing ║
╚══════════════════════════════════════════════════╝
Step 8: Recommendations
If all checks pass:
- Plugin is ready for
/synapse-plugin:publish
If any checks fail:
- List specific issues
- Suggest fixes
- Recommend running
/synapse-plugin:debugfor details
Validation Checklist
Use plugin-validator agent for comprehensive validation:
- Config schema compliance
- Entrypoint existence and importability
- Dependency resolution
- Best practices adherence
Error Examples
Missing required field:
✗ Config Validation Failed
- Missing required field: 'version'
- Fix: Add 'version: 1.0.0' to config.yaml
Invalid entrypoint:
✗ Action Validation Failed
- Action 'train': Cannot import 'plugin.train:TrainAction'
- Fix: Check file path and class name