Trinity Remote Operations
Collaborate with remote Trinity agents - execute prompts, sync-and-run, and configure notifications.
Command Overview
| Command | Description |
|---|---|
/trinity-remote | Show status of remote agent |
/trinity-remote exec <prompt> | Execute prompt on remote (no sync) |
/trinity-remote run <prompt> | Sync local changes, then execute (deploy-run) |
/trinity-remote notify [config] | Configure notifications |
Arguments
$ARGUMENTS
Agent Name Detection
This skill automatically detects the agent name using these methods (in order):
- •
template.yaml (preferred):
bashgrep "^name:" template.yaml 2>/dev/null | cut -d: -f2 | tr -d ' '
- •
Directory name (fallback):
bashbasename "$(pwd)"
- •
Environment variable (override):
bashecho "$TRINITY_AGENT_NAME"
Status Check (default)
When called without arguments, show remote agent status.
Workflow
- •
Determine agent name (see detection methods above)
- •
Query remote status
codemcp__trinity__list_agents() mcp__trinity__get_agent(name: "<agent-name>")
- •
Display status
code## Remote Agent Status | Property | Value | |----------|-------| | Name | <agent-name> | | Status | running | | Uptime | 3h 24m | | Last activity | 2 minutes ago | | Git branch | main | | Git HEAD | 1cb2c9a |
Remote Execution (exec)
Execute a prompt on the remote agent without syncing local changes.
Use when: You want to run something on the always-on remote version without pushing local work.
Workflow
- •
Verify remote agent exists and is running
codemcp__trinity__list_agents()
If not running:
codemcp__trinity__start_agent(name: "<agent-name>")
- •
Extract prompt from arguments (everything after "exec ")
- •
Execute on remote
codemcp__trinity__chat_with_agent( agent_name: "<agent-name>", message: "<the prompt>" )
- •
Return results directly to user
Example
User: /trinity-remote exec check my calendar for tomorrow Agent: → Remote agent: my-agent → Status: running → Executing... [Response from remote agent appears here]
Deploy and Run (run)
Sync local changes to remote, then execute a task.
Use when: You've made local changes (skills, CLAUDE.md, etc.) and want to test them on the remote agent.
Workflow
- •
Check for uncommitted changes
bashgit status --porcelain
- •
If changes exist, commit and push
bash# Stage skill/policy/procedure changes git add .claude/skills/ .claude/agents/ .claude/rules/ CLAUDE.md memory/ # Commit with auto-message git commit -m "[deploy-run] Auto-sync before remote execution" # Push to origin git push origin $(git branch --show-current)
- •
Tell remote to pull
codemcp__trinity__chat_with_agent( agent_name: "<agent-name>", message: "Run: git fetch origin && git pull origin main --ff-only" )
Wait for confirmation.
- •
Execute the task Extract prompt (everything after "run "):
codemcp__trinity__chat_with_agent( agent_name: "<agent-name>", message: "<the prompt>" )
- •
Return results with sync summary
code## Deploy-Run Complete ### Sync - Committed: 3 files - Pushed to: origin/main - Remote pulled: ✓ ### Execution [Response from remote agent]
Example
User: /trinity-remote run generate the weekly analytics report Agent: → Local changes detected: 2 files → Committing and pushing... → Remote pulling... → Executing task on remote... ## Weekly Analytics Report [Full response from remote]
Notification Configuration (notify)
Configure how to receive notifications from remote executions.
Sub-commands
| Command | Action |
|---|---|
/trinity-remote notify | Show current notification config |
/trinity-remote notify status | Same as above |
/trinity-remote notify email <address> | Set email notification |
/trinity-remote notify webhook <url> | Set webhook notification |
/trinity-remote notify disable | Disable notifications |
Storage
Store notification config in memory/trinity_notifications.json:
{
"agent_name": "<agent-name>",
"notifications": {
"email": "user@example.com",
"webhook": null,
"enabled": true
},
"subscriptions": [
{
"trigger": "schedule_complete",
"notify": ["email"]
},
{
"trigger": "error",
"notify": ["email", "webhook"]
}
]
}
Workflow for notify status
- •Read
memory/trinity_notifications.json - •Display current configuration:
## Notification Status | Setting | Value | |---------|-------| | Email | user@example.com | | Webhook | (not configured) | | Enabled | ✓ | ### Active Subscriptions - Schedule completions → Email - Errors → Email
Workflow for notify email <address>
- •Validate email format
- •Update
memory/trinity_notifications.json - •Confirm:
✓ Email notifications set to: user@example.com You'll receive notifications for: - Scheduled task completions - Execution errors - Agent status changes
Workflow for notify webhook <url>
- •Validate URL format
- •Test webhook with a ping:
bash
curl -X POST "<url>" -H "Content-Type: application/json" \ -d '{"type": "test", "agent": "<agent-name>", "message": "Webhook configured"}' - •Update config if successful
- •Confirm:
✓ Webhook configured: https://your-endpoint.com/notify
✓ Test ping successful
Webhook payload format:
{
"type": "schedule_complete|error|status_change",
"agent": "agent-name",
"task": "task description",
"result": "success|failure",
"message": "details...",
"timestamp": "ISO-8601"
}
Quick Reference
| Goal | Command |
|---|---|
| Check remote status | /trinity-remote |
| Run task on remote | /trinity-remote exec <prompt> |
| Sync and run | /trinity-remote run <prompt> |
| Check notifications | /trinity-remote notify |
| Set email alerts | /trinity-remote notify email <addr> |
| Set webhook | /trinity-remote notify webhook <url> |
Error Handling
| Error | Resolution |
|---|---|
| Remote agent not found | Run /trinity-adopt first to deploy agent |
| Remote agent stopped | This skill will auto-start the agent |
| Git push failed | Check remote permissions, resolve conflicts |
| Webhook test failed | Verify URL is accessible and accepts POST |
Related Skills
- •trinity-adopt - Initial agent setup
- •trinity-sync - Manual git sync operations
- •trinity-schedules - Scheduled task management
- •trinity-compatibility - Compatibility audit