enrich-qa-test
Review QA test and capture element screenshots to enrich documentation
Best use case
enrich-qa-test is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Review QA test and capture element screenshots to enrich documentation
Teams using enrich-qa-test should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/enrich-qa-test/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How enrich-qa-test Compares
| Feature / Agent | enrich-qa-test | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Review QA test and capture element screenshots to enrich documentation
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# enrich-qa-test
**Category**: Quality Assurance
## Usage
```bash
enrich-qa-test <qa-test-file> [--url <url>] [--update] [--elements-only]
```
## Arguments
- `<qa-test-file>`: Required - Path to the QA test procedure file (e.g., `qa-tests/active/QA-20250105-001-login.md`)
- `--url`: Optional - Override the test URL from the document
- `--update`: Optional - Automatically update the QA test file with screenshots
- `--elements-only`: Optional - Only capture element screenshots, skip full-page captures
## Purpose
This command reviews an existing QA test procedure, identifies UI elements mentioned in test steps, captures targeted screenshots of each element using Playwright, and enriches the documentation with visual references.
## Execution Instructions for Claude Code
When this command is run, Claude Code should:
### Phase 1: Parse QA Test Document
1. **Read the QA test file**
- Extract metadata (Test ID, URL, feature name)
- Parse all test cases (TC-###) and edge cases (EC-###)
2. **Extract element references from test steps**
- Scan for bold text: **Element Name**
- Scan for quoted elements: "Element Name"
- Identify action + element patterns:
- "Click the **Login** button"
- "Enter text in the **Email** field"
- "Select from the **Country** dropdown"
3. **Build element extraction list**
```
Elements found in QA-20250105-001-login.md:
TC-001:
- Step 2: Email field (input)
- Step 3: Password field (input)
- Step 4: Login button (button)
TC-002:
- Step 1: Forgot password link (link)
```
### Phase 2: Capture Screenshots
1. **Navigate to test URL** using Playwright MCP
```
browser_navigate → {url from metadata or --url}
```
2. **Take initial full-page snapshot**
```
browser_snapshot → understand page structure
browser_take_screenshot → screenshots/{test-id}/00-initial-state.png
```
3. **For each identified element:**
- Locate element using accessibility tree or selectors
- Capture element screenshot
- Save to `screenshots/{test-id}/elements/{element-name}.png`
4. **Handle element states** (if applicable)
- Default state
- Hover state (if interactive)
- Focus state (if input)
- Error state (if validation element)
### Phase 3: Generate Element Reference
Create an element reference section:
```markdown
## Element Visual Reference
| Element | Screenshot | Location | Test Case |
|---------|------------|----------|-----------|
| Email field |  | Login form | TC-001 Step 2 |
| Password field |  | Login form | TC-001 Step 3 |
| Login button |  | Form footer | TC-001 Step 4 |
| Forgot password |  | Below form | TC-002 Step 1 |
```
### Phase 4: Update Documentation (if --update)
1. **Create elements directory**
```
qa-tests/screenshots/{test-id}/elements/
```
2. **Insert Element Reference section** after Metadata
3. **Add inline screenshots** to test steps (optional)
```markdown
| 2 | Enter "test@example.com" in **Email field**  | Email accepted | ☐ | |
```
4. **Update Screenshots section** in test document
## Output
### Without --update
```
📋 QA Test Analysis: QA-20250105-001-login.md
URL: https://staging.example.com/login
Test Cases: 3 | Edge Cases: 2
🔍 Elements Identified:
TC-001: User Login Flow
├── Email field (input)
├── Password field (input)
└── Login button (button)
TC-002: Forgot Password
└── Forgot password link (link)
EC-001: Invalid Credentials
└── Error message (alert)
📸 Screenshots Captured:
screenshots/QA-20250105-001/
├── 00-initial-state.png
└── elements/
├── email-field.png
├── password-field.png
├── login-button.png
├── forgot-password-link.png
└── error-message.png
💡 Run with --update to add these to the QA test document
```
### With --update
```
📋 QA Test Enriched: QA-20250105-001-login.md
✅ Added Element Visual Reference section
✅ Captured 5 element screenshots
✅ Updated Screenshots metadata
Modified: qa-tests/active/QA-20250105-001-login.md
Created: qa-tests/screenshots/QA-20250105-001/elements/
```
## Element Detection Patterns
The command scans for these patterns:
| Pattern | Example | Element Type |
|---------|---------|--------------|
| `**Name** button` | Click **Login** button | button |
| `**Name** field` | Enter in **Email** field | input |
| `**Name** link` | Click **Forgot password** link | link |
| `**Name** dropdown` | Select from **Country** dropdown | select |
| `**Name** checkbox` | Check **Remember me** checkbox | checkbox |
| `**Name** icon` | Click **menu** icon | button/icon |
| `**Name** tab` | Select **Settings** tab | tab |
| `**Name** modal` | Close **confirmation** modal | dialog |
| `"Name"` in quotes | Click "Submit" | inferred |
## Error Handling
```
⚠️ Element not found: "Premium badge"
Possible reasons:
- Element requires login/authentication
- Element loads dynamically
- Element name doesn't match visible text
Skipping this element. Capture manually if needed.
❌ Could not navigate to URL
Check that the URL is accessible and try again.
⚠️ Some elements require interaction to appear
The following were not captured:
- Error message (appears after form submission)
- Success toast (appears after action)
Consider capturing these during manual test execution.
```
## Integration with Skills
This command uses:
- `qa-element-extraction` - Element identification patterns
- `qa-screenshot-management` - Screenshot naming and organization
- `qa-test-management` - Test file structure
## Example Workflow
```bash
# 1. Create a QA test
/create-qa-test user-login --url https://staging.example.com/login
# 2. Write test cases manually or with qa-tester agent
# 3. Enrich with element screenshots
/enrich-qa-test qa-tests/active/QA-20250105-001-user-login.md --update
# 4. Review enriched documentation
cat qa-tests/active/QA-20250105-001-user-login.md
```
## Related Commands
- `/create-qa-test` - Create new QA test procedure
- `/list-qa-tests` - List existing QA tests
## Related Skills
- `qa-element-extraction` - Element identification methodology
- `qa-screenshot-management` - Screenshot organization standardsRelated Skills
qa-testing-methodology
QA test design patterns (equivalence partitioning, boundary analysis, accessibility). Auto-loads when designing test cases, planning test coverage, or writing test procedures.
qa-test-management
Automatic QA test lifecycle management, naming conventions, and directory structure. Use when creating, organizing, or tracking QA tests to ensure proper naming, directory structure, and status transitions.
list-qa-tests
List QA test procedures with status and priority
create-qa-test
Create a new QA test procedure for a feature
zod
Zod schema validation patterns and type inference. Auto-loads when validating schemas, parsing data, validating forms, checking types at runtime, or using z.object/z.string/z.infer in TypeScript.
typescript-import-style
Merge-friendly import formatting (one-per-line, alphabetical). Auto-loads when writing TypeScript/JavaScript imports to minimize merge conflicts in parallel development. Enforces consistent grouping and sorting.
setup-mcp-auth
Configure authentication for an existing FastMCP server
fastmcp
FastMCP TypeScript framework patterns for MCP servers. Auto-loads when building MCP servers, creating tools/resources/prompts, implementing authentication, configuring transports, or working with FastMCP in TypeScript.
add-mcp-tool
Add a new tool to an existing FastMCP server with guided configuration
add-mcp-resource
Add a new resource or resource template to an existing FastMCP server
plan-with-team
Validate plan file ownership
privacy-compliance
GDPR, CCPA, and privacy compliance guidance for data protection. Use when handling personal data, implementing consent management, or ensuring regulatory compliance across jurisdictions.