Now let me add a section showing OS-specific command selection.


Edit

**5. Multi-User MSP Team (Future):**
- Track which technician on which machine
- Machine capabilities per team member
- Resource allocation (who has VPN access to which clients)

---

**5. Multi-User MSP Team (Future):**
- Track which technician on which machine
- Machine capabilities per team member
- Resource allocation (who has VPN access to which clients)

---

## OS-Specific Command Selection

**Core Principle:** Never suggest Windows commands on Mac, Mac commands on Windows, or Linux-only commands on either.

### Command Selection Logic

**Machine Detection Agent provides platform context:**
```json
{
  "platform": "win32",          // or "darwin", "linux"
  "preferred_shell": "powershell",  // or "zsh", "bash", "cmd"
  "package_manager_commands": {...}
}
```

**Main Claude selects appropriate commands based on platform:**

#### File Operations

| Task | Windows (win32) | macOS (darwin) | Linux |
|------|-----------------|----------------|-------|
| List files | `dir` or `Get-ChildItem` | `ls -la` | `ls -la` |
| Find file | `Get-ChildItem -Recurse -Filter` | `find . -name` | `find . -name` |
| Copy file | `Copy-Item` | `cp` | `cp` |
| Move file | `Move-Item` | `mv` | `mv` |
| Delete file | `Remove-Item` | `rm` | `rm` |

#### Process Management

| Task | Windows | macOS | Linux |
|------|---------|-------|-------|
| List processes | `Get-Process` | `ps aux` | `ps aux` |
| Kill process | `Stop-Process -Name` | `killall` | `pkill` |
| Process tree | `Get-Process | Select-Object` | `pstree` | `pstree` |

#### Network Operations

| Task | Windows | macOS | Linux |
|------|---------|-------|-------|
| IP config | `ipconfig` | `ifconfig` | `ip addr` |
| DNS lookup | `nslookup` | `dig` | `dig` |
| Ping | `ping -n 4` | `ping -c 4` | `ping -c 4` |
| Port check | `Test-NetConnection -Port` | `nc -zv` | `nc -zv` |

#### Package Management

| Task | Windows (Chocolatey) | macOS (Homebrew) | Linux (apt/yum) |
|------|---------------------|------------------|-----------------|
| Install | `choco install {pkg}` | `brew install {pkg}` | `apt install {pkg}` |
| Update | `choco upgrade {pkg}` | `brew upgrade {pkg}` | `apt upgrade {pkg}` |
| Search | `choco search {pkg}` | `brew search {pkg}` | `apt search {pkg}` |
| List | `choco list --local` | `brew list` | `apt list --installed` |

### MCP & Skill Availability Check

**Before calling MCP or Skill:**

```javascript
// Machine Detection Agent returns available_mcps and available_skills

current_machine = {
  "available_mcps": ["claude-in-chrome", "filesystem"],
  "available_skills": ["pdf", "commit", "review-pr"]
}

// User requests: "Take a screenshot of this webpage"

// Check if claude-in-chrome MCP is available:
if (current_machine.available_mcps.includes("claude-in-chrome")) {
  // Use mcp__claude-in-chrome__computer screenshot action
} else {
  // Inform user: "claude-in-chrome MCP not available on this machine"
  // Suggest: "Switch to Main Laptop (has claude-in-chrome MCP)"
}

// User requests: "/pdf" to export document

// Check if pdf skill is available:
if (current_machine.available_skills.includes("pdf")) {
  // Execute pdf skill
} else {
  // Inform user: "pdf skill not available on Travel-Laptop"
  // Suggest: "Install pdf skill or switch to Main Laptop"
}
```

### Real-World Example: Cross-Platform File Search

**User on Windows (ACG-M-L5090):**
```
User: "Find all Python files in the project"

Machine Detection Agent: platform = "win32", preferred_shell = "powershell"

Main Claude uses Windows-appropriate command:
"Get-ChildItem -Path . -Recurse -Filter *.py | Select-Object FullName"

OR (if using bash-style preference):
"dir /s /b *.py"
```

**Same user on MacBook:**
```
User: "Find all Python files in the project"

Machine Detection Agent: platform = "darwin", preferred_shell = "zsh"

Main Claude uses macOS-appropriate command:
"find . -name '*.py' -type f"
```

### Shell-Specific Syntax

**PowerShell (Windows):**
```powershell
# Variables
$var = "value"

# Conditionals
if ($condition) { }

# Loops
foreach ($item in $collection) { }

# Output
Write-Host "message"
```

**Bash/Zsh (macOS/Linux):**
```bash
# Variables
var="value"

# Conditionals
if [ "$condition" ]; then fi

# Loops
for item in $collection; do done

# Output
echo "message"
```

**Batch/CMD (Windows legacy):**
```batch
REM Variables
SET var=value

REM Conditionals
IF "%var%"=="value" ( )

REM Loops
FOR %%i IN (*) DO ( )

REM Output
ECHO message
```

### Environment-Specific Path Separators

**Machine Detection Agent provides path conventions:**

| Platform | Path Separator | Home Directory | Example Path |
|----------|----------------|----------------|--------------|
| Windows | `\` (backslash) | `C:\Users\{user}` | `C:\Users\MikeSwanson\Documents` |
| macOS | `/` (forward slash) | `/Users/{user}` | `/Users/mike/Documents` |
| Linux | `/` (forward slash) | `/home/{user}` | `/home/mike/documents` |

**Main Claude constructs paths appropriately:**
```javascript
if (platform === "win32") {
  path = `${home_directory}\\claude-projects\\${project}`
} else {
  path = `${home_directory}/claude-projects/${project}`
}
```

### Benefits

**1. No Cross-Platform Errors:**
- Windows commands never suggested on Mac
- Mac commands never suggested on Windows
- Shell syntax matches current environment

**2. MCP/Skill Availability:**
- Never attempt to call unavailable MCPs
- Suggest alternative machines if MCP needed
- Track which skills are installed where

**3. Package Manager Intelligence:**
- Use `choco` on Windows, `brew` on Mac, `apt` on Linux
- Correct syntax for each package manager
- Installation suggestions platform-appropriate

**4. User Experience:**
- Commands always work on current platform
- No manual translation needed
- Helpful suggestions when capabilities missing

---