rex-claude
Qué hace
Esta skill permite que tu agente ejecute otras sesiones de Claude Code dentro de la terminal Rex y las coordine. Está pensada para personas que ejecutan varias sesiones de IA a la vez en Rex y quieren que una sesión controle a las demás.
Cuándo usarla
- ✓Cuando quieres iniciar otra sesión de Claude Code en un panel o pestaña de Rex.
- ✓Cuando necesitas esperar a que una sesión hija termine o pida permiso.
- ✓Cuando quieres que un agente lea o controle la pantalla de otra sesión.
Link de la skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/rex-claude/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Abre una segunda sesión de Claude Code en la carpeta backend dentro de Rex, envíale la tarea de pruebas y avísame cuando termine.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente usa un script auxiliar dentro de Rex para lanzar Claude en una carpeta, enviar instrucciones y vigilar el estado que informa cada sesión. Después lee los resultados o cierra el panel.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Qué necesito para usarla?
Debes estar ejecutando dentro de la terminal Rex, con claude y jq disponibles en tu ordenador.
¿Cómo sabe que una sesión ha terminado?
Claude Code informa de su estado a Rex, por ejemplo trabajando, terminado o bloqueado, así que la skill no tiene que adivinarlo desde la pantalla.
¿Puede gestionar las solicitudes de permiso?
Sí. Puede detectar cuándo una sesión está bloqueada por una solicitud de permiso y gestionar el diálogo de confianza del espacio de trabajo.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 33 mil
- Posición en el ranking
- #8898
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
owasp-security
33 milEnseña a tu agente la guía de seguridad OWASP para webs, APIs, móviles, contenedores y agentes de IA, para detectar debilidades comunes y sugerir correcciones.
agent-management
33 milPermite que tu agente cree, liste, hiberne, despierte, renombre y elimine agentes de IA con la CLI de AI Maestro, gestionando su ciclo de vida.
agent-messaging
33 milPermite que tu agente envíe, reciba y responda mensajes firmados entre agentes de IA con el Protocolo de Mensajería de Agentes, sobre todo en tu equipo.
docs-search
33 milBusca en la documentación generada del código las firmas de funciones, clases y comentarios, para revisar la API real antes de cambiar nada.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.