Cross Machine Coordination logo

Cross Machine Coordination

CommunityPopular
bradygaster
cross-machine-coordination

Enables squad agents on different machines to share work via git-based task queuing

Overview

Publisherbradygaster
Repositorysquad
Skill namecross-machine-coordination
Stars
3.3K
Forks
506
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by bradygaster on GitHub. Read the source before you install it.

Installation

Install the Cross Machine Coordination AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bradygaster/squad/tree/dev/packages/squad-cli/templates/skills/cross-machine-coordination
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bradygaster/squad.git /tmp/squad
mkdir -p .claude/skills
cp -r /tmp/squad/packages/squad-cli/templates/skills/cross-machine-coordination .claude/skills/cross-machine-coordination
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cross Machine Coordination in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cross Machine Coordination on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cross Machine Coordination is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Skill: Cross-Machine Coordination Pattern

Skill ID: cross-machine-coordination Owner: Ralph (Work Monitor) Squad Integration: All agents Status: Specification (ready for implementation)


Overview

Enables squad agents running on different machines (laptop, DevBox, Azure VM) to securely share work, coordinate execution, and pass results without manual intervention.

Pattern: Git-based task queuing + GitHub Issues supplement


Usage

For Task Sources (Orchestrating Machine)

To assign work to DevBox:

bash
# Create task file
cat > .squad/cross-machine/tasks/2026-03-14T1530Z-laptop-gpu-voice-clone.yaml << 'EOF'
id: gpu-voice-clone-001
source_machine: laptop-machine
target_machine: devbox
priority: high
created_at: 2026-03-14T15:30:00Z
task_type: gpu_workload
payload:
  command: "python scripts/voice-clone.py --input voice.wav --output cloned.wav"
  expected_duration_min: 15
  resources:
    gpu: true
    memory_gb: 8
status: pending
EOF

# Commit & push
git add .squad/cross-machine/tasks/
git commit -m "Cross-machine task: GPU voice cloning [squad:machine-devbox]"
git push origin main

Ralph on DevBox will:

  1. Pull the task on next cycle (5-10 min)
  2. Validate schema & command whitelist
  3. Execute the GPU workload
  4. Write result to .squad/cross-machine/results/gpu-voice-clone-001.yaml
  5. Commit & push the result

For Task Executors (DevBox, Azure VMs)

Ralph automatically watches .squad/cross-machine/tasks/ for work targeted at this machine.

On each cycle (5-10 min):

python
# Pseudo-code (Ralph implementation)
1. git pull origin main
2. Load all .yaml files in .squad/cross-machine/tasks/
3. Filter for status=pending AND target_machine=HOSTNAME
4. For each task:
   a. Validate schema (must have: id, source_machine, target_machine, payload)
   b. Validate command against whitelist
   c. Execute task (with timeout)
   d. Write result to .squad/cross-machine/results/{id}.yaml
   e. Commit & push result

For Urgent/Ad-Hoc Tasks

Use GitHub Issues with squad:machine-{name} label:

bash
# Create issue
gh issue create \
  --title "GPU: Clone voice profile from sample.wav" \
  --body "Execute voice cloning on DevBox. Input: /path/to/voice-input.wav" \
  --label "squad:machine-devbox" \
  --label "urgent"

Ralph on DevBox will:

  1. Detect issue with squad:machine-devbox label
  2. Parse task from issue body
  3. Execute task
  4. Comment with result
  5. Close issue

File Formats

Task File (YAML)

Location: .squad/cross-machine/tasks/{timestamp}-{machine}-{task-id}.yaml

Required Fields:

yaml
id: {task-id}                      # Unique identifier (alphanumeric + dash)
source_machine: {hostname}         # Where task was created
target_machine: {hostname}         # Where task will execute
priority: high|normal|low          # Execution priority
created_at: 2026-03-14T15:30:00Z   # ISO 8601 timestamp
task_type: gpu_workload|script|... # Category
payload:
  command: "..."                   # Shell command to execute
  expected_duration_min: 15        # Timeout (minutes)
  resources:
    gpu: true|false
    memory_gb: 8
    cpu_cores: 4
status: pending|executing|completed|failed

Optional Fields:

yaml
description: "Human-readable task description"
timeout_override_min: 120          # Override default timeout
retry_count: 3                     # Retry failed tasks

Result File (YAML)

Location: .squad/cross-machine/results/{task-id}.yaml

yaml
id: {task-id}                          # Links back to task
target_machine: devbox                 # Executed on
completed_at: 2026-03-14T15:45:00Z    # When it finished
status: completed|failed|timeout       # Outcome
exit_code: 0                           # Shell exit code
stdout: "..."                          # Captured output
stderr: "..."                          # Captured errors
duration_seconds: 900                  # How long it took
artifacts:
  - path: "/path/to/artifacts/..."   # Location of results
    type: audio|text|model|...
    size_mb: 2.5

Security Model

Validation Pipeline

All tasks go through:

  1. Schema Validation

    • YAML structure matches spec
    • Required fields present
    • No unexpected fields (reject)
  2. Command Whitelist

    • Only approved commands allowed
    • Path validation (no ../../ escapes)
    • Environment variable sanitization
    • No inline shell operators (&&, |, >)
  3. Resource Limits

    • Timeout enforced (default: 60 min)
    • Memory cap: 16GB (adjustable)
    • CPU threads: 4 (adjustable)
    • Disk write: 100GB (adjustable)
  4. Execution Isolation

    • Runs as unprivileged user
    • Temp directory cleaned after execution
    • Network access: read-only (no outbound writes)
  5. Audit Trail

    • All executions logged to git
    • Commit signed with Ralph's key
    • Result stored immutably

Threat Mitigations

ThreatMitigation
Malicious task injectionBranch protection + PR review before merge
Credential leakagePre-commit secret scan + environment scrubbing
Resource exhaustionTimeout + memory limits
Code injectionCommand whitelist + no shell evaluation
Result tamperingGit commit history is immutable

Configuration

Ralph reads config from .squad/config.json:

json
{
  "cross_machine": {
    "enabled": true,
    "poll_interval_seconds": 300,
    "this_machine": "devbox",
    "max_concurrent_tasks": 2,
    "task_timeout_minutes": 60,
    "command_whitelist": [
      "python scripts/voice-clone.py",
      "python scripts/data-process.py",
      "bash scripts/cleanup.sh"
    ],
    "result_ttl_days": 30
  }
}

Examples

Example 1: GPU Voice Cloning (Laptop → DevBox)

1. Laptop creates task:

yaml
# .squad/cross-machine/tasks/2026-03-14T1530Z-laptop-gpu-001.yaml
id: gpu-voice-clone-001
source_machine: laptop-machine
target_machine: devbox
priority: high
created_at: 2026-03-14T15:30:00Z
task_type: gpu_workload
payload:
  command: "python scripts/voice-clone.py --input voice.wav --output cloned.wav"
  expected_duration_min: 15
  resources:
    gpu: true
    memory_gb: 8
status: pending

2. Laptop commits & pushes:

bash
git add .squad/cross-machine/tasks/
git commit -m "Task: GPU voice cloning [squad:machine-devbox]"
git push origin main

3. DevBox Ralph (5 min later):

[Ralph Watch Cycle]
- Pulled origin/main
- Detected: gpu-voice-clone-001 (status: pending, target: devbox)
- Validation: ✅ Schema OK, command whitelisted
- Executing: python scripts/voice-clone.py ...
- [15 minutes of processing]
- Completed: exit code 0
- Writing result...
- Committing & pushing...

4. Laptop Ralph (next cycle) sees result:

yaml
# .squad/cross-machine/results/gpu-voice-clone-001.yaml
id: gpu-voice-clone-001
target_machine: devbox
completed_at: 2026-03-14T15:45:00Z
status: completed
exit_code: 0
stdout: "Voice cloning completed. Output written to /tmp/cloned.wav"
stderr: ""
duration_seconds: 900
artifacts:
  - path: "/path/to/artifacts/voice-clone-001/output.wav"
    type: audio
    size_mb: 2.5

