core-tester

Comprehensive testing and quality assurance specialist for ensuring code quality through testing strategies

16 stars

Best use case

core-tester is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Comprehensive testing and quality assurance specialist for ensuring code quality through testing strategies

Teams using core-tester 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

$curl -o ~/.claude/skills/core-tester/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/testing-security/core-tester/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/core-tester/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How core-tester Compares

Feature / Agentcore-testerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Comprehensive testing and quality assurance specialist for ensuring code quality through testing strategies

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.

Related Guides

SKILL.md Source

# Core Tester Skill

> QA specialist focused on ensuring code quality through comprehensive testing strategies and validation techniques.

## Quick Start

```javascript
// Spawn tester agent
Task("Tester agent", "Create comprehensive tests for [feature]", "tester")

// Store test results
  action: "store",
  key: "swarm/tester/results",
  namespace: "coordination",
  value: JSON.stringify({ passed: 145, failed: 0, coverage: "87%" })
}
```

## When to Use

- Writing tests for new features (TDD)
- Creating integration tests for APIs
- Building E2E tests for user flows
- Performance testing critical paths
- Security testing authentication/authorization

## Prerequisites

- Test framework installed (Jest, Vitest, etc.)
- Understanding of feature requirements
- Access to implementation code
- Mock setup for external dependencies

## Core Concepts

### Test Pyramid

```
         /\
        /E2E\      <- Few, high-value
       /------\
      /Integr. \   <- Moderate coverage
     /----------\
    /   Unit     \ <- Many, fast, focused
   /--------------\
```

### Test Quality Metrics

| Metric | Target | Description |
|--------|--------|-------------|
| Statements | >80% | Line coverage |
| Branches | >75% | Decision coverage |
| Functions | >80% | Function coverage |
| Lines | >80% | Total line coverage |

### Test Characteristics (FIRST)

- **Fast**: Tests should run quickly (<100ms for unit tests)
- **Isolated**: No dependencies between tests
- **Repeatable**: Same result every time
- **Self-validating**: Clear pass/fail
- **Timely**: Written with or before code

## Implementation Pattern

### Unit Tests

```typescript
describe('UserService', () => {
  let service: UserService;
  let mockRepository: jest.Mocked<UserRepository>;

  beforeEach(() => {
    mockRepository = createMockRepository();
    service = new UserService(mockRepository);
  });

  describe('createUser', () => {
    it('should create user with valid data', async () => {
      const userData = { name: 'John', email: 'john@example.com' };
      mockRepository.save.mockResolvedValue({ id: '123', ...userData });

      const result = await service.createUser(userData);

      expect(result).toHaveProperty('id');
      expect(mockRepository.save).toHaveBeenCalledWith(userData);
    });

    it('should throw on duplicate email', async () => {
      mockRepository.save.mockRejectedValue(new DuplicateError());

      await expect(service.createUser(userData))
        .rejects.toThrow('Email already exists');
    });
  });
});
```

### Integration Tests

```typescript
describe('User API Integration', () => {
  let app: Application;
  let database: Database;

  beforeAll(async () => {
    database = await setupTestDatabase();
    app = createApp(database);
  });

  afterAll(async () => {
    await database.close();
  });

  it('should create and retrieve user', async () => {
    const response = await request(app)
      .post('/users')
      .send({ name: 'Test User', email: 'test@example.com' });

    expect(response.status).toBe(201);
    expect(response.body).toHaveProperty('id');

    const getResponse = await request(app)
      .get(`/users/${response.body.id}`);

    expect(getResponse.body.name).toBe('Test User');
  });
});
```

### E2E Tests

```typescript
describe('User Registration Flow', () => {
  it('should complete full registration process', async () => {
    await page.goto('/register');

    await page.fill('[name="email"]', 'newuser@example.com');
    await page.fill('[name="password"]', 'SecurePass123!');
    await page.click('button[type="submit"]');

    await page.waitForURL('/dashboard');
    expect(await page.textContent('h1')).toBe('Welcome!');
  });
});
```

### Edge Case Testing

```typescript
describe('Edge Cases', () => {
  // Boundary values
  it('should handle maximum length input', () => {
    const maxString = 'a'.repeat(255);
    expect(() => validate(maxString)).not.toThrow();
  });

  // Empty/null cases
  it('should handle empty arrays gracefully', () => {
    expect(processItems([])).toEqual([]);
  });

  // Error conditions
  it('should recover from network timeout', async () => {
    jest.setTimeout(10000);
    mockApi.get.mockImplementation(() =>
      new Promise(resolve => setTimeout(resolve, 5000))
    );

    await expect(service.fetchData()).rejects.toThrow('Timeout');
  });

  // Concurrent operations
  it('should handle concurrent requests', async () => {
    const promises = Array(100).fill(null)
      .map(() => service.processRequest());

    const results = await Promise.all(promises);
    expect(results).toHaveLength(100);
  });
});
```

## Configuration

### Performance Testing

