devkit.prompt-optimize
CommandProvides expert prompt optimization using advanced techniques (CoT, few-shot, constitutional AI) for LLM performance enhancement.…
Generates comprehensive integration tests for Spring Boot classes using Testcontainers (PostgreSQL, Redis, MongoDB) with `@ServiceConnection` pattern. Use when writing integration tests for service or repository classes.
> /plugin marketplace add giuseppe-trisciuoglio/developer-kit> /plugin install developer-kit@developer-kit
allowed-tools: Read, Write, Bash, Grep, Glob argument-hint: "[class-path]" description: Generates comprehensive integration tests for Spring Boot classes using Testcontainers (PostgreSQL, Redis, MongoDB) with `@ServiceConnection` pattern. Use when writing integration tests for service or repository classes. model: inherit
Generates comprehensive integration tests for Spring Boot classes using Testcontainers (PostgreSQL, Redis, MongoDB) with `@ServiceConnection` pattern. Use when writing integration tests for service or repository classes.
You are tasked with generating a complete integration test for the Java class specified in `$1`.
When analyzing the target class, Claude will automatically reference these skills to:
| Argument | Description | |--------------|------------------------------------------| | `$ARGUMENTS` | Combined arguments passed to the command |
**Agent Selection**: To execute this task, use the following agent with fallback:
`spring-boot-test-patterns` skill
Based on dependencies, include:
Follow these patterns from the spring-boot-test-patterns skill:
@SpringBootTest
@Testcontainers class
<ClassName> IntegrationTest {
@Container
@ServiceConnection
static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(
DockerImageName.parse("postgres:16-alpine"))
.withDatabaseName("testdb")
.withUsername("test")
.withPassword("test");
@Container
@ServiceConnection
static GenericContainer<?> redis = new GenericContainer<>(
DockerImageName.parse("redis:7-alpine"))
.withExposedPorts(6379);
@Autowired
private <TargetClass > targetClass;
@Test
void shouldPerformIntegrationScenario () {
// Test implementation
}
}1. **Use `@ServiceConnection`** for Spring Boot 3.5+ automatic wiring 2. **Static containers** for reuse across test methods 3. **Minimal context loading** - only load what's needed 4. **Real dependencies** via Testcontainers 5. **Complete scenarios** - test full workflows 6. **Proper assertions** - use AssertJ for fluent assertions 7. **Use `@MockitoBean`** (not deprecated `@MockBean`) from `org.springframework.test.context.bean.override.mockito`
Verify and add required dependencies:
**Maven:**
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.0</version>
// Use latest stable version
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.19.0</version>
// Use latest stable version
<scope>test</scope>
</dependency>**Gradle:**
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.testcontainers:junit-jupiter:1.19.0")
testImplementation("org.testcontainers:postgresql:1.19.0")Generate tests covering:
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@Testcontainers
class UserControllerIntegrationTest {
@Container
@ServiceConnection
static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(
DockerImageName.parse("postgres:16-alpine"));
@Autowired
private TestRestTemplate restTemplate;
@Test
void shouldCreateAndRetrieveUser() {
UserRequest request = new UserRequest("john@example.com", "John Doe");
ResponseEntity<UserResponse> createResponse = restTemplate
.postForEntity("/api/users", request, UserResponse.class);
assertThat(createResponse.getStatusCode()).isEqualTo(HttpStatus.CREATED);
assertThat(createResponse.getBody()).isNotNull();
Long userId = createResponse.getBody().id();
ReModular 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 expert prompt optimization using advanced techniques (CoT, few-shot, constitutional AI) for LLM performance enhancement.…
Provides guided feature development capability with codebase understanding and architecture focus. Use when implementing a new…
Provides guided bug fixing and debugging capability with systematic root cause analysis. Use when encountering bugs, errors, or…
Creates a GitHub pull request with branch creation, commits, and detailed description. Use when you need to submit changes for…
Provides comprehensive GitHub pull request review with code quality, security, and best practices analysis. Use when reviewing a…
Provides guided code refactoring capability with deep codebase understanding, compatibility options, and comprehensive…
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.