{"id":"8a2c96df-c050-4e56-992f-f4aa273bcb9a","shortId":"48SkEC","kind":"skill","title":"302-frameworks-spring-boot-rest","tagline":"Use when you need to design, review, or improve REST APIs with Spring Boot — including HTTP methods, resource URIs, status codes, DTOs, versioning, deprecation and sunset headers, content negotiation (JSON and vendor media types), ISO-8601 instants in DTOs, pagination/sorting/fil","description":"# Java REST API Design Principles\n\nApply REST API design principles for Spring Boot applications.\n\n**What is covered in this Skill?**\n\n- HTTP methods (GET, POST, PUT, PATCH, DELETE) — semantic consistency\n- Resource URI design\n- HTTP status codes\n- Request/response DTOs with lean contracts\n- API versioning (URI, header, or media type — applied consistently)\n- Bean Validation at the boundary (@Valid/@Validated on controller inputs, 400 on failure)\n- Pagination, sorting, and filtering (Page/Pageable with caps)\n- ISO-8601 instants with offset (OffsetDateTime, Instant) in JSON contracts\n- Content negotiation (JSON default; vendor media types when meaningful)\n- Idempotency-Key support for POST creates; 409 Conflict for collisions\n- ETag concurrency with If-Match/If-None-Match; 412 Precondition Failed / 304 Not Modified\n- HTTP caching discipline (Cache-Control, ETag, Last-Modified)\n- Deprecation and sunset headers (Deprecation, Sunset, Link rel=\"successor-version)\"\n- Error handling\n- API security (TLS, authentication, authorization, input validation)\n- API contract: OpenAPI file as source of truth for API-first (OpenAPI Generator)\n- Controller advice and problem details (RFC 7807)\n\n**Scope:** Apply recommendations based on the reference rules and good/bad code examples.\n\n## Constraints\n\nBefore applying any REST API changes, ensure the project compiles. If compilation fails, stop immediately. After applying improvements, run full verification.\n\n- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change\n- **SAFETY**: If compilation fails, stop immediately\n- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements\n- **BEFORE APPLYING**: Read the reference for detailed rules and good/bad patterns\n- **EDGE CASE**: If request scope is ambiguous, stop and ask a clarifying question before applying changes\n- **EDGE CASE**: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance\n\n## When to use this skill\n\n- Review Java code for Spring Boot REST API\n- Apply best practices for Spring Boot REST API in Java code\n\n## Workflow\n\n1. **Read reference and assess project context**\n\nRead `references/302-frameworks-spring-boot-rest.md` and inspect the current project setup before proposing changes.\n\n2. **Gather scope and decide target improvements**\n\nIdentify requested outcomes, constraints, and the minimum safe set of changes to apply.\n\n3. **Apply framework-aligned changes**\n\nImplement or refactor configuration/code following the reference patterns and project conventions.\n\n4. **Run verification and report results**\n\nExecute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/302-frameworks-spring-boot-rest.md](references/302-frameworks-spring-boot-rest.md).","tags":["302","frameworks","spring","boot","rest","cursor","rules","java","jabrena","agent-skills","ai-skills","claude"],"capabilities":["skill","source-jabrena","skill-302-frameworks-spring-boot-rest","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/302-frameworks-spring-boot-rest","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,925 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T12:53:36.602Z","embedding":null,"createdAt":"2026-04-18T22:02:12.607Z","updatedAt":"2026-04-26T12:53:36.602Z","lastSeenAt":"2026-04-26T12:53:36.602Z","tsv":"'-8601':42,117 '/if-none-match':152 '/mvnw':246,263 '1':347 '2':365 '3':385 '302':1 '304':156 '4':402 '400':106 '409':142 '412':153 '7807':209 'action':423 'advic':204 'align':389 'ambigu':290 'api':17,49,54,87,182,189,199,227,334,342 'api-first':198 'appli':52,94,211,224,239,252,271,274,298,335,384,386 'applic':60 'appropri':409 'ask':293,315 'assess':351 'authent':185 'author':186 'base':213 'bean':96 'best':336 'boot':5,20,59,332,340 'boundari':100 'build/tests':410 'cach':160,163 'cache-control':162 'cap':115 'case':285,301 'chang':228,254,299,364,382,390,414 'clarifi':295 'clean':264,268 'code':27,81,220,329,345 'collis':145 'compil':232,234,247,250,257 'concurr':147 'configuration/code':394 'conflict':143 'consist':75,95 'constraint':222,375,430 'content':34,126 'context':353 'contract':86,125,190 'control':104,164,203 'convent':401 'cover':63 'creat':141 'current':359 'decid':369 'default':129 'delet':73 'deprec':30,169,173 'design':12,50,55,78 'detail':207,279,426 'disciplin':161 'dtos':28,45,83 'edg':284,300 'ensur':229 'error':180 'etag':146,165 'exampl':221,428 'execut':408 'fail':155,235,258 'failur':108 'file':192,305 'filter':112 'first':200 'follow':395,421 'follow-up':420 'framework':3,388 'framework-align':387 'frameworks-spring-boot-rest':2 'full':242 'gather':366 'generat':202 'get':69 'good/bad':219,282 'guidanc':321,427 'handl':181 'header':33,90,172 'http':22,67,79,159 'idempot':136 'idempotency-key':135 'identifi':372 'if-match':149 'immedi':237,260 'implement':391 'improv':15,240,272,371 'includ':21 'input':105,187,304 'inspect':357 'instant':43,118,122 'iso':41,116 'java':47,328,344 'json':36,124,128 'key':137 'last':167 'last-modifi':166 'lean':85 'link':175 'mandatori':244 'match':151 'meaning':134 'media':39,92,131 'method':23,68 'minimum':378 'miss':309,313 'modifi':158,168 'mvn':249,267 'need':10 'negoti':35,127 'offset':120 'offsetdatetim':121 'openapi':191,201 'outcom':374 'page/pageable':113 'pagin':109 'pagination/sorting/fil':46 'patch':72 'pattern':283,398 'post':70,140 'practic':337 'precondit':154 'principl':51,56 'problem':206 'proceed':318 'project':231,352,360,400 'propos':363 'put':71 'question':296 'read':275,348,354 'recommend':212 'refactor':393 'refer':216,277,349,397,424 'references/302-frameworks-spring-boot-rest.md':355,432,433 'rel':176 'report':310,406 'request':287,373 'request/response':82 'requir':303 'resourc':24,76 'rest':6,16,48,53,226,333,341 'result':407 'review':13,327 'rfc':208 'rule':217,280 'run':241,245,262,403 'safe':379 'safeti':255 'scope':210,288,367 'secur':183 'see':431 'semant':74 'set':380 'setup':320,361 'skill':66,326 'skill-302-frameworks-spring-boot-rest' 'sort':110 'sourc':194 'source-jabrena' 'spring':4,19,58,331,339 'status':26,80 'stop':236,259,291 'successor':178 'successor-vers':177 'summar':412 'sunset':32,171,174 'support':138 'target':370 'tls':184 'tool':307 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'truth':196 'type':40,93,132 'uri':25,77,89 'use':7,324 'valid':97,101,102,188 'vendor':38,130 'verif':243,404 'verifi':261,265,269,417 'version':29,88,179 'whether':316 'workflow':346","prices":[{"id":"e8aa24d5-b074-4056-b01b-03a51550a4b6","listingId":"8a2c96df-c050-4e56-992f-f4aa273bcb9a","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-18T22:02:12.607Z"}],"sources":[{"listingId":"8a2c96df-c050-4e56-992f-f4aa273bcb9a","source":"github","sourceId":"jabrena/cursor-rules-java/302-frameworks-spring-boot-rest","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/302-frameworks-spring-boot-rest","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:12.607Z","lastSeenAt":"2026-04-26T12:53:36.602Z"}],"details":{"listingId":"8a2c96df-c050-4e56-992f-f4aa273bcb9a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"302-frameworks-spring-boot-rest","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T12:50:01Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"50fbb1e396b6b96a75bd21df98282c66f93138c7","skill_md_path":"skills/302-frameworks-spring-boot-rest/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/302-frameworks-spring-boot-rest"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"302-frameworks-spring-boot-rest","license":"Apache-2.0","description":"Use when you need to design, review, or improve REST APIs with Spring Boot — including HTTP methods, resource URIs, status codes, DTOs, versioning, deprecation and sunset headers, content negotiation (JSON and vendor media types), ISO-8601 instants in DTOs, pagination/sorting/filtering, Bean Validation at the boundary, idempotency, ETag concurrency, HTTP caching, error handling, security, contract-first OpenAPI (OpenAPI Generator), controller advice, and problem details for errors. This should trigger for requests such as Review Java code for Spring Boot REST API; Apply best practices for Spring Boot REST API in Java code. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/302-frameworks-spring-boot-rest"},"updatedAt":"2026-04-26T12:53:36.602Z"}}