{"id":"8c91a23b-4a5d-472a-97b2-229610ca2eca","shortId":"TkmtVK","kind":"skill","title":"312-frameworks-spring-data-jdbc","tagline":"Use when you need to use Spring Data JDBC with Java records — including entity design with records, repository pattern, immutable updates, aggregate relationships, custom queries, transaction management, and avoiding N+1 problems. This should trigger for requests such as Review J","description":"# Spring Data JDBC with Records\n\nApply Spring Data JDBC guidelines with Java records.\n\n**What is covered in this Skill?**\n\n- Records for entity classes (immutable, constructor-friendly)\n- @Table for naming when record name differs from the table name\n- @Embedded to inline value-object columns into the parent row without a separate table\n- Repository pattern\n- Immutable updates with static factories for new rows and with* helpers for updates\n- save() INSERT vs UPDATE semantics driven by @Id nullability\n- Aggregate boundaries: one repository per aggregate root, Set for one-to-many inside the root, foreign keys between aggregates\n- Custom queries with @Query and named parameters (no user-input concatenation)\n- Transaction management (@Transactional on services; readOnly where appropriate)\n- Single query loading (N+1 avoidance)\n\n**Scope:** Apply recommendations based on the reference rules and good/bad code examples.\n\n## Constraints\n\nBefore applying any Spring Data JDBC 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 Data JDBC\n- Apply best practices for Spring Data JDBC in Java code\n\n## Workflow\n\n1. **Read reference and assess project context**\n\nRead `references/312-frameworks-spring-data-jdbc.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/312-frameworks-spring-data-jdbc.md](references/312-frameworks-spring-data-jdbc.md).","tags":["312","frameworks","spring","data","jdbc","cursor","rules","java","jabrena","agent-skills","ai-skills","claude"],"capabilities":["skill","source-jabrena","skill-312-frameworks-spring-data-jdbc","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/312-frameworks-spring-data-jdbc","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,567 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:37.099Z","embedding":null,"createdAt":"2026-04-18T22:02:14.117Z","updatedAt":"2026-04-26T12:53:37.099Z","lastSeenAt":"2026-04-26T12:53:37.099Z","tsv":"'+1':37,169 '/mvnw':208,225 '1':307 '2':325 '3':345 '312':1 '4':362 'action':383 'aggreg':28,125,130,144 'align':349 'ambigu':252 'appli':53,172,185,201,214,233,236,260,296,344,346 'appropri':164,369 'ask':255,277 'assess':311 'avoid':35,170 'base':174 'best':297 'boundari':126 'build/tests':370 'case':247,263 'chang':190,216,261,324,342,350,374 'clarifi':257 'class':70 'clean':226,230 'code':181,291,305 'column':92 'compil':194,196,209,212,219 'concaten':156 'configuration/code':354 'constraint':183,335,390 'constructor':73 'constructor-friend':72 'context':313 'convent':361 'cover':63 'current':319 'custom':30,145 'data':5,14,49,55,188,294,301 'decid':329 'design':21 'detail':241,386 'differ':81 'driven':121 'edg':246,262 'embed':86 'ensur':191 'entiti':20,69 'exampl':182,388 'execut':368 'factori':107 'fail':197,220 'file':267 'follow':355,381 'follow-up':380 'foreign':141 'framework':3,348 'framework-align':347 'frameworks-spring-data-jdbc':2 'friend':74 'full':204 'gather':326 'good/bad':180,244 'guidanc':283,387 'guidelin':57 'helper':113 'id':123 'identifi':332 'immedi':199,222 'immut':26,71,103 'implement':351 'improv':202,234,331 'includ':19 'inlin':88 'input':155,266 'insert':117 'insid':138 'inspect':317 'j':47 'java':17,59,290,304 'jdbc':6,15,50,56,189,295,302 'key':142 'load':167 'manag':33,158 'mandatori':206 'mani':137 'minimum':338 'miss':271,275 'mvn':211,229 'n':36,168 'name':77,80,85,150 'need':10 'new':109 'nullabl':124 'object':91 'one':127,135 'one-to-mani':134 'outcom':334 'paramet':151 'parent':95 'pattern':25,102,245,358 'per':129 'practic':298 'problem':38 'proceed':280 'project':193,312,320,360 'propos':323 'queri':31,146,148,166 'question':258 'read':237,308,314 'readon':162 'recommend':173 'record':18,23,52,60,67,79 'refactor':353 'refer':177,239,309,357,384 'references/312-frameworks-spring-data-jdbc.md':315,392,393 'relationship':29 'report':272,366 'repositori':24,101,128 'request':43,249,333 'requir':265 'result':367 'review':46,289 'root':131,140 'row':96,110 'rule':178,242 'run':203,207,224,363 'safe':339 'safeti':217 'save':116 'scope':171,250,327 'see':391 'semant':120 'separ':99 'servic':161 'set':132,340 'setup':282,321 'singl':165 'skill':66,288 'skill-312-frameworks-spring-data-jdbc' 'source-jabrena' 'spring':4,13,48,54,187,293,300 'static':106 'stop':198,221,253 'summar':372 'tabl':75,84,100 'target':330 'tool':269 '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' 'transact':32,157,159 'trigger':41 'updat':27,104,115,119 'use':7,12,286 'user':154 'user-input':153 'valu':90 'value-object':89 'verif':205,364 'verifi':223,227,231,377 'vs':118 'whether':278 'without':97 'workflow':306","prices":[{"id":"3b7b31cc-3584-4afb-9d76-aca59df8d5b1","listingId":"8c91a23b-4a5d-472a-97b2-229610ca2eca","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:14.117Z"}],"sources":[{"listingId":"8c91a23b-4a5d-472a-97b2-229610ca2eca","source":"github","sourceId":"jabrena/cursor-rules-java/312-frameworks-spring-data-jdbc","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/312-frameworks-spring-data-jdbc","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:14.117Z","lastSeenAt":"2026-04-26T12:53:37.099Z"}],"details":{"listingId":"8c91a23b-4a5d-472a-97b2-229610ca2eca","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"312-frameworks-spring-data-jdbc","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":"c71f730f6e4d12f52b04ca5a00b3b7641edf3453","skill_md_path":"skills/312-frameworks-spring-data-jdbc/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/312-frameworks-spring-data-jdbc"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"312-frameworks-spring-data-jdbc","license":"Apache-2.0","description":"Use when you need to use Spring Data JDBC with Java records — including entity design with records, repository pattern, immutable updates, aggregate relationships, custom queries, transaction management, and avoiding N+1 problems. This should trigger for requests such as Review Java code for Spring Data JDBC; Apply best practices for Spring Data JDBC in Java code. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/312-frameworks-spring-data-jdbc"},"updatedAt":"2026-04-26T12:53:37.099Z"}}