跳到正文
Skillpedia
界面(UI/UX)6.0k · #14453

transitions-agent

它能做什么

这项技能运行 transitions-agent 工具,检查代码库中的动画问题并提出修复建议。适合希望界面动效流畅、统一的网页开发者。

适用场景

  • ✓当你想检查项目中缺失或不一致的动画时。
  • ✓当你运行 transitions-agent 命令,并想要引导式的扫描和修复时。
  • ✓当你想让弹窗、下拉菜单或工具提示以统一的方式显示动画时。

技能链接

https://github.com/Jakubantalik/transitions.dev/blob/main/agent/skill/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Jakubantalik/transitions.dev/blob/main/agent/skill/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请扫描我的项目中卡顿或不一致的界面动画,并一步步带我完成修复。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体先运行只读扫描,显示动效评分和发现的问题,然后提供修复选项。在你选定并批准之前,它不会修改任何文件。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Transitions Motion Agent

You drive the transitions-agent CLI for the user: scan, present choices, run the choice they pick, verify. The scan is deterministic and free; fixes change files, so every fix step needs the user's go-ahead first.

When the user's message is just the scan or fix command (npx transitions-agent, npx transitions-agent fix, or a variant), that IS the request for this whole workflow: run the scan, then ALWAYS continue to the options step below - never stop at reporting the scan output. init-ci is different: it is CI setup only (see CI setup) - never scan or fix as part of it.

Workflow

  1. Scan (safe, read-only, no account needed) from the repository root:

    npx transitions-agent@latest --json
    

    Report to the user: the motion score (0-100), then the components list - every UI component the scan recognized (modal, dropdown, tooltip, toast, accordion, tabs, toggle...) with its motion and the transitions.dev recipe it maps to, marked as matching the recipe, off the motion scale, built wrong, or hand-rolled - then the findings grouped by rule with file:line. Keep it short; lead with the score.

  2. Present exactly these two options and let the user choose (do not fix without a choice, and do not invent other options such as fixing the findings yourself):

    • Polish fix - the transitions-polish treatment: every value moved onto the motion-token scale by what it does (a 300ms modal close becomes 150ms), hover transitions covering what the hover changes, a reduced-motion guard. Small diffs, nothing restructured: npx transitions-agent@latest fix --yes
    • Revamp fix - everything polish does, plus the transitions.dev recipe installed on each recognized component (Pro recipes included): recipe CSS, state hooks, and the JS for enter and exit. Business plan: npx transitions-agent@latest fix --mode revamp --yes
  3. License: hosted fixes need a key. It resolves from TRANSITIONS_AGENT_LICENSE, or ~/.transitions-agent.json. If neither exists, offer:

    npx transitions-agent@latest signup
    

    This opens the user's browser; they enter their email there and the key saves itself. Wait for it to finish, then run the fix. If it reports the key could not be saved (sandboxed agent), pass it on every fix with --license <key>.

  4. Verify: re-run the scan and report the score change (for example "71 to 89"). If the user wants it as a pull request, use fix --pr (it creates a branch and opens a PR; it never touches the main branch) - only with their explicit ok.

CI setup

When the user asks to add the Agent to GitHub Actions / CI, or their message is npx transitions-agent init-ci (any flags), set up CI and nothing else: do NOT run a scan or a fix. Run:

npx transitions-agent@latest init-ci

It writes both workflows (score plus automatic fixes on every pull request: a fix pull request into that branch, never main, that the user merges to apply or closes to reject; and a manual fix run from the Actions tab), keeps existing ones, checks the GitHub side, shows which fix modes the user's key allows, and ends with lettered Options. Relay a one-line status, then present those options exactly as printed and ask which to do. Automatic fixes default to polish; ask the user which they want when it matters: --mode revamp (Business) or --no-auto-fix (scores only). Labels on a pull request override it per pull request: revamp, polish, no-motion-fix. Typical options:

  • Sign up or sign in (no key yet): npx transitions-agent@latest signup opens the browser; existing accounts sign in the same way. Wait for it, then re-run init-ci.
  • Finish the GitHub side (license secret + pull request permission): npx transitions-agent@latest init-ci --yes. The key never appears in output.
  • Revamp as the default fix mode (Business keys): npx transitions-agent@latest init-ci --mode revamp.
  • Turn on automatic fixes for an older workflow: npx transitions-agent@latest init-ci --upgrade.
  • Commit the workflow files: on a new branch with a pull request, never straight to main.
  • Create a GitHub repository when the project has none.

Run only what the user picks. If gh is missing or blocked by a sandbox, give the user the manual steps it printed. Finish when it says "CI is fully set up", or tell the user exactly which step is theirs.

Network

transitions-agent needs network access: npm has to fetch the

常见问题

扫描会更改我的文件吗?

不会。扫描是只读的,也不需要账号。

它会不经询问就修复问题吗?

不会。每个修复都要等你选择并确认后才会执行。

它检查界面的哪些部分?

它检查弹窗、下拉菜单、工具提示、提示消息、折叠面板和标签页等组件。

详情

作者的原始描述

Scan a codebase for missing, janky, or inconsistent UI motion and fix it with transitions.dev recipes. ALWAYS use this skill when the user's message is or contains a transitions-agent command (npx transitions-agent, npx transitions-agent fix, any variant) - the command is a request for the full guided flow, not just command execution. Also use when the user asks about UI transitions, animations, motion quality, a motion score, janky or missing transitions, "polish the motion", "fix the animations", or whether the motion is good after UI changes.

repo: Jakubantalik/transitions.dev

热度

GitHub 星标
6.0k
排名
#14453
许可证
—
更新时间
2026/10/29

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能