Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add ValorVie/custom-skills --skill "test-coverage-assistant"
Install specific skill from multi-skill repository
# Description
|
# SKILL.md
name: test-coverage-assistant
scope: partial
description: |
Evaluate test completeness using the 8 dimensions framework.
Use when: writing tests, reviewing test coverage, ensuring test quality.
Keywords: test coverage, completeness, dimensions, 8 dimensions, test quality, AI test quality, ๆธฌ่ฉฆ่ฆ่, ๆธฌ่ฉฆๅฎๆดๆง, ๅ
ซ็ถญๅบฆ.
Test Coverage Assistant
Language: English | ็น้ซไธญๆ
Version: 1.1.1
Last Updated: 2026-01-30
Applicability: Claude Code Skills
Purpose
This skill helps evaluate and improve test completeness using the 8 dimensions framework, ensuring comprehensive test coverage for each feature.
Quick Reference
The 8 Dimensions
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Test Completeness = 8 Dimensions โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1. Happy Path Normal expected behavior โ
โ 2. Boundary Min/max values, limits โ
โ 3. Error Handling Invalid input, exceptions โ
โ 4. Authorization Role-based access control โ
โ 5. State Changes Before/after verification โ
โ 6. Validation Format, business rules โ
โ 7. Integration Real query verification โ
โ 8. AI Generation AI-generated test quality (NEW) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Dimension Summary Table
| # | Dimension | What to Test | Key Question |
|---|---|---|---|
| 1 | Happy Path | Valid input โ expected output | Does the normal flow work? |
| 2 | Boundary | Min/max values, limits | What happens at edges? |
| 3 | Error Handling | Invalid input, not found | How do errors behave? |
| 4 | Authorization | Role permissions | Who can do what? |
| 5 | State Changes | Before/after states | Did the state change correctly? |
| 6 | Validation | Format, business rules | Is input validated? |
| 7 | Integration | Real DB/API calls | Does the query really work? |
| 8 | AI Generation | AI-generated test quality | Are AI tests meaningful? |
When to Apply Each Dimension
| Feature Type | Required Dimensions |
|---|---|
| CRUD API | 1, 2, 3, 4, 6, 7, 8* |
| Query/Search | 1, 2, 3, 4, 7, 8* |
| State Machine | 1, 3, 4, 5, 6, 8* |
| Validation Logic | 1, 2, 3, 6, 8* |
| Background Job | 1, 3, 5, 8* |
| External Integration | 1, 3, 7, 8* |
*Dimension 8 (AI Generation Quality) applies when tests are AI-generated
Test Design Checklist
Use this checklist for each feature:
Feature: ___________________
โก Happy Path
โก Valid input produces expected success
โก Correct data is returned/created
โก Side effects occur as expected
โก Boundary Conditions
โก Minimum valid value
โก Maximum valid value
โก Empty collection
โก Single item collection
โก Large collection (if applicable)
โก Error Handling
โก Invalid input format
โก Missing required fields
โก Duplicate/conflict scenarios
โก Not found scenarios
โก External service failure (if applicable)
โก Authorization
โก Each permitted role tested
โก Each denied role tested
โก Unauthenticated access tested
โก Cross-boundary access tested
โก State Changes
โก Initial state verified
โก Final state verified
โก All valid state transitions tested
โก Validation
โก Format validation (email, phone, etc.)
โก Business rule validation
โก Cross-field validation
โก Integration (if UT uses wildcards)
โก Query predicates verified
โก Entity relationships verified
โก Pagination verified
โก Sorting/filtering verified
โก AI Generation Quality (if AI-generated)
โก Tests verify meaningful behavior
โก Assertions are specific (not just "not null")
โก Tests are independent and self-contained
โก Mutation score > 80% (if evaluated)
Detailed Guidelines
For complete standards, see:
- Test Completeness Dimensions
- Testing Standards
AI-Optimized Format (Token-Efficient)
For AI assistants, use the YAML format files for reduced token usage:
- Base standard: ai/standards/test-completeness-dimensions.ai.yaml
Examples
1. Happy Path
[Fact]
public async Task CreateUser_WithValidData_ReturnsSuccess()
{
// Arrange
var request = new CreateUserRequest
{
Username = "newuser",
Email = "[email protected]"
};
// Act
var result = await _service.CreateUserAsync(request);
// Assert
result.Success.Should().BeTrue();
result.Data.Username.Should().Be("newuser");
}
2. Boundary
[Theory]
[InlineData(0, false)] // Below minimum
[InlineData(1, true)] // Minimum valid
[InlineData(100, true)] // Maximum valid
[InlineData(101, false)] // Above maximum
public void ValidateQuantity_BoundaryValues_ReturnsExpected(
int quantity, bool expected)
{
var result = _validator.IsValidQuantity(quantity);
result.Should().Be(expected);
}
4. Authorization
[Fact]
public async Task DeleteUser_AsAdmin_Succeeds()
{
var adminContext = CreateContext(role: "Admin");
var result = await _service.DeleteUserAsync(userId, adminContext);
result.Success.Should().BeTrue();
}
[Fact]
public async Task DeleteUser_AsMember_ReturnsForbidden()
{
var memberContext = CreateContext(role: "Member");
var result = await _service.DeleteUserAsync(userId, memberContext);
result.ErrorCode.Should().Be("FORBIDDEN");
}
5. State Changes
[Fact]
public async Task DisableUser_UpdatesStateCorrectly()
{
// Arrange
var user = await CreateEnabledUser();
user.IsEnabled.Should().BeTrue(); // Verify initial state
// Act
await _service.DisableUserAsync(user.Id);
// Assert
var updatedUser = await _repository.GetByIdAsync(user.Id);
updatedUser.IsEnabled.Should().BeFalse(); // Verify final state
}
Authorization Matrix Template
Create a matrix for each feature:
| Operation | Admin | Manager | Member | Guest |
|---|---|---|---|---|
| Create | โ | โ | โ | โ |
| Read All | โ | โ ๏ธ Scoped | โ | โ |
| Update | โ | โ ๏ธ Own dept | โ | โ |
| Delete | โ | โ | โ | โ |
Each cell should have a corresponding test case.
Anti-Patterns to Avoid
- โ Testing only happy path
- โ Missing authorization tests for multi-role systems
- โ Not verifying state changes
- โ Using wildcards in UT without corresponding IT
- โ Same values for ID and business identifier in test data
- โ Testing implementation details instead of behavior
- โ Accepting AI-generated tests without review
- โ Assuming high line coverage means effective tests
Configuration Detection
This skill supports project-specific configuration.
Detection Order
- Check
CONTRIBUTING.mdfor "Testing Standards" section - Check for existing test patterns in the codebase
- If not found, default to all 8 dimensions (dimension 8 only when tests are AI-generated)
First-Time Setup
If no configuration found:
- Suggest: "This project hasn't configured test completeness requirements. Would you like to customize which dimensions are required?"
- Suggest documenting in
CONTRIBUTING.md:
## Test Completeness
We use the 8 Dimensions framework for test coverage.
### Required Dimensions by Feature Type
- API endpoints: All 8 dimensions (8 only when AI-generated)
- Utility functions: Dimensions 1, 2, 3, 6, 8*
- Background jobs: Dimensions 1, 3, 5, 8*
*Dimension 8 applies when tests are AI-generated
Related Standards
Version History
| Version | Date | Changes |
|---|---|---|
| 1.1.0 | 2026-01-25 | Updated: 7 dimensions โ 8 dimensions (added AI Generation Quality) |
| 1.0.0 | 2025-12-30 | Initial release |
License
This skill is released under CC BY 4.0.
Source: universal-dev-standards
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.