/triflux:tfx-remote <host|list|attach|send|probe|monitor|kill> ...from triflux
Manages remote Claude Code sessions over SSH: start, list, attach, send messages, monitor, and kill sessions via scripts/remote-spawn.mjs.
Ships in triflux. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
tfx-remote는 Claude Code 스킬이다. 현재 bin/triflux.mjs에는 tfx remote 하위 명령이 없다. 실행은 설치된 ~/.claude/scripts/remote-spawn.mjs 또는 이 저장소의 scripts/remote-spawn.mjs를 node로 호출한다. 다른 저장소에서 작업하면 설치된 스크립트를 쓴다.
| 요청 | 스크립트 옵션 |
|---|---|
| 호스트 세션 시작 | --host <host> --prompt "<요청>" |
| 로컬 세션 시작 | --local --prompt "<요청>" |
| 세션 목록 | --list |
| 세션 재부착 | --attach <session> |
| 후속 메시지 | --send <session> "<메시지>" |
| 호스트 준비 상태 | --probe <host> |
| 화면 캡처 | --capture <session> |
| 준비 완료 대기 | --wait <session> |
| 화면 상태 관찰 | --monitor <session> |
| 세션 종료 | --kill <session>. 그 세션이 띄운 원격 프로세스만 정리한다. 원격 claude 데몬 전체를 멈추려면 --stop-daemon 을 더한다(같은 호스트의 다른 작업도 멈춘다). |
예를 들어 원격 세션을 시작하기 전에는 node ~/.claude/scripts/remote-spawn.mjs --probe <host>로 준비 상태를 확인한다. 세션 시작 시 --dir, --name, --handoff, --transfer, --no-attach 옵션을 추가할 수 있다. 스크립트의 실제 옵션과 실패 처리는 scripts/remote-spawn.mjs의 parseArgs와 main을 따른다.
setup과 resume은 구현된 명령이 아니다. 호스트 설정은 macOS/Linux의 ~/.config/triflux/hosts.json, Windows의 %APPDATA%\triflux\hosts.json을 사용한다. hub/lib/hosts-compat.mjs가 호스트 이름과 alias를 해석한다. 호스트가 없거나 SSH가 실패하면 설정과 --probe 결과를 확인하고, 그래도 안 되면 로컬로 조용히 바꾸지 말고 실패를 알린다. ssh가 없는 기기에서는 시작하지 않는다. --monitor는 로컬 psmux가 필요하며 없으면 스크립트가 오류로 끝난다.
원격에서 Codex가 필요하면 원격 Claude Code 세션 안에서 Triflux 라우팅을 사용한다. SSH 너머로 Codex를 직접 실행하지 않는다.
기본 경로는 remote-spawn --host <host>다. 지원 버전의 psmux가 있으면 원격 세션을 감싸고,
--attach로 다시 붙으며 --kill로 소유를 확인한 뒤 분리·종료·파일 정리를 한다.
psmux가 없거나 지원 버전 미만이면 기존 직접 실행 경로를 쓰며, SSH가 끊기면 Claude도 종료된다.
remote-spawn을 쓸 수 없지만 psmux 3.4.0 이상이 있는 경우에는 아래 수동 절차를 쓴다.
psmux도 없으면 Windows Terminal/PowerShell에서 Claude를 직접 실행한다.
원격 스크립트는 scp로 올리고, 공백·따옴표가 든 경로는 pwsh -EncodedCommand 안에서 호출한다.
# start-worker.ps1 (ryzen 에서 실행). 세션 이름은 tfx- 접두사, 경로는 Windows 형식
psmux new-session -d -s tfx-1015-fulltest -c "$env:USERPROFILE\Desktop\Projects\triflux"
psmux send-keys -t tfx-1015-fulltest "claude -n '10.15 전체 테스트'" Enter
scp start-worker.ps1 ryzen:start-worker.ps1 && ssh ryzen pwsh -File start-worker.ps1
ssh ryzen psmux capture-pane -p -t tfx-1015-fulltest # 확인
# stop-worker.ps1. 연결을 먼저 끊고 2초 뒤 세션을 지운다(WT ConPTY 종료 경쟁 회피)
# detach-client 의 -t 는 클라이언트 이름이라 세션을 분리하지 못한다. 세션은 -s 로 지정한다
psmux detach-client -s tfx-1015-fulltest
if ($LASTEXITCODE -ne 0) { Write-Error "detach 실패. psmux list-clients 로 확인한 뒤 다시 실행"; exit 1 }
Start-Sleep -Seconds 2
psmux kill-session -t tfx-1015-fulltest
send-keys 로 보내는 명령은 PowerShell 문법이다. &&, export, $(...), Unix 경로를 쓰지 않는다. 셸 규약 전문은 triflux clone 의 .claude/rules/tfx-psmux.md(clone 전제)이고, clone 이 없으면 위 내용만 따른다.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
Generated from the plugin's indexed repository (tellang/triflux) — no native marketplace selected
npx claudepluginhub p/tellang-triflux12 skills in this plugin
/tfx-auto통합 CLI 오케스트레이터이자 실행 스킬 front door. 단일/병렬 구현·수정 작업을 자동 분류해 Codex 우선으로 dispatch 하고, 명시 플래그로 mode/parallel/consensus 등 동작을 오버라이드한다. '코드 짜줘', '구현해줘', '만들어줘', '수정해줘', '고쳐줘', 'implement', 'build', 'fix' 같은 구현/수정 요청에 사용. 플래그 상세는 argument-hint, 라우팅 정책은 .claude/rules/tfx-routing.md 참조.
/tfx-comm`tfx lead <역할> --role communication`으로 띄운 상주 소통 세션이 사람과의 대화, 결정 받기, 사람에게 보이는 보고와 문서를 맡을 때 사용한다. 코드 워커 지휘와 머지는 리드 몫이라 다루지 않는다.
/tfx-doctortriflux 설치, CLI, HUD, 스킬, 캐시와 MCP 연결을 진단하고 관리 대상만 복구합니다. Use when: not working, broken, error, 안 돼, 이상해, 에러, 캐시, reset, doctor