refine-live
它能做什么
当没有设置常驻智能体时,这项技能让你的 AI 充当 transitions.dev Timeline Inspector 中 Refine 按钮背后的模型。适合在网页项目中调整动效的人。
适用场景
- ✓当你运行 refine live 命令,并希望 AI 回应 Refine 点击时。
- ✓当中继正在运行,但没有连接常驻智能体命令时。
- ✓当你完成工作,想停止实时 Refine 循环时。
技能链接
https://github.com/Jakubantalik/transitions.dev/blob/main/refine/.agents/skills/refine-live/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请开启 Refine 实时模式,让我可以在这个聊天中回应我的动效建议。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体持续检查本地中继中的 Refine 任务,为每个过渡效果编写建议,并将其发回面板。每次空闲检查都会占用聊天轮次,因此完成后应停止该循环。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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:
- Relay stop signal (authoritative).
GET /jobs/nextmay return200with{"stop": true}. The relay sends this when the user clicks Stop in the panel, or automatically after ~10 min with no jobs. Always honor it: stop looping immediately, tell the user the LLM tab will go unavailable and how to resume (/refine live), and end your turn. Never re-poll after a stop signal. - The user says so — "stop refine", "exit live", etc.
- Your own idle backoff (safety net). A long stretch of
204s is normal — it just means no one has clicked Refine yet — but to avoid spending credits on a forgotten loop, back off as idle grows instead of hammering immediately: re-poll right away for the first few empty cycles, then pause ~5s between polls, and after ~10 min of unbroken idle stop on your own (same as the relay's auto-stop) and tell the user how to resume. Any real job resets the backoff.
The relay reports the agent as "available" for ~120s after your last poll, so short pauses keep you live. A successful job always resets idle, so an active session never backs off.
Announce yourself once, before the first poll. The relay keeps a sticky Stop latch: after a panel Stop (or the idle auto-stop) it answers every
GET /jobs/nextwith{"stop": true}until a new agent explicitly resumes — so a stopped session can't silently come back. Clear the latch a single time at startup, then begin polling:curl -s -X POST http://localhost:7331/poller/startDo not call this again mid-loop (it would defeat a user's Stop). Only on a fresh
/refine live.Claim the next job (long-poll). This call blocks up to ~25s, then returns.
curl -s http://localhost:7331/jobs/nextHTTP
204/ empty body → no work yet. Poll again, applying the idle backoff above (immediate at first, then ~5s pauses, then stop after ~10 min).HTTP
200with{"stop": true}→ the loop must end. Stop polling, tell the user the LLM tab is now unavailable and that/refine liveresumes it, and end your turn. Do not treat it as a job.HTTP
200with a job JSON → work to do. Shape:{ "id": "uuid", "request": { "label": "Resize + Color", "selector": ".box-resize", "mode": "llm", "refineType": "small", "timings": [ { "property": "width", "durationMs": 400, "delayMs": 0, "easing": "ease-out" }, { "property": "background", "durationMs": 400, "delayMs": 0, "easing": "ease-out" } ] } }If
request.kind === "scan"this is not a suggestion job — the panel is asking you to group the page's transitions by reading the source. Jump to [`##
常见问题
这是推荐的设置吗?
不是。推荐的选项是运行常驻智能体命令,它无需聊天循环即可运行。
为什么它会消耗额度?
每次空闲检查都在聊天中进行,而空闲检查会占用聊天轮次和额度。
我如何停止它?
在聊天中说 stop refine 即可退出循环。
详情
作者的原始描述
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.
热度
- GitHub 星标
- 6.0k
- 排名
- #14454
- 许可证
- —
- 更新时间
- 2026/10/29
评论
- …
同一仓库的更多技能
transitions-agent
6.0k帮你的智能体扫描网站代码中缺失或不一致的界面动效,并用经过验证的 transitions.dev 方案进行修复。
transitions-dev
6.0k教你的智能体为网页应用添加 32 种现成的 CSS 过渡效果,例如弹窗、下拉菜单、徽章和文字切换。
transitions-polish
6.0k帮你的智能体调整网页应用中现有的动效,使时长、距离、缓动和模糊都符合统一的设计标准。
transitions-ui-generation
6.0k帮你的智能体添加 AI 生成效果:界面、标题或图片会先以点阵方式逐步绘制,然后才显示真实内容。