dot_files/dot_claude/commands/remote.md
Viktor Barzin fde360dbdc Add Claude commands, remote-exec script, and skills
- commands/remote.md for remote execution
- remote-exec.sh script
- skills: claudeception, kubernetes-latest-tag-image-pull, react-hooks-order-early-return
2026-02-03 19:17:05 +00:00

55 lines
1.2 KiB
Markdown

---
name: remote
description: Execute commands on the remote dev VM (10.0.10.10)
---
# Remote Command Execution Skill
Execute commands on the remote host via the remote-exec daemon.
## Prerequisites
The daemon must be running in a terminal (outside sandbox):
```bash
~/.claude/remote-exec.sh daemon
```
## Instructions
When the user invokes `/remote <command>`:
1. Generate a unique filename: `cmd-$(date +%s%N).txt`
2. Write the command to `~/.claude/remote-commands/<filename>`
3. Wait for result in `~/.claude/remote-results/<filename>`
4. Display the result (ends with `---` and `EXIT_CODE: <n>`)
## Usage Examples
```bash
/remote pytest tests/ -v
/remote python main.py dump-listings
/remote "cd frontend && npm run build"
```
## Parallel Execution
For parallel commands, first line should be `--parallel`:
```
--parallel
pytest tests/unit/
pytest tests/integration/
```
## Configuration
Default host/workdir is built into the script. To change:
```bash
~/.claude/remote-exec.sh config <host> <workdir>
```
## Execution Steps
1. Write command to `~/.claude/remote-commands/cmd-<timestamp>.txt`
2. Poll `~/.claude/remote-results/` every 0.5s (timeout: 120s)
3. Once EXIT_CODE appears, display output
4. Report success/failure based on exit code