ryderfreeman4logos/cli-sub-agent/csa-test-gen

Claude Code and agent skill by ryderfreeman4logos/cli-sub-agent

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Comprehensive test design for Rust projects following Core-first TDD and test pyramid principles

Install

npx vskill@latest install ryderfreeman4logos/cli-sub-agent/csa-test-gen

SKILL.md

Test Generation & TDD Excellence

Comprehensive test design for Rust projects following Core-first TDD and test pyramid principles.

Core-First TDD Workflow

Always test pure logic BEFORE UI:

1. Write pure logic in core/ or domain/ module
2. Write unit tests for core logic
3. Verify all tests pass
4. Only THEN implement UI layer

Test Pyramid

Target: 70% unit, 20% integration, 10% E2E

Unit Test Template (Rust)

rust
#[cfg(test)]
mod tests {
use super::*;
// Naming: test_<function>_<scenario>_<expected>
#[test]
fn test_parse_valid_input_returns_expected() {
// Arrange
let input = "valid_input";
// Act
let result = parse(input);
// Assert
assert_eq!(result, expected_value);
}
#[test]
fn test_parse_empty_input_returns_error() {
let result = parse("");
assert!(result.is_err());
}
}

Test Categories

CategoryFocusExample
Happy PathTypical valid inputparse("valid") -> Ok(value)
BoundaryEmpty, null, min, max, +/-1parse("") -> Err(...)
ErrorInvalid input, not found, deniedparse("@#$") -> Err(...)
ConcurrentRace conditions, deadlockMultiple tasks with shared state

Mocking Strategy

rust
// Define trait abstraction
pub trait UserRepository {
fn find(&self, id: &str) -> Option<User>;
}
// Test mock
#[cfg(test)]
struct MockUserRepository {
users: HashMap<String, User>,
}
#[cfg(test)]
impl UserRepository for MockUserRepository {
fn find(&self, id: &str) -> Option<User> {
self.users.get(id).cloned()
}
}

Property-Based Testing

rust
use proptest::prelude::*;
proptest! {
#[test]
fn prop_serialize_roundtrip(value in any::<MyType>()) {
let serialized = serde_json::to_string(&value).unwrap();
let deserialized: MyType = serde_json::from_str(&serialized).unwrap();
prop_assert_eq!(value, deserialized);
}
}

Fuzzing

rust
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
if let Ok(input) = std::str::from_utf8(data) {
let _ = parse(input); // Should never panic
}
});

Test Checklist

  • [ ] Happy path cases covered
  • [ ] All boundary conditions tested
  • [ ] Error handling verified
  • [ ] Clear, descriptive test names
  • [ ] No test interdependencies (order-independent)
  • [ ] Mocks isolate external dependencies
  • [ ] Assertions verify meaningful state
  • [ ] Async tests with #[tokio::test]
  • [ ] Tests self-clean (no fixtures left behind)
  • [ ] Fast execution (<100ms per unit test)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ryderfreeman4logos/cli-sub-agent/csa-test-gen/badge)](https://verified-skill.com/skills/ryderfreeman4logos/cli-sub-agent/csa-test-gen)

Something wrong with this skill or its page? Tell us.