plugins/springboot-architecture/skills/spring-data-jpa/SKILL.md
Designs and implements Spring Data JPA repositories, projections, query patterns, custom repositories, CQRS read models, entity relationships, and persistence performance fixes for Java 25 and Spring Boot 4 projects. Use when the task needs repository-boundary decisions or concrete JPA implementation patterns from this skill. Do not use for generic SQL help or project-wide migration work that belongs in another skill.
npx skillsauth add a-pavithraa/springboot-skills-marketplace spring-data-jpaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the task is specifically about persistence design or implementation in a Spring Boot codebase. This skill adds value through aggregate-root guidance, query-pattern selection, CQRS read-model decisions, and the bundled repository and relationship templates.
save() blindly when entity state transitions matter; understand persist versus merge behavior.Collect the minimum context first:
Use this table to decide what to load next.
| Pattern | Use when | Read |
|---------|----------|------|
| Simple repository | Basic CRUD and 1-2 simple lookups | Existing code or none |
| @Query repository | Multiple filters, joins, sorting, readable JPQL | references/query-patterns.md |
| DTO projection | Read-only and performance-critical responses | references/dto-projections.md |
| Custom repository | Criteria API, bulk operations, EntityManager logic | references/custom-repositories.md |
| CQRS query service | Separate read and write models, reporting, specialized read paths | references/cqrs-query-service.md |
Use this decision guide:
| Need | Simple | @Query | DTO | Custom | CQRS |
|------|--------|----------|-----|--------|------|
| Basic CRUD | Yes | Yes | No | Yes | Yes |
| Custom filters | No | Yes | Yes | Yes | Yes |
| Best read performance | No | Sometimes | Yes | Sometimes | Yes |
| Complex dynamic logic | No | No | No | Yes | Yes |
| Clear read/write split | No | No | Sometimes | Sometimes | Yes |
Load only the references needed for the current task:
references/query-patterns.mdreferences/dto-projections.mdreferences/custom-repositories.mdreferences/cqrs-query-service.mdreferences/relationships.mdreferences/performance-guide.mdUse the bundled templates in assets/ instead of rebuilding the pattern from scratch:
assets/query-repository.javaassets/dto-projection.javaassets/custom-repository.javaassets/query-service.javaassets/relationship-patterns.javaBefore finalizing the change, check:
@ManyToMany has not been introduced when a join entity is more appropriate@Transactional(readOnly = true) where appropriateRead references/performance-guide.md when the task includes:
@Query for joins, readable text blocks, or multiple filters.@ManyToOne over @OneToMany when possible.@ManyToMany as a warning sign; prefer an explicit join entity.When proposing or implementing a persistence change, return:
## Recommended pattern
- Pattern:
- Why:
## Files to change
- `path/to/file`
## References used
- `references/...`
## Risks to verify
- ...
creating-springboot-projectsdevelopment
Migrates Spring Boot applications to Boot 4 with Java 25, including related Spring Modulith 2 and Testcontainers 2 upgrade work. Use when the task is a concrete upgrade, dependency transition, starter rename, test-annotation migration, or phased migration plan. Do not use for greenfield project creation or for isolated repository design questions.
development
Creates Java 25 and Spring Boot 4 project structures, scaffolds, and implementation starting points for new services, REST APIs, and modular backends. Use when the task is to initialize a Spring Boot project, choose an architecture, select Spring Boot 4 features, or apply the bundled templates and references in this skill. Do not use for migrating existing projects or for isolated JPA/repository work without broader project-creation context.
development
Reviews Java 25 and Spring Boot 4 codebases, pull requests, files, and modules for migration risks, architecture boundary violations, JSpecify null-safety issues, security flaws, performance regressions, and Spring Data pitfalls. Use when the task is a concrete Java or Spring code review with code context. Do not use for Kotlin-only code, non-Spring frameworks, or generic review advice without files or diffs.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.