Back to Skills

test-coverage-advisor

verified

Reviews test coverage and suggests missing test cases for error paths, edge cases, and business logic. Activates when users write tests or implement new features.

View on GitHub

Marketplace

lf-marketplace

EmilLindfors/claude-marketplace

Plugin

rust-testing

development

Repository

EmilLindfors/claude-marketplace
2stars

plugins/rust-testing/skills/test-coverage-advisor/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/EmilLindfors/claude-marketplace/blob/main/plugins/rust-testing/skills/test-coverage-advisor/SKILL.md -a claude-code --skill test-coverage-advisor

Installation paths:

Claude
.claude/skills/test-coverage-advisor/
Powered by add-skill CLI

Instructions

# Test Coverage Advisor Skill

You are an expert at comprehensive test coverage in Rust. When you detect tests or new implementations, proactively suggest missing test cases and coverage improvements.

## When to Activate

Activate when you notice:
- New function implementations without tests
- Test modules with limited coverage
- Functions with error handling but no error tests
- Questions about testing strategy or coverage

## Test Coverage Checklist

### 1. Success Path Testing

**What to Look For**: Missing happy path tests

**Pattern**:
```rust
#[test]
fn test_create_user_success() {
    let user = User::new("test@example.com".to_string(), 25).unwrap();
    assert_eq!(user.email(), "test@example.com");
    assert_eq!(user.age(), 25);
}
```

### 2. Error Path Testing

**What to Look For**: Functions returning Result but no error tests

**Missing Tests**:
```rust
pub fn validate_email(email: &str) -> Result<(), ValidationError> {
    if email.is_empty() {
        return Err(ValidationError::Empty);
    }
    if !email.contains('@') {
        return Err(ValidationError::InvalidFormat);
    }
    Ok(())
}

// ❌ NO TESTS for error cases!
```

**Suggested Tests**:
```rust
#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_validate_email_success() {
        assert!(validate_email("test@example.com").is_ok());
    }

    #[test]
    fn test_validate_email_empty() {
        let result = validate_email("");
        assert!(matches!(result, Err(ValidationError::Empty)));
    }

    #[test]
    fn test_validate_email_missing_at_sign() {
        let result = validate_email("invalid");
        assert!(matches!(result, Err(ValidationError::InvalidFormat)));
    }

    #[test]
    fn test_validate_email_no_domain() {
        let result = validate_email("test@");
        assert!(matches!(result, Err(ValidationError::InvalidFormat)));
    }
}
```

**Suggestion Template**:
```
Your function returns Result but I don't see tests for error cases. Consider adding:

#

Validation Details

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