```typescript
describe('Performance', () => {
  it('should process 1000 items under 100ms', async () => {
    const items = generateItems(1000);

    const start = performance.now();
    await service.processItems(items);
    const duration = performance.now() - start;

    expect(duration).toBeLessThan(100);
  });

  it('should handle memory efficiently', () => {
    const initialMemory = process.memoryUsage().heapUsed;

    // Process large dataset
    processLargeDataset();
    global.gc(); // Force garbage collection

    const finalMemory = process.memoryUsage().heapUsed;
    const memoryIncrease = finalMemory - initialMemory;

    expect(memoryIncrease).toBeLessThan(50 * 1024 * 1024); // <50MB
  });
});
```

### Security Testing

```typescript
describe('Security', () => {
  it('should prevent SQL injection', async () => {
    const maliciousInput = "'; DROP TABLE users; --";

    const response = await request(app)
      .get(`/users?name=${maliciousInput}`);

    expect(response.status).not.toBe(500);
    // Verify table still exists
    const users = await database.query('SELECT * FROM users');
    expect(users).toBeDefined();
  });

  it('should sanitize XSS attempts', () => {
    const xssPayload = '<script>alert("XSS")</script>';
    const sanitized = sanitizeInput(xssPayload);

    expect(sanitized).not.toContain('<script>');
    expect(sanitized).toBe('&lt;script&gt;alert("XSS")&lt;/script&gt;');
  });
});
```

## Usage Examples

### Example 1: TDD Workflow

```typescript
// Step 1: Write failing test
describe('calculateDiscount', () => {
  it('should return 10% discount for users with 10+ purchases', () => {
    const user = { purchases: 15 };
    expect(calculateDiscount(user)).toBe(0.1);
  });
});

// Step 2: Run test (fails)
// Step 3: Implement minimal code
function calculateDiscount(user) {
  return user.purchases >= 10 ? 0.1 : 0;
}

// Step 4: Run test (passes)
// Step 5: Refactor if needed
```

### Example 2: Complete Test Suite

```typescript
/**
 * @test User Registration
 * @description Validates the complete user registration flow
 * @prerequisites
 *   - Database is empty
 *   - Email service is mocked
 * @steps
 *   1. Submit registration form with valid data
 *   2. Verify user is created in database
 *   3. Check confirmation email is sent
 *   4. Validate user can login
 * @expected User successfully registered and can access dashboard
 */
describe('User Registration', () => {
  it('should register user successfully', async () => {
    // Implementation
  });
});
```

## Execution Checklist

- [ ] Identify test scenarios from requirements
- [ ] Write unit tests for new functions
- [ ] Create integration tests for APIs
- [ ] Add E2E tests for critical flows
- [ ] Test edge cases and error scenarios
- [ ] Verify security (SQL injection, XSS)
- [ ] Run performance tests
- [ ] Check coverage meets targets (>80%)
- [ ] Store results in memory
- [ ] Report to reviewer

## Best Practices

1. **Test First**: Write tests before implementation (TDD)
2. **One Assertion**: Each test should verify one behavior
3. **Descriptive Names**: Test names should explain what and why
4. **Arrange-Act-Assert**: Structure tests clearly
5. **Mock External Dependencies**: Keep tests isolated
6. **Test Data Builders**: Use factories for test data
7. **Avoid Test Interdependence**: Each test should be independent
8. **Report Results**: Always share test results via memory

## Error Handling

| Scenario | Recovery |
|----------|----------|
| Test timeout | Increase timeout or optimize test |
| Flaky test | Add retries or fix race condition |
| Mock failure | Verify mock setup |
| Coverage gap | Add missing tests |

## Metrics & Success Criteria

- All tests passing
- Coverage >80%
- No flaky tests
- Performance within targets
- Security tests passing
- Results stored in memory

## Integration Points

### MCP Tools

```javascript
// Report test status
  action: "store",
  key: "swarm/tester/status",
  namespace: "coordination",
  value: JSON.stringify({
    agent: "tester",
    status: "running tests",
    test_suites: ["unit", "integration", "e2e"],
    timestamp: Date.now()
  })
}

// Share test results
  action: "store",
  key: "swarm/shared/test-results",
  namespace: "coordination",
  value: JSON.stringify({
    passed: 145,
    failed: 2,
    coverage: "87%",
    failures: ["auth.test.ts:45", "api.test.ts:123"]
  })
}

// Check implementation status
  action: "retrieve",
  key: "swarm/coder/status",
  namespace: "coordination"
}
```

### Performance Testing

```javascript
// Run performance benchmarks
  type: "test",
  iterations: 100
}

// Monitor test execution
  format: "detailed"
}
```

### Hooks

```bash
# Pre-execution
echo "🧪 Tester agent validating: $TASK"
if [ -f "jest.config.js" ] || [ -f "vitest.config.ts" ]; then
  echo "✓ Test framework detected"
fi

# Post-execution
echo "📋 Test results summary:"
npm test -- --reporter=json 2>/dev/null | jq '.numPassedTests, .numFailedTests' 2>/dev/null || echo "Tests completed"
```

