svenja-dev/claude-code-skills/preview-testing
Claude Code and agent skill by svenja-dev/claude-code-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Comprehensive E2E + Security Tests for Vercel Preview Deployments. Combines Playwright automation with Claude-in-Chrome MCP for interactive debugging. Activate on PR creation, before merge, or manual /preview-test.
Install
npx vskill@latest install svenja-dev/claude-code-skills/preview-testingSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Preview Testing
Comprehensive E2E + Security Tests for Vercel Preview Deployments
Trigger
This skill activates on:
/preview-test- Manual invocation- After PR creation against
mainordevelop - Before merge for production approval
Features
| Feature | Duration | Description | |
|---|---|---|---|
| Smoke Tests | <2min | Critical user flows (Login, Upload, Analysis) | |
| Visual Regression | <3min | Screenshot comparison with 1% tolerance | |
| Security Tests | <5min | OWASP LLM01, Quota Bypass, Stripe Webhook | |
| DSGVO Region Check | <30s | Verifies Frankfurt (fra1) region | |
| npm audit | <1min | Dependency vulnerability scan |
Usage
Security Tests (OWASP LLM Top 10 2025)
Prompt Injection (LLM01) - CRITICAL
- Direct Injection (Jailbreaks, DAN, Role Manipulation)
- System Prompt Extraction Prevention
- Context Hijacking via Fake History
- Indirect Injection via File Upload
- Multi-Language Bypass Attempts
File: tests/security/prompt-injection.spec.ts
Quota Bypass - CRITICAL (Cost Risk)
- API Authentication Bypass
- Email Spoofing Prevention
- Demo Mode Abuse
- Race Condition in Quota Check
- Test User Email Discovery
File: tests/security/quota-bypass.spec.ts
Stripe Webhook Security (PCI-DSS)
- Signature Validation
- Replay Attack Prevention
- Payload Manipulation Detection
- Subscription Fraud Prevention
File: tests/security/stripe-webhook.spec.ts
Workflow
Claude-in-Chrome MCP Integration
In addition to automated Playwright tests, interactive browser tools are available via MCP. These are ideal for:
- Visual debugging during development
- Ad-hoc testing without test scripts
- GIF recordings for PR documentation
- Live console/network inspection
When to Use Which Tool?
| Situation | Tool | Reason | |
|---|---|---|---|
| Automated CI/CD tests | Playwright npm run test:e2e | Fast, headless, reproducible | |
| Visual inspection | Claude-in-Chrome read_page | Accessibility tree, structured | |
| Screenshot for PR | Claude-in-Chrome computer | Saves locally, real Chrome | |
| Document user flow | Claude-in-Chrome gif_creator | Animated GIF | |
| Debug console errors | Claude-in-Chrome read_console_messages | Live JS errors | |
| Inspect API calls | Claude-in-Chrome read_network_requests | XHR/Fetch debugging |
Interactive Preview Testing (Claude-in-Chrome)
GIF Recording for PR Documentation
Debugging: Console & Network
Example: Complete Interactive Preview Test
Local Execution
CI/CD Integration
The workflow is defined in .github/workflows/preview-test.yml and runs automatically on PRs against main or develop.
PR Comment (automatic)
After each run, a comment with test results is created:
Blocking Logic
- Smoke Tests: Must pass
- Security Tests: Must pass (CRITICAL)
- Visual Regression: Warning on failure, doesn't block
- npm audit: Warning on failure, doesn't block
GDPR Compliance
- EU Data Residency: All tests verify Frankfurt (fra1) region
- No Real User Data: Synthetic test data (faker.js)
- Screenshots in EU: Playwright reports stored in GitHub Actions (EU region)
- Audit Trail: 30-day retention for security test reports
Expected Output
After running /preview-test:
Troubleshooting
Security Tests Are Skipped
Tests use test.skip(!isVercelDeployment, ...) and only run against production-like Vercel Preview. Locally they're skipped because some tests (e.g., rate limiting) require a real serverless environment.
Solution:
Visual Regression Baseline Missing
On first run, baseline screenshots are created. Changes are marked as diffs.
Solution:
Sources
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/preview-testing/SKILL.md
Popularity
- Repository stars
- 30
- Repository forks
- 5
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/svenja-dev/claude-code-skills/preview-testing)