security-visual-testing — Claude Code skill: what it does & install
security-visual-testing validates URLs, masks sensitive data on screenshots, and runs multi-viewport visual regression tests with WCAG accessibility audits.
MIT 115 installs ★ 533 updated 2026-10-25
npx skills add proffesor-for-testing/agentic-qe --skill security-visual-testing -a claude-codeWhat security-visual-testing does
This skill combines visual layout regression with security inspection before writing screenshots to storage. It blocks dangerous protocols like javascript: or file: before navigation occurs. Browser tasks require the Vibium Go binary with WebDriver BiDi, installed through aqe init. Before saving image artifacts, the check-injection.js script scans DOM content for prompt-injection markers and aborts when issues appear.
The built-in detector spots credentials, payment details, and API keys inside forms. These elements receive intense blur or solid black masking prior to file export. Testing runs across four screen sizes at once: 320px mobile, 768px tablet, 1440px desktop, and 1920px wide layouts. Accessibility verification relies on axe-core rules targeting WCAG 2.1 AA compliance.
What it helps with
- block risky URL protocols before browser navigation
- mask credentials and API keys in test screenshots
- run parallel visual diff tests across four screen sizes
- audit web interfaces against WCAG 2.1 AA standards
Example prompts for the agent
- Run a visual regression audit on
https://example.comwith security and WCAG checks. - Capture a page screenshot for
https://example.com/profilewith PII masking enabled. - Verify responsive layouts on
https://example.comacross mobile and desktop viewports.
How to install security-visual-testing
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill security-visual-testing -a claude-code2Manually: put the files in place
~/.claude/skills/security-visual-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/security-visual-testing/
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill security-visual-testing -a codex2Manually: put the files in place
.agents/skills/security-visual-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill security-visual-testing -a cursor2Manually: put the files in place
.cursor/skills/security-visual-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install proffesor-for-testing/agentic-qe assets/skills/security-visual-testing2Manually: put the files in place
.github/skills/security-visual-testing/SKILL.md1Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill security-visual-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/security-visual-testingManually: put the files in place
.devin/skills/security-visual-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill security-visual-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about security-visual-testing
How do I install security-visual-testing in Claude Code?
Run npx skills add proffesor-for-testing/agentic-qe --skill security-visual-testing -a claude-code. Alternatively, copy the file to ~/.claude/skills/security-visual-testing/SKILL.md.
How does the skill prevent data leaks in test artifacts?
The scanner identifies credentials, credit card numbers, and API tokens before saving images. It obscures detected regions using blur or opaque boxes directly on the screenshot.
What browser setup is required before running tests?
The skill relies on the Vibium WebDriver BiDi engine installed via aqe init. It runs check-injection.js to block screenshots when prompt injection patterns are detected.
Source text
SKILL.md · MIT
---
name: security-visual-testing
description: "Security-first visual testing combining URL validation, PII detection, and visual regression with parallel viewport support. Use when testing web applications that handle sensitive data, need visual regression coverage, or require WCAG accessibility compliance."
category: specialized-testing
priority: high
tokenEstimate: 1400
agents: [qe-visual-tester, qe-security-scanner, qe-accessibility-auditor]
implementation_status: stable
optimization_version: 1.0
last_optimized: 2026-01-21
dependencies: [visual-testing-advanced, security-testing, accessibility-testing]
quick_reference_card: true
tags: [security, visual-testing, pii, accessibility, wcag, parallel-viewport, regression]
trust_tier: 3
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/security-visual-testing.yaml
---
# Security Visual Testing
## Browser engine
Uses the **qe-browser** fleet skill (`.claude/skills/qe-browser/`) for all browser automation. The Vibium engine (10MB Go binary, WebDriver BiDi) is installed automatically by `aqe init`. For security-visual workflows, qe-browser adds two things on top of stock visual testing: `check-injection.js` (scans page content for prompt-injection patterns before screenshots are stored) and `assert.js` (16 typed checks including `no_failed_requests` for detecting data-leak requests).
```bash
# Before storing any screenshot, scan the page
vibium go "$TARGET_URL"
vibium wait load
node .claude/skills/qe-browser/scripts/check-injection.js --include-hidden
INJ=$?
if [ $INJ -ne 0 ]; then
echo "Prompt-injection findings — do NOT store screenshot"
exit $INJ
fi
# Safe to proceed with visual-diff
node .claude/skills/qe-browser/scripts/visual-diff.js --name "${PAGE_NAME}"
```
<default_to_action>
When performing security-aware visual testing:
1. VALIDATE URLs before navigation (check for malicious patterns)
2. SCAN for PII before saving screenshots (mask sensitive data)
3. CAPTURE parallel viewports (mobile, tablet, desktop)
4. COMPARE against baselines (detect visual regressions)
5. AUDIT accessibility (WCAG 2.1 AA compliance)
**Quick Security-Visual Checklist:**
- URL validation (no javascript:, data:, file: schemes)
- PII detection (emails, phones, SSN, credit cards, API keys)
- Visual regression (diff threshold < 0.1%)
- Viewport coverage (320px, 768px, 1024px, 1440px)
- Accessibility score (> 90% axe-core pass rate)
**Critical Success Factors:**
- Always mask PII before storing screenshots
- Test across all target viewports in parallel
- Store baselines in version control
- Run accessibility audits on every visual change
</default_to_action>
## Quick Reference Card
### When to Use
| Scenario | Use This Skill? | Why |
|----------|-----------------|-----|
| Testing login pages | Yes | Contains PII (passwords, emails) |
| Visual regression suite | Yes | Parallel viewport + baseline comparison |
| Payment forms | Yes | Credit card data needs masking |
| Public marketing pages | Maybe | Only if sensitive data possible |
| API-only testing | No | Use security-testing skill instead |
### Key Capabilities
| Capability | Description | Performance |
|------------|-------------|-------------|
| URL Validation | Block malicious URLs before navigation | <5ms |
| PII Detection | Find 6+ types of sensitive data | <100ms |
| Parallel Viewports | Test 4 viewports simultaneously | 4x faster |
| Visual Regression | Pixel-diff with configurable threshold | <500ms |
| Accessibility Audit | WCAG 2.1 A/AA/AAA compliance | <2s |
---
## Workflows
### 1. Security Visual Audit (Full Pipeline)
```bash
# Run complete security + visual audit
aqe test visual-audit --url https://example.com --security --accessibility
```
**Steps:**
1. Validate URL security (block malicious schemes)
2. Scan page for security issues (XSS, injection patterns)
3. Capture screenshots across 4 viewports in parallel
4. Compare against stored baselines
5. Run accessibility audit (axe-core)
6. Generate consolidated report
### 2. PII-Safe Screenshot
```bash
# Capture screenshot with automatic PII masking
aqe screenshot --url https://example.com/profile --pii-safe
```
**PII Detection Patterns:**
- Email addresses: `[email protected]`
- Phone numbers: `+1-555-123-4567`
- Credit cards: `4111-1111-1111-1111`
- SSN: `123-45-6789`
- API keys: `sk_live_...`, `AKIA...`
- Passwords: Form fields with type="password"
**Masking Strategy:**
- Default: Blur with high intensity
- Options: `redact` (black box), `pixelate`, `blur`
### 3. Responsive Visual Audit
```bash
# Test visual consistency across viewports
aqe test responsive --url https://example.com --viewports mobile,tablet,desktop
```
**Default Viewports:**
| Name | Width | Height | Device |
|------|-------|--------|--------|
| mobile | 320px | 568px | iPhone SE |
| tablet | 768px | 1024px | iPad |
| desktop | 1440px | 900px | MacBook |
| wide | 1920px | 1080px | Full HD |
---
## Integration with AQE v3
### Using with BrowserSecurityScanner
```typescript
import { BrowserSecurityScanner } from '@agentic-qe/v3';
const scanner = new BrowserSecurityScanner(memory, {
urlValidation: { enabled: true },
piiDetection: { enabled: true, maskBeforeSave: true },
parallelViewports: { maxConcurrent: 4 }
});
const result = await scanner.scanUrl('https://example.com', {
viewports: ['mobile', 'tablet', 'desktop'],
accessibility: true
});
```
### Using with TrajectoryAdapter
```typescript
import { TrajectoryAdapter } from '@agentic-qe/v3';
const adapter = new TrajectoryAdapter(memory);
// Record testing trajectory for learning
await adapter.startTrajectory('security-visual-test', {
url: 'https://example.com',
testType: 'security-visual'
});
// ... perform tests ...
await adapter.endTrajectory(trajectoryId, {
success: true,
piiFound: 3,
visualRegressions: 0,
accessibilityScore: 95
});
```
---
## Agent Coordination
### Memory Namespace
```
aqe/security-visual/
├── baselines/* - Visual regression baselines
├── screenshots/* - Captured screenshots (PII masked)
├── reports/* - Audit reports
└── trajectories/* - Learning trajectories
```
### Fleet Coordination
```typescript
const fleet = await FleetManager.coordinate({
strategy: 'security-visual-audit',
agents: [
'qe-visual-tester', // Visual regression
'qe-security-scanner', // URL/PII scanning
'qe-accessibility-auditor' // WCAG compliance
],
topology: 'parallel',
maxConcurrent: 4
});
```
---
## Error Handling
| Error | Cause | Resolution |
|-------|-------|------------|
| `URL_BLOCKED` | Malicious URL pattern detected | Check URL, remove javascript:/data: |
| `PII_DETECTED` | Sensitive data found in screenshot | Enable masking or redact manually |
| `BASELINE_MISSING` | No baseline for comparison | Run with `--update-baseline` first |
| `VIEWPORT_TIMEOUT` | Browser didn't respond | Increase timeout or reduce parallel |
| `ACCESSIBILITY_FAILED` | WCAG violations found | Review violations, fix issues |
---
## Related Skills
- [visual-testing-advanced](../visual-testing-advanced/) - Pure visual testing without security
- [security-testing](../security-testing/) - Security testing without visual component
- [accessibility-testing](../accessibility-testing/) - Accessibility-only testing
- [qe-visual-accessibility](../qe-visual-accessibility/) - AQE v3 visual domain skill
---
## Performance Targets
| Metric | Target | Measured |
|--------|--------|----------|
| URL validation | <5ms | 2ms |
| PII detection | <100ms | 45ms |
| Single viewport capture | <2s | 1.2s |
| 4-viewport parallel | <3s | 2.1s |
| Visual diff | <500ms | 320ms |
| Accessibility audit | <2s | 1.5s |
| Full pipeline | <10s | 7.2s |
© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe