Agent Skillsdyad-sh/dyad › dyad:e2e-rebase

dyad:e2e-rebase

GitHub

根据PR评论中的失败测试自动更新E2E快照。流程包括解析失败文件、构建应用、执行带--update-snapshots的Playwright测试、验证通过性、审查变更并提交推送。

.claude/skills/e2e-rebase/SKILL.md dyad-sh/dyad

Trigger Scenarios

用户请求更新E2E测试快照 需要修复因UI变更导致的E2E测试失败

Install

npx skills add dyad-sh/dyad --skill dyad:e2e-rebase -g -y
More Options

Non-standard path

npx skills add https://github.com/dyad-sh/dyad/tree/main/.claude/skills/e2e-rebase -g -y

Use without installing

npx skills use dyad-sh/dyad@dyad:e2e-rebase

指定 Agent (Claude Code)

npx skills add dyad-sh/dyad --skill dyad:e2e-rebase -a claude-code -g -y

安装 repo 全部 skill

npx skills add dyad-sh/dyad --all -g -y

预览 repo 内 skill

npx skills add dyad-sh/dyad --list

SKILL.md

Frontmatter
{
    "name": "dyad:e2e-rebase",
    "description": "Rebase E2E test snapshots based on failed tests from the PR comments."
}

E2E Snapshot Rebase

Rebase E2E test snapshots based on failed tests from the PR comments.

Instructions

  1. Get the current PR number using gh pr view --json number --jq '.number'

  2. Fetch PR comments and look for the Playwright test results comment. Parse out the failed test filenames from either:

    • The "Failed Tests" section (lines starting with - \filename.spec.ts`)
    • The "Update Snapshot Commands" section (contains npm run e2e e2e-tests/filename.spec.ts)
  3. If no failed tests are found in the PR comments, inform the user and stop.

  4. Build the application binary:

    npm run build
    

    IMPORTANT: E2E tests run against the built binary. If any application code (anything outside of e2e-tests/) has changed, you MUST run this build step before running E2E tests, otherwise you'll be testing the old version.

  5. For each failed test file, run the e2e test with snapshot update:

    PLAYWRIGHT_HTML_OPEN=never npm run e2e e2e-tests/<testFilename>.spec.ts -- --update-snapshots
    
  6. After updating snapshots, re-run the same tests WITHOUT --update-snapshots to verify they pass consistently:

    PLAYWRIGHT_HTML_OPEN=never npm run e2e e2e-tests/<testFilename>.spec.ts
    

    If any test fails on this verification run, inform the user that the snapshots may be flaky and stop.

  7. Show the user which snapshots were updated using git diff on the snapshot files.

  8. Review the snapshot changes to ensure they look reasonable and are consistent with the PR's purpose. Consider:

    • Do the changes align with what the PR is trying to accomplish?
    • Are there any unexpected or suspicious changes?
  9. If the snapshots look reasonable, commit and push the changes:

    git add e2e-tests/snapshots/
    git commit -m "Update E2E snapshots"
    git push
    
  10. Inform the user that the snapshots have been updated and pushed to the PR.

Version History

  • 7158f6f Current 2026-08-20 16:42

Same Skill Collection

.claude/skills/add-models/SKILL.md
.claude/skills/check-workflows/SKILL.md
.claude/skills/debug-minified-error/SKILL.md
.claude/skills/debug-with-playwright/SKILL.md
.claude/skills/deflake-e2e-from-run/SKILL.md
.claude/skills/deflake-e2e-recent-commits/SKILL.md
.claude/skills/deflake-e2e/SKILL.md
.claude/skills/feedback-to-issues/SKILL.md
.claude/skills/fix-issue/SKILL.md
.claude/skills/plan-to-issue/SKILL.md
.claude/skills/pr-fix-ci/SKILL.md
.claude/skills/pr-fix-comments/SKILL.md
.claude/skills/pr-fix/SKILL.md
.claude/skills/pr-push/SKILL.md
.claude/skills/pr-rebase/SKILL.md
.claude/skills/pr-screencast/SKILL.md
.claude/skills/promote-beta-to-stable/SKILL.md
.claude/skills/remember-learnings/SKILL.md
.claude/skills/swarm-pr-review/SKILL.md
.claude/skills/swarm-to-plan/SKILL.md
.claude/skills/multi-pr-review/SKILL.md

Metadata

Files
0
Version
157ab55
Hash
ffcf246e
Indexed
2026-08-20 16:42

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 22:29
浙ICP备14020137号-1 $お客様$