rex-claude
하는 일
이 스킬은 Rex 터미널 안에서 다른 Claude Code 세션을 실행하고 조율하도록 합니다. Rex에서 여러 AI 세션을 동시에 돌리면서 한 세션이 다른 세션을 이끌게 하고 싶은 사람에게 맞습니다.
사용하는 경우
- ✓Rex 창이나 탭에서 다른 Claude Code 세션을 시작하고 싶을 때.
- ✓자식 세션이 끝나거나 권한을 요청할 때까지 기다려야 할 때.
- ✓한 에이전트가 다른 세션의 화면을 읽거나 조작하기를 원할 때.
스킬 링크
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/rex-claude/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Rex에서 backend 폴더의 두 번째 Claude Code 세션을 열고, 테스트 작업을 보낸 뒤 끝나면 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 Rex 안의 도우미 스크립트를 써서 폴더에서 Claude를 실행하고, 프롬프트를 보내며, 각 세션이 보고하는 상태를 지켜본 뒤 결과를 읽거나 창을 닫습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Drive Claude Code sessions in Rex
Rex is a terminal multiplexer from Superlogical. Its rex CLI opens panes, types into them and reads their screens. Claude Code reports its state to Rex through the Program Status Protocol (OSC 7501): idle, working, done, blocked (with kind=permission, question or auth) and error. This skill uses that state to know when a child session has finished or needs someone, instead of guessing from the screen.
The helper script scripts/rex-claude.sh wraps the steps. Build its path from the "Base directory for this skill" line that Claude Code gives you when it loads this skill: ~/.claude/skills/rex-claude for a user install, or .claude/skills/rex-claude inside the project for a project install. Run it with bash, so it works even if the installer dropped the executable bit. Every command needs REX_SESSION, so run them from a Bash call inside Rex.
RC="<base directory>/scripts/rex-claude.sh"
bash "$RC" help
Requirements: you are running inside a Rex terminal (REX_SESSION and REX_BLOCK are set), and claude and jq are on PATH. For general Rex usage (tabs, layouts, other programs) run rex skill show, or install Rex's own skill with rex skill setup.
Workflow
Prepare the directory. The child starts in
-d DIRand loads that directory's.claude/settings.json, plus the user's~/.claude/settings.json(model, default permission mode, hooks). To test a setting without touching the user's files, put it in a throwaway project's.claude/settings.json, or pass-- --settings '<json>'.Launch.
B=$(bash "$RC" launch -d "$DIR" -l my-task --trust -- --model sonnet)launchprints the new block ID. Save it, because every later command targets it. Arguments after--go toclaude, for example--permission-mode default,--settings,--add-diror--model. By default it splits your pane to the right without taking focus. Use--split below,--ratio 30, or--tab NAMEfor a new tab, and--focusto move focus to the new pane.Send the prompt.
bash "$RC" send "$B" 'Run the tests and fix the failing one. Write a summary to REPORT.md.'Newlines become spaces, because Return submits the prompt. For long instructions, write them to a file in the child's directory and send
Read TASK.md and do what it says., or usesend "$B" -f FILE. A prompt that starts with/runs a slash command, such as/exit.Wait for the turn.
bash "$RC" wait "$B" --timeout 600The Bash tool's default timeout is 2 minutes. Run
waitin the foreground only with a Bashtimeoutat least as long as--timeout. For anything longer, run it withrun_in_backgroundand continue when its notification arrives.waitonly counts status reports made after the lastsendorkeys, so the previous turn'sdonedoesn't end it early.Exit Output Meaning 0 doneoridleThe turn finished 10 blocked permission approve Write: /pathWaiting on a person: a permission prompt, a question or a login 11 error …The session reported an error 12 exitedclaude is no longer running in the pane 124 timeout (state=working)Still running; wait again or look at the screen Handle
blocked. Look at it withbash "$RC" screen "$B" 25. A permission prompt is the user's safety net, so follow the rules below before pressing anything. To approve once, pressbash "$RC" keys "$B" enterwhile❯ 1. Yesis selected, thenwaitagain. To refuse, pressbash "$RC" keys "$B" escape.Read the result. Prefer a file the child wrote (ask for
REPORT.mdin the prompt) over the screen. Claude Code draws on the alternate screen, which has no scrollback, soscreenshows only what is visible right now.bash "$RC" status "$B"prints the state, the pending prompt's message, the session title and the working directory.Verify on disk. Check files, test output or git state yourself. Don't report the child's own summary as proof.
Clean up. Leave the pane open when the user may want to read it. To end the session,
send "$B" /exit(thenwaitreturns 12), andclose "$B"closes the pane.
bash "$RC" ls lists every Claude Code pane in this Rex session with its state, including panes the user opened themselves.
Rules
- Drive only panes you launched, or a pane the user names. `l
자주 묻는 질문
사용하려면 무엇이 필요한가요?
Rex 터미널 안에서 실행해야 하며, 컴퓨터에 claude와 jq가 있어야 합니다.
세션이 끝났는지 어떻게 아나요?
Claude Code가 작업 중, 완료, 차단 같은 상태를 Rex에 알리므로, 스킬은 화면에서 추측하지 않습니다.
권한 요청도 처리할 수 있나요?
네. 세션이 권한 요청에 막혀 있는지 감지하고, 작업 공간 신뢰 대화상자를 처리할 수 있습니다.
상세 정보
작성자의 원본 설명
Open other Claude Code sessions in Rex terminal panes or tabs and drive them: launch claude in a directory, answer the workspace trust dialog, send prompts, wait for each turn by its reported status (working, done, blocked on a permission prompt), read the screen, press keys and close the pane. Use when running inside the Rex terminal (REX_SESSION is set, TERM_PROGRAM=rex) and the user wants to start, delegate to, test in, watch or control a second Claude Code session side by side, for example to test a setting or permission in a fresh session, run a task in parallel in another pane, or check
인기도
- GitHub 스타
- 33k
- 순위
- #8898
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
owasp-security
33k웹 앱, API, 모바일, 컨테이너, AI 에이전트를 위한 OWASP 보안 지침을 따르도록 해서, 흔한 약점을 찾고 수정안을 제안하게 합니다.
agent-management
33k에이전트가 AI Maestro 명령줄을 사용해 AI 에이전트를 만들고, 나열하고, 일시 정지하고, 깨우고, 이름을 바꾸고, 삭제하도록 돕습니다.
agent-messaging
33k에이전트가 Agent Messaging Protocol로 AI 에이전트 사이에 서명된 메시지를 보내고, 받고, 답하도록 돕습니다. 대부분 내 컴퓨터에서 작동합니다.
docs-search
33k에이전트가 자동 생성된 코드 문서에서 함수 시그니처, 클래스 정의, 주석을 검색하도록 해서, 코드를 바꾸기 전에 실제 API를 확인하게 합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.