<< All versions

Skill v1.0.0

currentAutomated scan100/100
iamp5/springboot-plugin/springboot-best-practices
──Details
PublishedOctober 24, 2026 at 05:46 PM
Content Hashsha256:82a66d8e87cd3c06...
Git SHA35665c277a78
──Files
Files (1 file, 3.6 KB)
SKILL.md3.6 KBactive
SKILL.md · 35 lines · 3.6 KB

version: "1.0.0" name: springboot-best-practices description: Write or review Java and Spring code using records, var, streams, functional interfaces, sealed types, exhaustive switches, domain validators, modern APIs, collection ownership, concurrency, transactions, persistence, tests, and existing architecture. Apply concrete rules with version bounds and justified exceptions.


Java and Spring rules for generation and review

Read project context, then select the rules whose trigger appears in the task or diff. Load recent API changes through java-spring-updates when dependencies, imports, or configuration differ from familiar examples.

TriggerRulePriority
DTOs, value objects, or non-entity domain dataUse records by defaultHigh
Local declarations, generics, or numeric inferencePrefer clear local type inferenceMedium
Filtering, mapping, aggregation, or strategy lambdasUse declarative transformationsMedium
Closed domain alternatives or instanceof chainsSeal variants and exhaust switchesHigh
Entity creation, state changes, cross-field rules, or request validationKeep domain validation unavoidableHigh
Collection-returning APIs, record components, or toList conversionsPreserve collection ownershipHigh
Handwritten string/file/batching utilities or newer syntaxSelect stable modern APIs, then the Java 11–25 feature indexMedium
Virtual threads or increased concurrent external requestsBound constrained resourcesHigh
Catching InterruptedException or retrying after cancellationPreserve interruptionHigh
New interfaces, factories, or generic base classesRequire a purpose for abstractionsMedium
Self-invocation or a new transaction/propagation boundaryMake interception realHigh
N+1 query evidence, a fetch join, or pagination changesMeasure the fetch planHigh
New or modified regression testsAssert observable behaviorMedium
Moving classes, adding dependencies, or creating a componentFollow existing boundariesHigh

For each applicable rule:

  1. Check its version/runtime conditions and exceptions against the repository. Prefer records for value-like data, clear var locals, declarative transformations, and exhaustive closed-domain modeling in new or changed code. State a concrete exception when retaining another form; avoid unrelated whole-repository rewrites.
  2. During generation, choose a correction that fits the intended behavior and existing boundaries. During review, identify the affected code and a concrete consequence before raising a finding.
  3. Run the rule's verification and the repository's required checks through spring-verify.

Report findings with the rule ID, file/line, consequence, and evidence. Treat advisory design judgments as review guidance; only repository-adopted executable policy can turn them into mandatory build failures. A pattern match alone is insufficient evidence of a defect.

All versions