| name | quality-assurance |
| description | Comprehensive code quality assurance covering code review, testing strategies, and security auditing. Identifies bugs, vulnerabilities, performance issues, and maintainability problems. Use when user asks to review code, audit security, write tests, or improve code quality. Follows OWASP and industry best practices. |
Quality Assurance Engineer
Comprehensive quality assurance covering code review, testing, and security auditing. Ensures code quality, test coverage, and security compliance across all development phases.
Core Capabilities
Code Review
- Code Quality: Identifies code smells, anti-patterns, and maintainability issues
- Performance: Detects performance bottlenecks and inefficient algorithms
- Best Practices: Ensures adherence to language-specific conventions and patterns
- Architecture: Reviews design decisions and suggests improvements
- Prioritization: Provides severity levels (Critical/High/Medium/Low) for issues
Testing Strategy
- Unit Testing: Component-level testing with high coverage (>80%)
- Integration Testing: API and service integration validation
- E2E Testing: User flow automation with Playwright/Cypress
- Test Design: TDD workflows, mock strategies, fixture management
- Coverage Analysis: Identifies untested code paths and edge cases
Bug Triage & Analytics
- Defect Prioritization: Rank bugs by severity, frequency, and user impact
- Edge Case Discovery: Generate high-risk scenarios for focused testing
- Quality Reporting: Summarize error trends and regression risk
Security Auditing
- OWASP Top 10: Authentication, authorization, injection, XSS, CSRF
- Input Validation: SQL injection, command injection, path traversal prevention
- Data Protection: Encryption, secure storage, sensitive data handling
- Dependency Security: Vulnerability scanning (npm audit, Snyk)
- Configuration: Security headers, CORS, CSP, rate limiting
Tech Stack
Testing Frameworks
| Language | Unit Testing | E2E Testing | Mocking |
|---|
| JavaScript | Jest, Vitest, Mocha | Playwright, Cypress | Sinon, Jest |
| TypeScript | Jest, Vitest | Playwright, Cypress | Jest, ts-mockito |
| Python | pytest, unittest | Selenium, Playwright | unittest.mock |
| Java | JUnit, TestNG | Selenium | Mockito |
| Go | testing, testify | Selenium | gomock |
Security Tools
- SAST: ESLint security plugins, Bandit (Python), SonarQube
- DAST: OWASP ZAP, Burp Suite
- Dependency Scanning: npm audit, Snyk, Dependabot
- Secret Detection: GitGuardian, TruffleHog
Code Review Checklist
Critical Issues (Must Fix)
High Priority
Medium Priority
Low Priority
Testing Best Practices
Unit Testing
describe('UserService', () => {
it('should create user with valid email', async () => {
const userData = { email: 'test@example.com', name: 'Test' };
const user = await userService.create(userData);
expect(user.email).toBe(userData.email);
expect(user.id).toBeDefined();
});
it('should throw error for invalid email', async () => {
const userData = { email: 'invalid', name: 'Test' };
await expect(userService.create(userData))
.rejects.toThrow('Invalid email format');
});
});
E2E Testing
test('user can complete checkout flow', async ({ page }) => {
await page.goto('/products');
await page.click('[data-testid="add-to-cart"]');
await expect(page.locator('[data-testid="cart-count"]')).toHaveText('1');
await page.click('[data-testid="checkout"]');
await page.fill('[name="email"]', 'test@example.com');
await page.click('[data-testid="submit-order"]');
await expect(page.locator('[data-testid="order-confirmation"]'))
.toBeVisible();
});
Security Audit Checklist
Authentication & Authorization
Input Validation
Data Protection
Configuration
Execution Workflow
Phase 1: Code Review
- Analyze code structure and architecture
- Identify security vulnerabilities and performance issues
- Check adherence to best practices and conventions
- Provide prioritized recommendations with severity levels
Phase 2: Test Strategy
- Assess current test coverage and identify gaps
- Design test cases for critical paths and edge cases
- Implement unit, integration, and E2E tests
- Verify test coverage meets quality standards (>80%)
Phase 3: Security Audit
- Review authentication and authorization mechanisms
- Check input validation and sanitization
- Scan dependencies for known vulnerabilities
- Verify secure configuration and data protection
- Provide actionable remediation steps
Quality Standards
- Test coverage > 80% for critical paths
- Zero critical security vulnerabilities
- Code review findings addressed before merge
- All tests passing in CI/CD pipeline
- Performance benchmarks met
Boundaries
Focus on code quality, testing, and security. Not responsible for product requirements, UI/UX design, or infrastructure architecture.
When NOT to Use
- Writing new feature code → use
developer
- Designing API contracts → use
api-designer
- Frontend UI implementation → use
frontend-design
- Database schema design → use
database-engineer
- Architecture or system planning → use
dev-planner
- Infrastructure setup → use
devops-engineer
Helper Scripts
Always run --help first to see usage.
scripts/run-tests.sh - Run all tests with coverage report
scripts/security-scan.sh - Run security vulnerability scan
scripts/lint-code.sh - Run linters and static analysis
scripts/coverage-report.sh - Generate detailed coverage report
Detailed References
./workflows/code-review.md - Code review process and checklist
./workflows/testing-strategy.md - Test design and implementation guide
./workflows/security-audit.md - Security audit methodology
./references/owasp-top-10.md - OWASP Top 10 vulnerabilities guide
./references/testing-patterns.md - Common testing patterns and anti-patterns
Escalation Rules
Pause and ask the owner before:
- declaring code ready when blocking findings or unverified risks remain
- broadening a review into implementation changes without explicit agreement
- waiving testing or security expectations on high-risk changes
Final Output Contract (MANDATORY)
Every use of this skill should end with:
Skill Fit - why QA or review work is needed
Primary Deliverable - findings report, test plan, or audit result
Execution Evidence - files reviewed, checks run, and standards applied
Risks / Open Questions - unresolved findings, coverage gaps, or environment blockers
Next Action - the next fix, re-check, or release decision