# Live Refine Relay

Answers refine jobs in chat by polling a relay and posting suggestions.

- Repository: https://github.com/Jakubantalik/transitions.dev (6007 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Jakubantalik/transitions.dev --skill refine-live -g -a claude-code -y`
Codex: `npx skills add Jakubantalik/transitions.dev --skill refine-live -g -a codex -y`
Cursor: `npx skills add Jakubantalik/transitions.dev --skill refine-live -g -a cursor -y`
Gemini CLI: `npx skills add Jakubantalik/transitions.dev --skill refine-live -g -a gemini-cli -y`

## Description

In-chat fallback for the Timeline Inspector Refine agent. Use when the user runs `/refine live`, asks to "refine live", "go live", or answer refine jobs, but ONLY when no persistent agent is wired (no `npx transitions-refine live`). Prefer `npx transitions-refine live` for run-and-forget (relay spawns agent per click, no idle credit burn). This skill long-polls the relay, posts suggestions, handles scan/apply jobs.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Refine Live

## Two modes

**Persistent (recommended, run and forget)**  
Run `npx transitions-refine live` from your project. The CLI starts the relay and wires `REFINE_AGENT_CMD` so the relay spawns your agent CLI **per Refine click**. No chat loop; idle = zero credit burn. Works hours later as long as the relay process keeps running. Stop with Ctrl-C (or `npx transitions-refine stop`).

**In-chat loop (fallback, this skill)**  
Run `/refine live` in Cursor/Claude/Codex when the relay is up but has **no** `REFINE_AGENT_CMD`. **You** become the poller via `GET /jobs/next`. The Agent tab stays available only while you keep polling, **each idle poll cycle consumes chat turns/credits**. Say "stop refine" to exit.

Use the in-chat loop only when you cannot wire a persistent agent CLI.

---

Turn yourself into the LLM behind the Timeline Inspector's **Refine** button (**in-chat fallback mode**). While
this loop runs, the panel's **LLM** tab is "available": each click sends one
transition here, you reason about it, and your suggestions appear in the panel.

You are the poller. Nothing is installed, you just talk to a small local relay
(default `http://localhost:7331`) that the `npx` injector already started.

## How it works

```
Browser (Refine, LLM tab) ──POST /jobs──► relay ──GET /jobs/next──► YOU
                          ◄──GET /jobs/:id── relay ◄──POST /jobs/:id/result── YOU
```

## The loop, stay live, but don't burn credits forever

Keep polling so the panel's LLM tab stays "available", but this loop costs chat
turns/credits even while idle, so it is **not** truly run-and-forget, it has
three exits, in priority order:

The rest: https://github.com/Jakubantalik/transitions.dev/blob/HEAD/refine/.agents/skills/refine-live/SKILL.md
