一键导入
java-tooling-specialist
Generate Java project scaffolding with Maven/Gradle, JUnit 5, Mockito, Checkstyle/SpotBugs, and packaging (JAR/WAR/native-image).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate Java project scaffolding with Maven/Gradle, JUnit 5, Mockito, Checkstyle/SpotBugs, and packaging (JAR/WAR/native-image).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | Java Tooling Specialist |
| slug | tooling-java-generator |
| description | Generate Java project scaffolding with Maven/Gradle, JUnit 5, Mockito, Checkstyle/SpotBugs, and packaging (JAR/WAR/native-image). |
| capabilities | ["Project structure generation (library, application, Spring Boot, microservice)","Build tool setup (Maven, Gradle, multi-module)","Testing framework configuration (JUnit 5, Mockito, TestContainers)","Code quality tools (Checkstyle, SpotBugs, PMD, Error Prone)","Packaging and distribution (JAR, WAR, Docker, GraalVM native-image)","CI/CD integration (GitHub Actions, Jenkins)"] |
| inputs | [{"project_type":"library | application | spring-boot | microservice (string)"},{"build_tool":"maven | gradle (string)"},{"java_version":"11 | 17 | 21 (string)"},{"project_name":"Name of the project (string)"}] |
| outputs | [{"project_structure":"Directory layout with all config files (JSON)"},{"build_config":"Complete pom.xml or build.gradle configuration"},{"ci_config":"GitHub Actions or Jenkins pipeline (YAML)"},{"dockerfile":"Multi-stage Dockerfile (optional)"}] |
| keywords | ["java","tooling","maven","gradle","junit","spring-boot","mockito","checkstyle","packaging"] |
| version | 1.0.0 |
| owner | cognitive-toolworks |
| license | MIT |
| security | Public; no secrets or PII; safe for open repositories |
| links | ["https://maven.apache.org/guides/","https://docs.gradle.org/current/userguide/userguide.html","https://junit.org/junit5/docs/current/user-guide/","https://spring.io/projects/spring-boot","https://www.graalvm.org/latest/reference-manual/native-image/"] |
Trigger conditions:
Not for:
tooling-kotlin-generator instead)Time normalization:
NOW_ET using NIST/time.gov semantics (America/New_York, ISO-8601)NOW_ET for all citation access datesInput validation:
project_type must be one of: library, application, spring-boot, microservicebuild_tool must be one of: maven, gradlejava_version must be one of: 11, 17, 21 (LTS versions)project_name must be valid Java package name (lowercase, dots/hyphens allowed)Source freshness:
Fast path for common cases:
Directory Layout Generation
project-name/
src/
main/
java/com/example/project/
resources/
test/
java/com/example/project/
resources/
pom.xml (Maven) or build.gradle (Gradle)
README.md
.gitignore
Core Build Configuration
Basic .gitignore
Decision: If only basic scaffolding needed → STOP at T1; otherwise proceed to T2.
Extended configuration with testing and quality tools:
Testing Framework Configuration
JUnit 5 + Mockito accessed 2025-10-26
Maven dependencies:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
Gradle (build.gradle):
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testImplementation 'org.mockito:mockito-core:5.8.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.8.0'
}
test {
useJUnitPlatform()
}
Code Quality Tools
Checkstyle accessed 2025-10-26
SpotBugs accessed 2025-10-26
PMD (optional)
Build Plugins
Spring Boot Configuration (if project_type == spring-boot)
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.0</version>
</parent>
Deep configuration for production deployment:
JAR/WAR Packaging accessed 2025-10-26
Multi-Module Project Structure
GraalVM Native Image accessed 2025-10-26
Docker Packaging
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /app
COPY pom.xml .
RUN mvn dependency:go-offline
COPY src src
RUN mvn package -DskipTests
FROM eclipse-temurin:21-jre-alpine
COPY --from=build /app/target/*.jar app.jar
ENTRYPOINT ["java", "-jar", "/app.jar"]
CI/CD Pipeline
TestContainers Integration (for integration tests)
@Testcontainers
class IntegrationTest {
@Container
static PostgreSQLContainer<?> postgres =
new PostgreSQLContainer<>("postgres:16-alpine");
}
Build Tool Selection:
Project Type Structure:
Abort Conditions:
project_name (contains spaces, uppercase, invalid chars) → errorjava_version (<11) → error "Minimum Java 11 required"Tool Version Selection:
Schema (JSON):
{
"project_name": "string",
"project_type": "library | application | spring-boot | microservice",
"java_version": "string",
"build_tool": "maven | gradle",
"structure": {
"directories": ["string"],
"files": {
"path/to/file": "file content (string)"
}
},
"commands": {
"build": "string",
"test": "string",
"package": "string",
"run": "string (optional)"
},
"next_steps": ["string"],
"timestamp": "ISO-8601 string (NOW_ET)"
}
Required Fields:
project_name, project_type, java_version, build_tool, structure, commands, next_steps, timestampFile Contents:
Quick Start: Java Library (30 lines)
// examples/LibraryExample.java
package com.example.utils;
import java.time.Instant;
import java.util.*;
public final class StringMetrics {
public record Metrics(int length, int wordCount, Instant analyzed) {}
private final List<String> history = new ArrayList<>();
public Metrics analyze(String text) {
if (text == null || text.isBlank()) {
throw new IllegalArgumentException("Text cannot be null or blank");
}
history.add(text);
int wordCount = text.split("\\s+").length;
return new Metrics(text.length(), wordCount, Instant.now());
}
public List<String> getHistory() {
return Collections.unmodifiableList(history);
}
}
Additional Examples:
examples/CliExample.java (30 lines) - picocli, file I/O, exit codesexamples/ApiExample.java (36 lines) - REST endpoints, records, concurrent storageTemplate Resources (see resources/)
pom-library.xml / pom-cli.xml / pom-springboot.xmlbuild-library.gradle / build-cli.gradle / build-springboot.gradleExampleTest.java - JUnit 5 with modern assertionsToken Budgets:
Safety:
Auditability:
Determinism:
Performance:
Official Documentation (accessed 2025-10-26):
Build Tools:
Best Practices:
Analyzes and optimizes frontend performance using Core Web Vitals, bundle analysis, lazy loading, image optimization, and caching strategies
Design RESTful APIs with OpenAPI 3.1/3.2, resource modeling, HTTP semantics, versioning, pagination, HATEOAS, and OWASP API Security.
Design data pipelines with quality checks, orchestration, and governance using modern data stack patterns for robust ELT/ETL workflows.
Validate WCAG 2.2 compliance (A/AA/AAA) with ARIA, color contrast, keyboard navigation, screen readers, and automated testing via axe-core/Pa11y.
Design Kafka architectures with exactly-once semantics, Kafka Streams, ksqlDB, Schema Registry (Avro/Protobuf), performance tuning, and KRaft.
Design RabbitMQ architectures with exchanges, quorum queues, routing patterns, clustering, dead letter exchanges, and AMQP best practices.