/mainframe-cobol-db2-classic:java-springbootfrom mainframe-cobol-db2-classic
Applies Spring Boot best practices for project structure, dependency injection, configuration, REST controllers, DTO validation, services, transactions, Spring Data JPA, logging, testing, and security.
Ships in mainframe-cobol-db2-classic. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn Spring Boot implementation requests into high-quality Java applications with domain-oriented packages, explicit dependencies, externalized configuration, validated APIs, transactional services, safe persistence, structured logging, and focused tests.
| Concern | Preferred approach | Avoid |
|---|---|---|
| Build tool | Maven pom.xml or Gradle build.gradle. | Manual dependency jars. |
| Dependencies | Spring Boot starters such as spring-boot-starter-web and spring-boot-starter-data-jpa. | Hand-picking transitive Spring libraries. |
| Packages | feature/domain packages such as com.example.app.order and com.example.app.user. | Layer-only packages such as com.example.app.controller, com.example.app.service, and repository for every domain. |
| Boundaries | Keep controller DTOs, service logic, repository contracts, and persistence models explicit. | Letting web, persistence, and domain concerns leak into each other. |
| Need | Use |
|---|---|
| Required dependencies | constructor-based injection with private final fields. |
| General bean | @Component. |
| Business operation | @Service. |
| Persistence adapter | @Repository. |
| MVC page controller | @Controller. |
| REST endpoint | @RestController. |
Do not use field injection for required collaborators. Constructor injection makes dependencies explicit, testable, and immutable.
| Concern | Rule |
|---|---|
| Files | Use application.yml or application.properties; prefer YAML for hierarchical settings when the project already uses it. |
| Type safety | Bind settings with @ConfigurationProperties to strongly-typed Java objects instead of scattering @Value keys. |
| Environments | Use Spring Profiles such as application-dev.yml and application-prod.yml for environment-specific configuration. |
| Secrets | Do not hardcode secrets. Use environment variables, HashiCorp Vault, AWS Secrets Manager, or the platform's secret store. |
| Area | Practice |
|---|---|
| REST API | Use clear resource-oriented endpoints and consistent status codes. |
| DTOs | Expose and consume DTOs; do not return JPA entities directly to clients. |
| Validation | Use Java Bean Validation / JSR 380 annotations such as @Valid, @NotNull, and @Size on request DTOs. |
| Errors | Centralize responses with @ControllerAdvice and @ExceptionHandler. |
| Sanitization | Prevent SQL injection with Spring Data JPA or parameterized queries; encode output to prevent Cross-Site Scripting (XSS). |
| Area | Practice |
|---|---|
| Business logic | Put business rules in @Service classes, not controllers or repositories. |
| Statelessness | Keep services stateless except for injected dependencies. |
| Transactions | Apply @Transactional at the most granular service method that owns the unit of work. |
| Repositories | Extend JpaRepository or CrudRepository for standard persistence. |
| Complex queries | Use @Query, the JPA Criteria API, or projections. |
| Read models | Use DTO projections to fetch only needed columns. |
| Topic | Rule |
|---|---|
| Logging API | Use SLF4J. Declare private static final Logger logger = LoggerFactory.getLogger(MyClass.class);. |
| Log messages | Prefer parameterized logging: logger.info("Processing user {}...", userId);. |
| Unit tests | Use JUnit 5 with Mockito for services and components. |
| Integration tests | Use @SpringBootTest when the full application context is required. |
| Test slices | Use @WebMvcTest for controllers and @DataJpaTest for repositories. |
| External dependencies in tests | Consider Testcontainers for real databases or brokers. |
| Authentication | Use Spring Security for authentication and authorization. |
| Passwords | Encode passwords with BCrypt. |
## Spring Boot implementation guidance
**Target:** <feature, class, or endpoint>
| Area | Recommendation | Concrete API or file |
| --- | --- | --- |
| Structure | <package/module choice> | `<package>` |
| Web | <controller/DTO/validation rule> | `@RestController`, `@Valid` |
| Service | <business logic and transaction boundary> | `@Service`, `@Transactional` |
| Data | <repository/query/projection rule> | `JpaRepository`, `@Query` |
| Tests | <unit/slice/integration strategy> | `@WebMvcTest`, `@DataJpaTest`, `@SpringBootTest` |
### Risks to avoid
- <anti-pattern and correction>
private final fields.application.yml or application.properties, with secrets outside source code.@Transactional at the right boundary.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin mainframe-cobol-db2-classic16 skills in this plugin
/cobol-classic-contextSupply COBOL, DB2, VSAM, and JCL modernization context: corpus layout, member conventions, target stack boundaries, evidence precedence, stage flow, and security rules. Use when starting any COBOL/DB2 modernization task, before analysis, design, implementation, verification, or delivery./cobol-db2-analysisAnalyze COBOL programs, copybooks, PERFORM and CALL structure, file and VSAM access, embedded EXEC SQL and EXEC CICS, DB2 DDL, DCLGEN structures, cursors, and JCL job steps with source citations. Use when reading or inventorying a COBOL/DB2 legacy system before modernization./cobol-legacyApplies COBOL, copybook, and JCL reading conventions for evidence, precision, occurrence semantics, and legacy immutability. Use when inspecting or citing COBOL/DB2 legacy source./code-modernizationUse this skill when the user asks to modernize legacy code with a disciplined GitHub Copilot workflow: brief, assess, map, extract business rules, reimagine architecture, transform modules, and harden with tests and security review. Trigger for COBOL, JCL, legacy Java, .NET, C++, classic ASP, monolith modernization, behavior-preserving rewrite, business-rule extraction, modernization assessment, or legacy-to-modern transformation./create-architectural-decision-recordCreate an Architectural Decision Record (ADR) as a structured Markdown document with front matter, coded consequences, alternatives, implementation notes, and references. Use when the user asks to document an architecture decision, create an ADR, capture alternatives and trade-offs, or save a decision under docs/adr./db2-postgresql-migrationModel DB2 for z/OS tables, DDL, DCLGEN structures, COBOL record layouts, OCCURS and REDEFINES groups, packed decimal fields, cursors, and VSAM datasets as a PostgreSQL schema, then prove equivalence with recorded reconciliation numbers. Use when designing or reviewing a DB2 to PostgreSQL migration, mapping legacy types to column types, deciding child-table versus array storage, or verifying that migrated data matches the legacy source.Other plugins' skills for the same job