一键导入
morph-preview-pr
Specialized skill for morph_preview_test_pr with PR-native browser verification, task formulation, and result interpretation guidance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Specialized skill for morph_preview_test_pr with PR-native browser verification, task formulation, and result interpretation guidance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert-level decision policy for morph_fastapply, warpgrep_codebase_search, and warpgrep_github_search with strategic tool selection and execution patterns.
Quality gate and validation layer for Morph tool outputs, focusing on safety, correctness, and appropriate tool usage.
Autonomous multi-session browser testing engine with test synthesis, code-informed subflow planning, self-healing retry, run history persistence, viewport testing, and CI/CD integration. Uses `morph_browser_test_url` for browser automation.
Automatic production site testing with code-aware analysis using warpgrep_codebase_search and morph_browser_test_url for comprehensive validation.
| name | morph-preview-pr |
| description | Specialized skill for morph_preview_test_pr with PR-native browser verification, task formulation, and result interpretation guidance. |
Specialized skill for morph_preview_test_pr — PR-native browser verification with GitHub context and preview deployments.
Guide effective use of morph_preview_test_pr for validating pull request previews using Morph's GitHub SDK and browser automation. This skill focuses on task formulation, environment selection, and result interpretation for PR preview testing.
Before using morph_preview_test_pr:
GitHub App Installation
/morph_selftest if unsurePreview Deployment
Repository Access
{
"owner": "acme",
"repo": "app",
"prNumber": 42,
"task": "Focus on the new login form. Test email/password fields, submit button, and error validation."
}
{
"owner": "acme",
"repo": "app",
"prNumber": 42,
"task": "Test the updated checkout flow",
"preferredEnvironment": "preview"
}
{
"owner": "acme",
"repo": "app",
"prNumber": 42,
"task": "Test critical payment integration changes",
"postComment": true
}
Template:
Focus on [feature/change from PR].
Navigate to [page/section].
[Action 1], [Action 2], [Action 3].
Verify [success criteria].
New Form:
Focus on the new contact form added in this PR. Navigate to /contact, verify all fields (name, email, message) are present, fill them with valid data, submit the form, and confirm the success message appears.
Updated Component:
Focus on the redesigned navigation bar. Verify the new logo appears, the menu items are correctly aligned, the mobile hamburger menu works, and all links navigate to the correct pages.
Bug Fix:
Focus on the fixed date picker bug. Navigate to /events/create, open the date picker, select a date in the past, and verify the validation error appears as expected (previously it didn't).
Performance Change:
Focus on the optimized image loading. Navigate to /gallery, scroll through the page, and verify images load progressively without layout shift.
API Integration:
Focus on the new payment integration. Navigate to /checkout, select the new payment method, enter test card details, submit, and verify the payment confirmation appears.
Use when:
Common values:
"preview" — standard preview deployment (most common)"staging" — staging environment"production" — production deployment (rare for PRs)Default behavior:
When to use:
Benefits:
When to use:
Benefits:
Deployment not ready:
Task too vague:
Timing issues:
Network issues:
Consistent failures:
Wrong test approach:
Signs:
1. Add explicit waits:
Wait for loading spinner to disappear before clicking submit.
2. Verify state before action:
Verify the modal is fully open before clicking the confirm button.
3. Test in sequence:
First verify element is visible, then verify it's clickable, then click.
4. Avoid race conditions:
Wait for API response to complete before checking updated data.
5. Handle animations:
Wait for slide-in animation to finish before interacting with sidebar.
When a test is flaky:
1. Identify PR (owner/repo/prNumber)
2. Read PR description/diff
3. Formulate focused task
4. Run morph_preview_test_pr
5. Review check run
6. Address failures
1. Identify PR with multiple deployments
2. Determine target environment
3. Run with preferredEnvironment
4. Validate environment-specific behavior
5. Optionally test other environments
1. Identify critical PR
2. Read changes thoroughly
3. Formulate comprehensive task
4. Run with postComment: true
5. Review recording
6. Discuss in PR thread
1. Run initial test
2. Review recording
3. Identify issues
4. Refine task
5. Run again
6. Compare results
1. Test fails unexpectedly
2. Review recording for timing issues
3. Adjust task with explicit waits
4. Retry with refined task
5. Document flakiness if persists
Trigger on:
Workflow:
# Example GitHub Actions
on:
pull_request:
types: [opened, synchronize]
deployment_status:
jobs:
test-preview:
if: github.event.deployment_status.state == 'success'
steps:
- name: Test PR Preview
run: |
pi -c "Use morph-preview-pr skill to test PR #${{ github.event.pull_request.number }}"
Critical (Block merge):
High (Fix before merge):
Medium (Fix soon):
Low (Nice to fix):
morph_browser_test_url)preferredEnvironment when neededpostComment for high-visibility PRsExample: Checkout flow
Focus on the updated checkout flow in this PR.
1. Navigate to /products, add item to cart
2. Click cart icon, verify item appears
3. Click 'Checkout', verify redirect to /checkout
4. Fill shipping form (name, address, city, zip)
5. Click 'Continue to Payment'
6. Verify payment form appears with new payment method selector
7. Select new payment method, verify form updates
8. Fill test card details
9. Click 'Place Order'
10. Verify order confirmation page with order number
Tips for multi-page flows:
This skill assumes:
previewPrEnabled: true in Morph configpreviewBrowserTimeoutMs: 120000 (2 minutes) for recordingCheck with /morph_status if tool is unavailable.