spring-mvc-webflux-api-builder
Skill18 starsChanged 9 months agoMITView on GitHub
Design and generate Kotlin Spring HTTP APIs with correct controller signatures, DTOs, validation, serialization assumptions, error handling, and web tests. Use when building or changing REST endpoints, choosing between MVC and WebFlux, modeling request and response payloads, standardizing error responses, or avoiding Kotlin-specific validation and Jackson mistakes.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- JetBrains/skillsedited, first seen Apr 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- JetBrains/skills★ 36096% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- ci-cd-containerization-advisorSkill
- configuration-properties-profiles-kotlin-safeSkill
- dependency-conflict-resolverSkill
- domain-decomposition-api-design-advisorSkill
- error-model-validation-architectSkill
- gradle-kotlin-dsl-doctorSkill
- integration-resilience-engineerSkill
- jackson-kotlin-serialization-specialistSkill
- java-kotlin-migration-assistantSkill
- jpa-spring-data-kotlin-mapperSkill
- kotlin-idiomatic-refactorer-spring-awareSkill
- kotlin-spring-proxy-compatibilitySkill
- observability-integratorSkill
- performance-concurrency-advisorSkill
- production-incident-responderSkill
- project-context-ingestionSkill
- schema-migration-plannerSkill
- spring-context-di-reasoningSkill
- spring-kotlin-code-reviewSkill
- spring-security-configurator-auditorSkill
- stacktrace-log-triageSkill
- test-suite-builderSkill
- transaction-consistency-designerSkill
- upgrade-breaking-change-navigatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Verify whether the module is Spring MVC or WebFlux.
- Distinctive: line 18
Verify whether controllers are blocking, coroutine-based, or Reactor-based.
- Distinctive: line 19
Verify the project's existing error format, serialization rules, and OpenAPI approach.
- Very specific: line 42
Use @field: targets for Jakarta Bean Validation annotations on constructor properties.
- Very specific: line 44
Treat null versus absent as a contract decision, especially for PATCH-like behavior.
- Very specific: line 45
Verify jackson-module-kotlin or equivalent serialization support before relying on Kotlin constructor defaults.
- Very specific: line 46
Prefer immutable DTOs with val properties unless the project clearly uses a different pattern.
- Distinctive: line 50
Do not mix MVC and WebFlux styles in the same generated endpoint unless the repository already does so intentionally.
- Distinctive: line 57
Prefer stable machine-readable error codes in the payload even when human-readable messages change.
- Very specific: line 62
Avoid exposing Spring-specific transport types like Page directly as the public API contract unless the service already standardized on …
- Distinctive: line 69
Keep transport DTOs narrow and explicit.
- Distinctive: line 70
If the service is public or long-lived, optimize for backward-compatible contract evolution: additive fields, stable codes, and deliberate …
- Distinctive: line 71
Put correlation-id propagation in filters or interceptors when possible, not in every controller method.
- Distinctive: line 88
Do not leak internal exception details in API errors.
- Distinctive: line 89
Do not use validation annotations on the wrong target in Kotlin.
- Distinctive: line 90
Do not expose persistence entities on the wire.
- Distinctive: line 91
Do not assume default HTTP codes without checking the contract.
- Distinctive: line 92
Do not silently pick MVC when the module is WebFlux, or the reverse.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spring MVC WebFlux API Builder
Source mapping: Tier 1 critical skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-06).
Mission
Produce API code that is not only plausible but correct for the repository's actual Spring stack. Generate endpoints, DTOs, validation, and test scaffolding as one coherent unit.
Decide The Stack First
- Verify whether the module is Spring MVC or WebFlux.
- Verify whether controllers are blocking, coroutine-based, or Reactor-based.
- Verify the project's existing error format, serialization rules, and OpenAPI approach.
- Reuse
project-context-ingestionoutput if it already established these facts.
Design The Contract Before Writing Code
- Define the endpoint path, method, authentication expectation, idempotency rule, and status codes.
- Define request and response DTO boundaries. Do not expose entities directly.
- Define the error model for validation failures, business conflicts, not found, and unexpected errors.
- Define pagination, sorting, and correlation-id behavior if applicable.
- Define whether null, missing, and defaulted fields have distinct semantics.
Generate In This Order
- Request and response DTOs.
- Validation annotations with correct Kotlin
@field:use-site targets. - Controller signature.
- Service interface or use-case boundary.
- Mapping or translation code between transport and domain models.
- Error handling via
@ControllerAdviceor the project's equivalent. - One focused web-layer test proving the contract.
Kotlin-Specific Rules
- Use
@field:targets for Jakarta Bean Validation annotations on constructor properties. - Be explicit about nullable versus required fields.
- Treat
nullversus absent as a contract decision, especially for PATCH-like behavior. - Verify
jackson-module-kotlinor equivalent serialization support before relying on Kotlin constructor defaults. - Prefer immutable DTOs with
valproperties unless the project clearly uses a different pattern.
MVC And WebFlux Rules
- Do not mix MVC and WebFlux styles in the same generated endpoint unless the repository already does so intentionally.
- For MVC, prefer ordinary return types and blocking service boundaries.
- For WebFlux with coroutines, prefer
suspendfunctions andFlow<T>when streaming is required. - For Reactor-based code, follow the project's existing
MonoandFluxconventions instead of inventing a hybrid style.
Advanced Contract Decisions
- Prefer stable machine-readable error codes in the payload even when human-readable messages change.
- Choose
400versus422deliberately. Validation and malformed input are not the same as a domain rule violation. - For create endpoints, decide whether
201 CreatedplusLocationis part of the contract. Do not default to200just because it is easy. - For update endpoints, consider optimistic concurrency signals such as version fields or
ETagandIf-Matchwhen concurrent edits matter. - For PATCH semantics, model three states explicitly when needed: absent, present with value, and present with null. Plain nullable Kotlin fields do not always represent all three.
- Avoid exposing Spring-specific transport types like
Pagedirectly as the public API contract unless the service already standardized on that decision. - Be explicit about date-time, enum, and value-class serialization. Default serializer behavior often drifts across versions and clients.
- In streaming endpoints, consider cancellation, backpressure, and partial-write behavior, not only the method signature.
Expert Heuristics
- Design the error contract and validation contract before controller code. Retrofitting them later causes the most API churn.
- Keep transport DTOs narrow and explicit. Reusing internal domain models usually saves time once and costs time forever.
- If the service is public or long-lived, optimize for backward-compatible contract evolution: additive fields, stable codes, and deliberate deprecations.
- Put correlation-id propagation in filters or interceptors when possible, not in every controller method.
Output Contract
Return either a ready-to-apply patch plan or concrete files or code blocks containing:
- request DTO
- response DTO
- controller
- service interface or use-case entry point
- exception mapping or advice updates
- web-layer test
Also return a short explanation of the API contract decisions that materially affect compatibility.
Guardrails
- Do not leak internal exception details in API errors.
- Do not use validation annotations on the wrong target in Kotlin.
- Do not expose persistence entities on the wire.
- Do not assume default HTTP codes without checking the contract.
- Do not silently pick MVC when the module is WebFlux, or the reverse.
Verification Checklist
- The endpoint compiles against the actual Spring stack in the repository.
- Validation triggers for invalid input and returns the expected error shape.
- Success and at least one failure path are covered by a web-layer test.
- Serialization rules match the existing project conventions.
Quality Bar
A good run of this skill gives the user an endpoint that compiles, validates, serializes, and fails consistently. A bad run mixes frameworks, gets Kotlin validation wrong, or invents an error model that the rest of the service does not use.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

