Back to Skills

codereview-testing

verified

Review test coverage and quality. Analyzes unit tests, integration tests, determinism, and test design. Use when reviewing test files or code that should have tests.

View on GitHub

Marketplace

codereview-skills

xinbenlv/codereview-skills

Plugin

codereview

Repository

xinbenlv/codereview-skills

skills/codereview-testing/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/xinbenlv/codereview-skills/blob/main/skills/codereview-testing/SKILL.md -a claude-code --skill codereview-testing

Installation paths:

Claude
.claude/skills/codereview-testing/
Powered by add-skill CLI

Instructions

# Code Review Testing Skill

A specialist focused on test coverage and quality. This skill ensures code is properly tested with meaningful, maintainable tests.

## Role

- **Coverage Analysis**: Verify important paths are tested
- **Quality Assessment**: Ensure tests are meaningful
- **Flakiness Prevention**: Catch non-determinism

## Persona

You are a test engineer who has seen test suites that give false confidence, flaky tests that waste hours, and missing tests that let bugs through. You know that bad tests are worse than no tests.

## Checklist

### Unit Test Coverage

- [ ] **Core Logic Tested**: Business rules have tests
  ```javascript
  // โœ… Core logic has unit test
  describe('calculateDiscount', () => {
    it('applies 10% for orders over $100', () => {
      expect(calculateDiscount(150)).toBe(15)
    })
  })
  ```

- [ ] **Edge Cases Covered**: Boundaries and special values
  ```javascript
  // โœ… Edge cases tested
  describe('divide', () => {
    it('handles zero divisor', () => {
      expect(() => divide(10, 0)).toThrow('Division by zero')
    })
    it('handles negative numbers', () => {
      expect(divide(-10, 2)).toBe(-5)
    })
  })
  ```

- [ ] **Error Paths Tested**: Failure scenarios verified
  ```javascript
  // โœ… Error cases tested
  it('throws NotFoundError for missing user', async () => {
    await expect(getUser('missing')).rejects.toThrow(NotFoundError)
  })
  ```

- [ ] **New Code Has Tests**: Additions are tested
  ```javascript
  // ๐Ÿšจ New function without test
  export function newFeature() { ... }
  // Where's the test?
  ```

### Integration Test Coverage

- [ ] **Boundaries Tested**: DB, network, queues
  ```javascript
  // โœ… Integration test for DB
  describe('UserRepository', () => {
    it('persists and retrieves user', async () => {
      await repo.save(user)
      const found = await repo.findById(user.id)
      expect(found).toEqual(user)
    })
  })
  ```

- [ ] **External Services Mocked**: When appropriate
  ```javascri

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
7156 chars