chunking-strategy
Provides chunking strategies for RAG systems. Generates chunk size recommendations (256-1024 tokens), overlap percentages…
Provides patterns for unit testing service layer with Mockito. Creates isolated tests that mock repository calls, verify method invocations, test exception scenarios, and stub external API responses. Use when testing service behaviors and business logic without database or
Claude Code
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer --agent claude-code
Codex
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer -a codex -y
Cursor
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer -a cursor -y
Gemini CLI
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer -a gemini-cli -y
GitHub Copilot
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer -a github-copilot -y
OpenCode
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer -a opencode -y
Windsurf
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer -a windsurf -y
name: unit-test-service-layer description: Provides patterns for unit testing service layer with Mockito. Creates isolated tests that mock repository calls, verify method invocations, test exception scenarios, and stub external API responses. Use when testing service behaviors and business logic without database or external services. allowed-tools: Read, Write, Bash, Glob, Grep
Provides patterns for unit testing `@Service` classes using Mockito. Mocks repository calls, verifies method invocations, tests exception scenarios, and stubs external API responses. Enables fast, isolated tests without Spring container or database.
Follow this workflow to test service layer with Mockito, including validation checkpoints:
Use `@ExtendWith(MockitoExtension.class)` to enable Mockito annotations.
Use `@Mock` for dependencies (repositories, clients) and `@InjectMocks` for the service under test.
**Arrange**: Create test data and configure mock return values using `when().thenReturn()`.
**Act**: Execute the service method being tested.
**Assert**:
Configure mocks to throw exceptions with `when().thenThrow()`.
**Validation checkpoint**: Verify exception type and message
@ExtendWith(MockitoExtension.class)
class UserServiceTest {
@Mock
private UserRepository userRepository;
@InjectMocks
private UserService userService;
@Test
void shouldReturnUserWhenFound() {
// Arrange
User expected = new User(1L, "Alice");
when(userRepository.findById(1L)).thenReturn(Optional.of(expected));
// Act
User result = userService.getUser(1L);
// Assert
assertThat(result.getName()).isEqualTo("Alice");
verify(userRepository).findById(1L);
}
@Test
void shouldThrowWhenUserNotFound() {
// Arrange
when(userRepository.findById(999L)).thenReturn(Optional.empty());
// Act & Assert
assertThatThrownBy(() -> userService.getUser(999L))
.isInstanceOf(UserNotFoundException.class);
}
}@Test
void shouldSendEmailOnUserCreation() {
User newUser = new User(1L, "Alice", "alice@example.com");
when(userRepository.save(any(User.class))).thenReturn(newUser);
enrichmentService.registerNewUser("Alice", "alice@example.com");
verify(userRepository).save(any(User.class));
verify(emailService).sendWelcomeEmail("alice@example.com");
}For additional patterns (multiple dependencies, argument captors, async services, InOrder verification), see `references/examples.md`.
Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI.
Provides chunking strategies for RAG systems. Generates chunk size recommendations (256-1024 tokens), overlap percentages…
Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection, chain-of-thought…
Implements document chunking, embedding generation, vector storage, and retrieval pipelines for Retrieval-Augmented Generation…
Provides AWS CloudFormation patterns for Auto Scaling including EC2, ECS, and Lambda. Use when creating Auto Scaling groups,…
Provides AWS CloudFormation patterns for Amazon Bedrock resources including agents, knowledge bases, data sources, guardrails,…
Provides AWS CloudFormation patterns for CloudFront distributions, origins (ALB, S3, Lambda@Edge, VPC Origins), CacheBehaviors,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.