Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides patterns to implement persistence layers with Spring Data JPA. Use when creating repositories, configuring entity relationships, writing queries (derived and `@Query`), setting up pagination, database auditing, transactions, UUID primary keys, multiple databases, and database indexing.
.claude/skills/giuseppe-trisciuoglio-spring-data-jpa/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 78% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 189% | 0% |
| case-16 | ✓→✓ | = Same ✓ | 55% | 0% |
Provides patterns for Spring Data JPA repositories, entity relationships, queries, pagination, auditing, and transactions.
Creating repositories with CRUD operations, entity relationships, @Query annotations, pagination, auditing, or UUID primary keys.
To implement a repository interface:
java @Repository public interface UserRepository extends JpaRepository<User, Long> { // Custom methods defined here }
java Optional<User> findByEmail(String email); List<User> findByStatusOrderByCreatedDateDesc(String status);
@Query:java @Query("SELECT u FROM User u WHERE u.status = :status") List<User> findActiveUsers(@Param("status") String status);
java @Entity @Table(name = "users") public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;
@Column(nullable = false, length = 100) private String email; }
java @OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true) private List<Order> orders = new ArrayList<>(); Validation: Test cascade behavior with a small dataset before applying to production data. Verify delete operations don't cascade unexpectedly.
java @CreatedDate @Column(nullable = false, updatable = false) private LocalDateTime createdDate;
@Query for complex queries@Modifying for update/delete operations@Transactional(readOnly = true)1. Verify entity configuration:
2. Optimize query performance:
EXPLAIN ANALYZE on queries against large tables@EntityGraph to prevent N+1 queries3. Validate pagination:
java@Repository public interface ProductRepository extends JpaRepository<Product, Long> { // Derived query List<Product> findByCategory(String category); // Custom query @Query("SELECT p FROM Product p WHERE p.price > :minPrice") List<Product> findExpensiveProducts(@Param("minPrice") BigDecimal minPrice); }
java@Service public class ProductService { private final ProductRepository repository; public Page<Product> getProducts(int page, int size) { Pageable pageable = PageRequest.of(page, size, Sort.by("name").ascending()); return repository.findAll(pageable); } }
java@Entity @EntityListeners(AuditingEntityListener.class) public class Order { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @CreatedDate @Column(nullable = false, updatable = false) private LocalDateTime createdDate; @LastModifiedDate private LocalDateTime lastModifiedDate; @CreatedBy @Column(nullable = false, updatable = false) private String createdBy; }
final modifiers@Value for DTOs@Id and @GeneratedValue annotations@Table and @Column annotations@EntityGraph to avoid N+1 query problemsFor comprehensive examples, detailed patterns, and advanced configurations, see:
@EntityGraph or JOIN FETCH in queries.CascadeType.REMOVE on large collections as it can cause performance issues.EAGER fetch type for collections; it can cause excessive database queries.@Transactional(readOnly = true) for read operations to enable optimizations.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 14,633 | 13,177 | -10% | 1 | 1 | 0% | 2,783 | 4,018 | +44% | 0 | 0 | — |
case-02 | fail→pass | 14,454 | 12,979 | -10% | 1 | 1 | 0% | 3,119 | 3,820 | +22% | 0 | 0 | — |
case-03 | fail→pass | 13,262 | 9,161 | -31% | 1 | 1 | 0% | 2,831 | 3,185 | +13% | 0 | 0 | — |
case-04 | fail→pass | 10,057 | 11,325 | +13% | 1 | 1 | 0% | 2,076 | 3,686 | +78% | 0 | 0 | — |
case-05 | fail→fail | 13,686 | 11,024 | -19% | 1 | 1 | 0% | 2,308 | 3,325 | +44% | 0 | 0 | — |
case-06 | fail→fail | 7,952 | 7,391 | -7% | 1 | 1 | 0% | 1,346 | 2,637 | +96% | 0 | 0 | — |
case-16 | pass→pass | 11,726 | 8,467 | -28% | 1 | 1 | 0% | 2,005 | 3,107 | +55% | 0 | 0 | — |
case-07 | pass→pass | 5,293 | 4,550 | -14% | 1 | 1 | 0% | 1,008 | 2,159 | +114% | 0 | 0 | — |
case-08 | pass→pass | 10,578 | 6,767 | -36% | 1 | 1 | 0% | 2,048 | 2,591 | +27% | 0 | 0 | — |
case-09 | pass→pass | 8,821 | 7,872 | -11% | 1 | 1 | 0% | 1,918 | 2,852 | +49% | 0 | 0 | — |
case-10 | fail→pass | 4,055 | 3,826 | -6% | 1 | 1 | 0% | 643 | 1,860 | +189% | 0 | 0 | — |
case-11 | pass→pass | 16,682 | 10,761 | -35% | 1 | 1 | 0% | 2,547 | 3,086 | +21% | 0 | 0 | — |
case-12 | pass→pass | 9,686 | 8,038 | -17% | 1 | 1 | 0% | 1,682 | 2,792 | +66% | 0 | 0 | — |
case-13 | pass→pass | 6,373 | 3,920 | -38% | 1 | 1 | 0% | 1,269 | 1,988 | +57% | 0 | 0 | — |
case-14 | pass→pass | 8,708 | 3,602 | -59% | 1 | 1 | 0% | 1,484 | 1,920 | +29% | 0 | 0 | — |
case-15 | pass→pass | 7,556 | 3,897 | -48% | 1 | 1 | 0% | 1,309 | 1,923 | +47% | 0 | 0 | — |
case-17 | pass→pass | 4,770 | 3,706 | -22% | 1 | 1 | 0% | 892 | 1,945 | +118% | 0 | 0 | — |
case-18 | pass→pass | 9,312 | 9,169 | -2% | 1 | 1 | 0% | 1,790 | 3,178 | +78% | 0 | 0 | — |
case-19 | pass→pass | 16,843 | 11,456 | -32% | 1 | 1 | 0% | 2,694 | 3,118 | +16% | 0 | 0 | — |
case-20 | pass→pass | 7,347 | 5,776 | -21% | 1 | 1 | 0% | 1,371 | 2,565 | +87% | 0 | 0 | — |
case-21 | pass→pass | 12,836 | 10,560 | -18% | 1 | 1 | 0% | 2,411 | 3,250 | +35% | 0 | 0 | — |
case-22 | pass→pass | 9,654 | 9,846 | +2% | 1 | 1 | 0% | 2,098 | 3,163 | +51% | 0 | 0 | — |
case-23 | pass→pass | 15,654 | 12,627 | -19% | 1 | 1 | 0% | 3,020 | 3,840 | +27% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +17 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.