Example 2: Urgent Debug Request (Human → DevBox via Issue)

Create issue:

bash
gh issue create \
  --title "DevBox: Debug voice model failure" \
  --body "Error: Model failed to load on last run. Please check /tmp/model.log and report findings." \
  --label "squad:machine-devbox" \
  --label "urgent"

DevBox Ralph detects → executes → comments:

✅ Executed on devbox at 2026-03-14 15:47:00
Command: python scripts/debug-model.py

Result:
------
Model file: /tmp/model-v2.bin (OK)
Checksum: a1b2c3d4e5f6 (matches expected)
Memory available: 12 GB (sufficient)

ERROR FOUND: Config file permission issue
  - File: ~/.config/voice/model.yaml
  - Permissions: -rw------- (owner-only)
  - Expected: -rw-r--r-- (world-readable for service)

FIX: Run: chmod 644 ~/.config/voice/model.yaml

Error Handling

Task Execution Failures

If a task fails (exit code != 0):

  1. Result written with status: failed + exit code
  2. stderr captured in result
  3. Committed to git for audit
  4. Source machine can retry by re-pushing task with status: pending

Stalled Tasks

If a task doesn't complete within timeout:

  1. Process killed
  2. Result written with status: timeout
  3. stderr: "Execution exceeded X minutes"
  4. Source can investigate or retry

Network Failures

If git push/pull fails:

  • Ralph retries on next cycle
  • Tasks queue locally until connectivity restored
  • No tasks lost (stored in local repo)

Monitoring & Debugging

Check Task Queue

bash
ls -la .squad/cross-machine/tasks/
cat .squad/cross-machine/tasks/*.yaml | grep -E "^(id|status|target_machine):"

Check Results

bash
ls -la .squad/cross-machine/results/
cat .squad/cross-machine/results/{task-id}.yaml

View Execution History

bash
git log --oneline .squad/cross-machine/ | head -20

Monitor Ralph Cycles

bash
tail -f .squad/log/ralph-watch.log | grep "cross-machine"

Integration with Ralph Watch

Ralph automatically includes this pattern in its watch loop:

Ralph Watch Cycle (every 5-10 min):
1. Fetch GitHub issues with squad:machine-* labels
2. Poll .squad/cross-machine/tasks/
3. For each matching task:
   - Validate
   - Execute
   - Write result
   - Commit & push
4. Update status in issue (if applicable)
5. Sleep until next cycle

No manual Ralph configuration needed — just create task files or issues with the right labels.


Migration from Manual Handoff

Before (today):

  • Laptop → user manually copies file to Teams chat
  • user pastes into target terminal
  • user copies output back
  • user pastes result manually

After (with this pattern):

  • Laptop Ralph writes task file → git push
  • DevBox Ralph auto-executes → git push result
  • Laptop Ralph auto-reads result
  • 0 human intervention needed

Future Enhancements

Potential expansions (Phase 2+):

  1. Task Priorities: Execution order based on priority field
  2. Serial Pipelines: Machine A → B → C task chains
  3. GPU Availability Polling: Query DevBox before submitting work
  4. Cost Tracking: Log resource usage per task
  5. Notification Webhooks: Alert on task completion
  6. Web Dashboard: Real-time task status visualization

Questions?

Refer to research report: research/active/cross-machine-agents/README.md

Contact: the research and documentation owner or Ralph (Work Monitor)

Frequently asked questions

What does the Cross Machine Coordination AI skill do?

Enables squad agents on different machines to share work via git-based task queuing

Why use Cross Machine Coordination on TypingMind?

Because you install it once and use it with any model. Cross Machine Coordination is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cross Machine Coordination in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bradygaster/squad/tree/dev/packages/squad-cli/templates/skills/cross-machine-coordination. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cross Machine Coordination?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cross Machine Coordination?

As many as you like. As long as a model supports skills, you can use Cross Machine Coordination with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cross Machine Coordination AI skill free?

Yes. It is published on GitHub by bradygaster under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