### Related Skills

- [core-coder](../core-coder/SKILL.md) - Provides implementation to test
- [core-reviewer](../core-reviewer/SKILL.md) - Reviews test quality
- [core-researcher](../core-researcher/SKILL.md) - Provides edge cases
- [core-planner](../core-planner/SKILL.md) - Test planning

Remember: Tests are a safety net that enables confident refactoring and prevents regressions. Invest in good tests--they pay dividends in maintainability. Coordinate with other agents through memory.

---

## Version History

- **1.0.0** (2026-01-02): Initial release - converted from tester.md agent

Related Skills

devs:security-core

16
from diegosouzapw/awesome-omni-skill

Comprehensive application security expertise covering authentication, authorization, OWASP Top 10, and security best practices. Use when (1) Implementing authentication (JWT, OAuth2, sessions, OAuth for CLI/TUI/desktop apps), (2) Adding authorization (RBAC, ABAC, RLS with Supabase/PostgreSQL), (3) Security auditing code or infrastructure, (4) Setting up security infrastructure (headers, CORS, CSP, rate limiting), (5) Managing secrets and credentials, (6) Preventing OWASP Top 10 vulnerabilities (injection, XSS, CSRF, etc.), (7) Reviewing code for security issues, (8) Configuring secure web applications in TypeScript, Python, or Rust. Automatically triggered when working with authentication/authorization systems, security reviews, or addressing security vulnerabilities.

Axe-core Accessibility

16
from diegosouzapw/awesome-omni-skill

Automated accessibility testing with axe-core and WCAG 2.1 compliance

agent-penetration-tester

16
from diegosouzapw/awesome-omni-skill

Expert penetration tester specializing in ethical hacking, vulnerability assessment, and security testing. Masters offensive security techniques, exploit development, and comprehensive security assessments with focus on identifying and validating security weaknesses.

agent-accessibility-tester

16
from diegosouzapw/awesome-omni-skill

Expert accessibility tester specializing in WCAG compliance, inclusive design, and universal access. Masters screen reader compatibility, keyboard navigation, and assistive technology integration with focus on creating barrier-free digital experiences.

accessibility-tester

16
from diegosouzapw/awesome-omni-skill

Expert accessibility tester specializing in WCAG compliance, inclusive design, and universal access. Masters screen reader compatibility, keyboard navigation, and assistive technology integration with focus on creating barrier-free digital experiences.

acceptance-tester

16
from diegosouzapw/awesome-omni-skill

Execute systematic acceptance testing to verify implementations against acceptance criteria. Use this skill when tasks mention "驗收測試", "acceptance testing", "驗收", "validate implementation", or when Gherkin scenarios need to be executed.

typo3-core-contributions

16
from diegosouzapw/awesome-omni-skill

Use when analyzing TYPO3 Forge issues, submitting patches to Gerrit, or contributing documentation to TYPO3 Core.

V3 Core Implementation

16
from diegosouzapw/awesome-omni-skill

Core module implementation for claude-flow v3. Implements DDD domains, clean architecture patterns, dependency injection, and modular TypeScript codebase with comprehensive testing.

solid-core-rendering

16
from diegosouzapw/awesome-omni-skill

SolidJS rendering: render for client apps, hydrate for SSR, renderToString for server rendering, renderToStream for streaming, isServer checks.

rust-core

16
from diegosouzapw/awesome-omni-skill

Comprehensive Rust development expertise covering core principles, patterns, error handling, async programming, testing, and performance optimization. Use when working on Rust projects requiring guidance on: (1) Language fundamentals (ownership, lifetimes, borrowing), (2) Architectural decisions and design patterns, (3) Web development (Axum, Actix-web, Rocket), (4) AI/LLM integration, (5) CLI/TUI applications, (6) Desktop development with Tauri, (7) Async/await and concurrency, (8) Error handling strategies, (9) Testing and benchmarking, (10) Performance optimization, (11) Logging and observability, or (12) Code reviews and best practices.

python-core

16
from diegosouzapw/awesome-omni-skill

Create, write, build, debug, test, refactor, and optimize Python 3.10+ applications across all domains (data science, backend APIs, scripting, automation). Manage dependencies with uv (preferred), poetry, or pip. Implement type hints (typing module, generics, protocols), write tests with pytest (fixtures, parametrize, mocking), work with pandas DataFrames (creation, selection, groupby, merge), use dataclasses and decorators, handle errors with logging integration, and follow TDD workflows (Red-Green-Refactor). Configure virtual environments, pyproject.toml, and static analysis tools (mypy, pyright). Use when implementing Python features, fixing bugs, writing tests, managing packages, analyzing data, or building Python projects.

playwright-core

16
from diegosouzapw/awesome-omni-skill

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, assertions, fixtures, network mocking, auth flows, debugging, and framework recipes for React, Next.js, Vue, and Angular. TypeScript and JavaScript.